Package systems.dmx.facets
Class FacetsPlugin
- java.lang.Object
-
- systems.dmx.core.osgi.PluginActivator
-
- systems.dmx.facets.FacetsPlugin
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
,PluginContext
,FacetsService
public class FacetsPlugin extends PluginActivator implements FacetsService
-
-
Field Summary
-
Fields inherited from class systems.dmx.core.osgi.PluginActivator
bundle, dmx, mf
-
-
Constructor Summary
Constructors Constructor Description FacetsPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFacetTypeToTopic(long topicId, String facetTypeUri)
RelatedTopic
getFacet(long topicId, String facetTypeUri)
RelatedTopic
getFacet(DMXObject object, String facetTypeUri)
Retrieves a facet value.List<RelatedTopic>
getFacets(long topicId, String facetTypeUri)
List<RelatedTopic>
getFacets(DMXObject object, String facetTypeUri)
Retrieves the values of a multi-facet.Topic
getFacettedTopic(long topicId, List<String> facetTypeUris)
boolean
hasFacet(long topicId, String facetTypeUri, long facetTopicId)
void
updateFacet(long topicId, String facetTypeUri, FacetValueModel value)
void
updateFacet(DMXObject object, String facetTypeUri, FacetValueModel value)
Updates a facet.-
Methods inherited from class systems.dmx.core.osgi.PluginActivator
getBundleContext, getPluginName, getStaticResource, getUri, init, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
-
-
-
-
Method Detail
-
getFacet
public RelatedTopic getFacet(long topicId, String facetTypeUri)
- Specified by:
getFacet
in interfaceFacetsService
-
getFacet
public RelatedTopic getFacet(DMXObject object, String facetTypeUri)
Description copied from interface:FacetsService
Retrieves a facet value. ### TODO: rename to getFacetValue?- Specified by:
getFacet
in interfaceFacetsService
- Parameters:
object
- The facetted object: a topic, association, a type ...facetTypeUri
- URI of the facet type.- Returns:
- The retrieved facet value (including its child topics) or
null
if no such topic extists.
-
getFacets
public List<RelatedTopic> getFacets(long topicId, String facetTypeUri)
- Specified by:
getFacets
in interfaceFacetsService
-
getFacets
public List<RelatedTopic> getFacets(DMXObject object, String facetTypeUri)
Description copied from interface:FacetsService
Retrieves the values of a multi-facet. ### TODO: rename to getFacetValues?- Specified by:
getFacets
in interfaceFacetsService
- Parameters:
object
- The facetted object: a topic, association, a type ...facetTypeUri
- URI of the facet type.- Returns:
- The retrieved facet values (including their child topics). The list may be empty.
-
getFacettedTopic
public Topic getFacettedTopic(long topicId, List<String> facetTypeUris)
- Specified by:
getFacettedTopic
in interfaceFacetsService
-
addFacetTypeToTopic
public void addFacetTypeToTopic(long topicId, String facetTypeUri)
- Specified by:
addFacetTypeToTopic
in interfaceFacetsService
-
updateFacet
public void updateFacet(long topicId, String facetTypeUri, FacetValueModel value)
- Specified by:
updateFacet
in interfaceFacetsService
-
updateFacet
public void updateFacet(DMXObject object, String facetTypeUri, FacetValueModel value)
Description copied from interface:FacetsService
Updates a facet.- Specified by:
updateFacet
in interfaceFacetsService
- Parameters:
object
- The facetted object: a topic, association, a type ...facetTypeUri
- URI of the facet type.value
- The new facet value.
-
hasFacet
public boolean hasFacet(long topicId, String facetTypeUri, long facetTopicId)
- Specified by:
hasFacet
in interfaceFacetsService
-
-