public class FacetsPlugin extends PluginActivator implements FacetsService
Modifier and Type | Field and Description |
---|---|
private Logger |
logger |
bundle, dmx, mf
Constructor and Description |
---|
FacetsPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
addFacetTypeToTopic(long topicId,
String facetTypeUri) |
private RelatedTopic |
fetchChildTopic(DMXObject object,
AssociationDefinition assocDef)
Fetches and returns a child topic or
null if no such topic extists. |
private List<RelatedTopic> |
fetchChildTopics(DMXObject object,
AssociationDefinition assocDef)
Fetches and returns child topics.
|
private AssociationDefinition |
getAssocDef(String facetTypeUri) |
private String |
getChildTypeUri(String facetTypeUri) |
RelatedTopic |
getFacet(DMXObject object,
String facetTypeUri)
Retrieves a facet value.
|
RelatedTopic |
getFacet(long topicId,
String facetTypeUri) |
List<RelatedTopic> |
getFacets(DMXObject object,
String facetTypeUri)
Retrieves the values of a multi-facet.
|
List<RelatedTopic> |
getFacets(long topicId,
String facetTypeUri) |
Topic |
getFacettedTopic(long topicId,
List<String> facetTypeUris) |
boolean |
hasFacet(long topicId,
String facetTypeUri,
long facetTopicId) |
private boolean |
isMultiFacet(String facetTypeUri) |
void |
updateFacet(DMXObject object,
String facetTypeUri,
FacetValueModel value)
Updates a facet.
|
void |
updateFacet(long topicId,
String facetTypeUri,
FacetValueModel value) |
getBundleContext, getPluginName, getStaticResource, getUri, init, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
public FacetsPlugin()
public RelatedTopic getFacet(long topicId, String facetTypeUri)
getFacet
in interface FacetsService
public RelatedTopic getFacet(DMXObject object, String facetTypeUri)
FacetsService
getFacet
in interface FacetsService
object
- The facetted object: a topic, association, a type ...facetTypeUri
- URI of the facet type.null
if no such topic extists.public List<RelatedTopic> getFacets(long topicId, String facetTypeUri)
getFacets
in interface FacetsService
public List<RelatedTopic> getFacets(DMXObject object, String facetTypeUri)
FacetsService
getFacets
in interface FacetsService
object
- The facetted object: a topic, association, a type ...facetTypeUri
- URI of the facet type.public Topic getFacettedTopic(long topicId, List<String> facetTypeUris)
getFacettedTopic
in interface FacetsService
public void addFacetTypeToTopic(long topicId, String facetTypeUri)
addFacetTypeToTopic
in interface FacetsService
public void updateFacet(long topicId, String facetTypeUri, FacetValueModel value)
updateFacet
in interface FacetsService
public void updateFacet(DMXObject object, String facetTypeUri, FacetValueModel value)
FacetsService
updateFacet
in interface FacetsService
object
- The facetted object: a topic, association, a type ...facetTypeUri
- URI of the facet type.value
- The new facet value.public boolean hasFacet(long topicId, String facetTypeUri, long facetTopicId)
hasFacet
in interface FacetsService
private RelatedTopic fetchChildTopic(DMXObject object, AssociationDefinition assocDef)
null
if no such topic extists.
Note: There is a principal copy in DMXObjectImpl but here the precondition is different: The given association definition must not necessarily originate from the given object's type definition. ### TODO: meanwhile we have the ValueStorage. Can we use its method instead?
private List<RelatedTopic> fetchChildTopics(DMXObject object, AssociationDefinition assocDef)
Note: There is a principal copy in DMXObjectImpl but here the precondition is different: The given association definition must not necessarily originate from the given object's type definition. ### TODO: meanwhile we have the ValueStorage. Can we use its method instead?
private boolean isMultiFacet(String facetTypeUri)
private String getChildTypeUri(String facetTypeUri)
private AssociationDefinition getAssocDef(String facetTypeUri)
Copyright © 2018. All Rights Reserved.