de.deepamehta.plugins.facets
Class FacetsPlugin

java.lang.Object
  extended by de.deepamehta.core.osgi.PluginActivator
      extended by de.deepamehta.plugins.facets.FacetsPlugin
All Implemented Interfaces:
de.deepamehta.core.osgi.PluginContext, de.deepamehta.core.service.PluginService, FacetsService, org.osgi.framework.BundleActivator

public class FacetsPlugin
extends de.deepamehta.core.osgi.PluginActivator
implements FacetsService


Field Summary
 
Fields inherited from class de.deepamehta.core.osgi.PluginActivator
bundle, dms
 
Constructor Summary
FacetsPlugin()
           
 
Method Summary
 void addFacetTypeToTopic(long topicId, String facetTypeUri)
           
 de.deepamehta.core.Topic getFacet(de.deepamehta.core.DeepaMehtaObject object, String facetTypeUri)
          Retrieves a facet value.
 de.deepamehta.core.Topic getFacet(long topicId, String facetTypeUri)
           
 de.deepamehta.core.service.ResultList<de.deepamehta.core.RelatedTopic> getFacets(de.deepamehta.core.DeepaMehtaObject object, String facetTypeUri)
          Retrieves the values of a multi-facet.
 de.deepamehta.core.service.ResultList<de.deepamehta.core.RelatedTopic> getFacets(long topicId, String facetTypeUri)
           
 de.deepamehta.core.Topic getFacettedTopic(long topicId, List<String> facetTypeUris)
           
 boolean hasFacet(long topicId, String facetTypeUri, long facetTopicId)
           
 void updateFacet(de.deepamehta.core.DeepaMehtaObject object, String facetTypeUri, FacetValue value)
          Updates a facet.
 void updateFacet(long topicId, String facetTypeUri, FacetValue value)
           
 
Methods inherited from class de.deepamehta.core.osgi.PluginActivator
getBundleContext, getPluginName, getStaticResource, getUri, init, publishDirectory, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FacetsPlugin

public FacetsPlugin()
Method Detail

getFacet

public de.deepamehta.core.Topic getFacet(long topicId,
                                         String facetTypeUri)
Specified by:
getFacet in interface FacetsService

getFacet

public de.deepamehta.core.Topic getFacet(de.deepamehta.core.DeepaMehtaObject object,
                                         String facetTypeUri)
Description copied from interface: FacetsService
Retrieves a facet value. ### TODO: rename to getFacetValue ### TODO: add fetchComposite parameter

Specified by:
getFacet in interface FacetsService
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 de.deepamehta.core.service.ResultList<de.deepamehta.core.RelatedTopic> getFacets(long topicId,
                                                                                        String facetTypeUri)
Specified by:
getFacets in interface FacetsService

getFacets

public de.deepamehta.core.service.ResultList<de.deepamehta.core.RelatedTopic> getFacets(de.deepamehta.core.DeepaMehtaObject object,
                                                                                        String facetTypeUri)
Description copied from interface: FacetsService
Retrieves the values of a multi-facet. ### TODO: rename to getFacetValues ### TODO: add fetchComposite parameter

Specified by:
getFacets in interface FacetsService
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 de.deepamehta.core.Topic getFacettedTopic(long topicId,
                                                 List<String> facetTypeUris)
Specified by:
getFacettedTopic in interface FacetsService

addFacetTypeToTopic

public void addFacetTypeToTopic(long topicId,
                                String facetTypeUri)
Specified by:
addFacetTypeToTopic in interface FacetsService

updateFacet

public void updateFacet(long topicId,
                        String facetTypeUri,
                        FacetValue value)
Specified by:
updateFacet in interface FacetsService

updateFacet

public void updateFacet(de.deepamehta.core.DeepaMehtaObject object,
                        String facetTypeUri,
                        FacetValue value)
Description copied from interface: FacetsService
Updates a facet.

Specified by:
updateFacet in interface FacetsService
Parameters:
object - The facetted object: a topic, association, a type ...
facetTypeUri - URI of the facet type.

hasFacet

public boolean hasFacet(long topicId,
                        String facetTypeUri,
                        long facetTopicId)
Specified by:
hasFacet in interface FacetsService


Copyright © 2015. All rights reserved.