de.deepamehta.core.service
Interface DeepaMehtaService

Show UML class diagram
All Known Implementing Classes:
EmbeddedService

public interface DeepaMehtaService

Specification of the DeepaMehta core service -- the heart of DeepaMehta.

The responsibility of the DeepaMehta core service is to orchestrate the control flow and allow plugins to hook in. The main duties of the DeepaMehta core service are to provide access to the storage layer and to deliver events to the installed plugins. ### FIXDOC

The DeepaMehta core service is a realization of the Inversion of Control pattern.

The DeepaMehta core service provides methods to deal with topics, associations, types, and plugins.

Plugin developer notes: Inside the PluginActivator and Migration classes an instance of the DeepaMehta core service is available through the dms object.


Method Summary
 DeepaMehtaTransaction beginTx()
           
 Association createAssociation(AssociationModel model, ClientState clientState)
           
 AssociationType createAssociationType(AssociationTypeModel model, ClientState clientState)
           
 Topic createTopic(TopicModel model, ClientState clientState)
           
 TopicType createTopicType(TopicTypeModel model, ClientState clientState)
           
 Directives deleteAssociation(long assocId)
           
 Directives deleteTopic(long topicId)
           
 Iterable<Association> getAllAssociations()
           
 List<AssociationType> getAllAssociationTypes()
           
 Iterable<Topic> getAllTopics()
           
 List<TopicType> getAllTopicTypes()
           
 Association getAssociation(long assocId, boolean fetchComposite)
           
 Association getAssociation(String assocTypeUri, long topic1Id, long topic2Id, String roleTypeUri1, String roleTypeUri2, boolean fetchComposite)
          Returns the association between two topics, qualified by association type and both role types.
 Association getAssociationBetweenTopicAndAssociation(String assocTypeUri, long topicId, long assocId, String topicRoleTypeUri, String assocRoleTypeUri, boolean fetchComposite)
           
 List<Association> getAssociations(long topic1Id, long topic2Id)
          Returns all associations between two topics.
 List<Association> getAssociations(long topic1Id, long topic2Id, String assocTypeUri)
          Returns the associations between two topics.
 List<RelatedAssociation> getAssociations(String assocTypeUri)
           
 List<Association> getAssociationsByProperty(String propUri, Object propValue)
           
 List<Association> getAssociationsByPropertyRange(String propUri, Number from, Number to)
           
 AssociationType getAssociationType(String assocTypeUri)
           
 List<String> getAssociationTypeUris()
           
 Plugin getPlugin(String pluginUri)
           
 List<PluginInfo> getPluginInfo()
           
 Topic getTopic(long id, boolean fetchComposite)
           
 Topic getTopic(String key, SimpleValue value, boolean fetchComposite)
          Looks up a single topic by exact value.
 ResultList<RelatedTopic> getTopics(String topicTypeUri, boolean fetchComposite, int maxResultSize)
           
 List<Topic> getTopics(String key, SimpleValue value, boolean fetchComposite)
          Looks up topics by key and value.
 List<Topic> getTopicsByProperty(String propUri, Object propValue)
           
 List<Topic> getTopicsByPropertyRange(String propUri, Number from, Number to)
           
 TopicType getTopicType(String topicTypeUri)
           
 List<String> getTopicTypeUris()
           
 TypeStorage getTypeStorage()
           
 List<Topic> searchTopics(String searchTerm, String fieldUri)
          Performs a fulltext search.
 Directives updateAssociation(AssociationModel model, ClientState clientState)
           
 Directives updateAssociationType(AssociationTypeModel model, ClientState clientState)
           
 Directives updateTopic(TopicModel model, ClientState clientState)
           
 Directives updateTopicType(TopicTypeModel model, ClientState clientState)
           
 

Method Detail

getTopic

Topic getTopic(long id,
               boolean fetchComposite)

getTopic

Topic getTopic(String key,
               SimpleValue value,
               boolean fetchComposite)
Looks up a single topic by exact value. If no such topic exists null is returned. If more than one topic is found a runtime exception is thrown.

IMPORTANT: Looking up a topic this way requires the corresponding type to be indexed with indexing mode dm4.core.key.


getTopics

List<Topic> getTopics(String key,
                      SimpleValue value,
                      boolean fetchComposite)
Looks up topics by key and value. String values can contain wildcards like "*".

IMPORTANT: Looking up topics this way requires the corresponding type to be indexed with indexing mode dm4.core.key.


getTopics

ResultList<RelatedTopic> getTopics(String topicTypeUri,
                                   boolean fetchComposite,
                                   int maxResultSize)

searchTopics

List<Topic> searchTopics(String searchTerm,
                         String fieldUri)
Performs a fulltext search.

IMPORTANT: Searching topics this way requires the corresponding type to be indexed with indexing mode dm4.core.fulltext or dm4.core.fulltext_key.

Parameters:
fieldUri - The URI of the data field to search. If null is provided all fields are searched. ### FIXDOC

getAllTopics

Iterable<Topic> getAllTopics()

createTopic

Topic createTopic(TopicModel model,
                  ClientState clientState)

updateTopic

Directives updateTopic(TopicModel model,
                       ClientState clientState)

deleteTopic

Directives deleteTopic(long topicId)

getAssociation

Association getAssociation(long assocId,
                           boolean fetchComposite)

getAssociation

Association getAssociation(String assocTypeUri,
                           long topic1Id,
                           long topic2Id,
                           String roleTypeUri1,
                           String roleTypeUri2,
                           boolean fetchComposite)
Returns the association between two topics, qualified by association type and both role types. If no such association exists null is returned. If more than one association exist, a runtime exception is thrown.

Parameters:
assocTypeUri - Association type filter. Pass null to switch filter off.

getAssociationBetweenTopicAndAssociation

Association getAssociationBetweenTopicAndAssociation(String assocTypeUri,
                                                     long topicId,
                                                     long assocId,
                                                     String topicRoleTypeUri,
                                                     String assocRoleTypeUri,
                                                     boolean fetchComposite)

getAssociations

List<RelatedAssociation> getAssociations(String assocTypeUri)

getAssociations

List<Association> getAssociations(long topic1Id,
                                  long topic2Id)
Returns all associations between two topics. If no such association exists an empty set is returned.


getAssociations

List<Association> getAssociations(long topic1Id,
                                  long topic2Id,
                                  String assocTypeUri)
Returns the associations between two topics. If no such association exists an empty set is returned.

Parameters:
assocTypeUri - Association type filter. Pass null to switch filter off.

getAllAssociations

Iterable<Association> getAllAssociations()

createAssociation

Association createAssociation(AssociationModel model,
                              ClientState clientState)

updateAssociation

Directives updateAssociation(AssociationModel model,
                             ClientState clientState)

deleteAssociation

Directives deleteAssociation(long assocId)

getTopicTypeUris

List<String> getTopicTypeUris()

getTopicType

TopicType getTopicType(String topicTypeUri)

getAllTopicTypes

List<TopicType> getAllTopicTypes()

createTopicType

TopicType createTopicType(TopicTypeModel model,
                          ClientState clientState)

updateTopicType

Directives updateTopicType(TopicTypeModel model,
                           ClientState clientState)

getAssociationTypeUris

List<String> getAssociationTypeUris()

getAssociationType

AssociationType getAssociationType(String assocTypeUri)

getAllAssociationTypes

List<AssociationType> getAllAssociationTypes()

createAssociationType

AssociationType createAssociationType(AssociationTypeModel model,
                                      ClientState clientState)

updateAssociationType

Directives updateAssociationType(AssociationTypeModel model,
                                 ClientState clientState)

getPlugin

Plugin getPlugin(String pluginUri)

getPluginInfo

List<PluginInfo> getPluginInfo()

getTopicsByProperty

List<Topic> getTopicsByProperty(String propUri,
                                Object propValue)

getTopicsByPropertyRange

List<Topic> getTopicsByPropertyRange(String propUri,
                                     Number from,
                                     Number to)

getAssociationsByProperty

List<Association> getAssociationsByProperty(String propUri,
                                            Object propValue)

getAssociationsByPropertyRange

List<Association> getAssociationsByPropertyRange(String propUri,
                                                 Number from,
                                                 Number to)

beginTx

DeepaMehtaTransaction beginTx()

getTypeStorage

TypeStorage getTypeStorage()


Copyright © 2013. All Rights Reserved.