public class CoreServiceImpl extends Object implements CoreService
Constructor and Description |
---|
CoreServiceImpl(AccessLayer al,
org.osgi.framework.BundleContext bundleContext) |
Modifier and Type | Method and Description |
---|---|
void |
addAssocPropertyIndex(String propUri) |
void |
addTopicPropertyIndex(String propUri) |
DMXTransaction |
beginTx() |
systems.dmx.core.impl.AssocImpl |
createAssoc(AssocModel model) |
systems.dmx.core.impl.AssocTypeImpl |
createAssocType(AssocTypeModel model) |
RoleType |
createRoleType(RoleTypeModel model) |
systems.dmx.core.impl.TopicImpl |
createTopic(TopicModel model) |
systems.dmx.core.impl.TopicTypeImpl |
createTopicType(TopicTypeModel model) |
void |
deleteAssoc(long assocId) |
void |
deleteAssocType(String assocTypeUri) |
void |
deleteTopic(long topicId) |
void |
deleteTopicType(String topicTypeUri) |
void |
dispatchEvent(String pluginUri,
DMXEvent event,
Object... params) |
void |
fireEvent(DMXEvent event,
Object... params) |
Iterable<Assoc> |
getAllAssocs() |
List<AssocType> |
getAllAssocTypes() |
List<RoleType> |
getAllRoleTypes() |
Iterable<Topic> |
getAllTopics() |
List<TopicType> |
getAllTopicTypes() |
Assoc |
getAssoc(long assocId) |
Assoc |
getAssocBetweenTopicAndAssoc(String assocTypeUri,
long topicId,
long assocId,
String topicRoleTypeUri,
String assocRoleTypeUri) |
Assoc |
getAssocBetweenTopicAndTopic(String assocTypeUri,
long topic1Id,
long topic2Id,
String roleTypeUri1,
String roleTypeUri2)
Returns the association between two topics, qualified by association type and both role types.
|
Assoc |
getAssocByValue(String typeUri,
SimpleValue value)
Retrieves a single association by type and exact value.
|
List<Assoc> |
getAssocs(long topic1Id,
long topic2Id)
Returns all associations between two topics.
|
List<Assoc> |
getAssocs(long topic1Id,
long topic2Id,
String assocTypeUri)
Returns the associations between two topics.
|
List<Assoc> |
getAssocsByProperty(String propUri,
Object propValue) |
List<Assoc> |
getAssocsByPropertyRange(String propUri,
Number from,
Number to) |
List<Assoc> |
getAssocsByRoleType(String roleTypeUri) |
List<Assoc> |
getAssocsByType(String assocTypeUri) |
systems.dmx.core.impl.AssocTypeImpl |
getAssocType(String uri) |
systems.dmx.core.impl.AssocTypeImpl |
getAssocTypeImplicitly(long assocId)
Acccesses an association type while enforcing the implicit READ permission.
|
Object |
getDatabaseVendorObject() |
ModelFactory |
getModelFactory() |
DMXObject |
getObject(long id) |
List<PlayerModel> |
getPlayerModels(long assocId) |
PluginImpl |
getPlugin(String pluginUri) |
List<PluginInfo> |
getPluginInfo() |
PrivilegedAccess |
getPrivilegedAccess() |
Object |
getProperty(long id,
String propUri)
Returns a topic's or association's property value associated with the given property URI.
|
RoleType |
getRoleType(String roleTypeUri) |
RoleType |
getRoleTypeImplicitly(long assocId,
String roleTypeUri) |
Topic |
getTopic(long topicId)
Retrieves a topic by ID.
|
Topic |
getTopicByUri(String uri)
Retrieves a topic by URI.
|
Topic |
getTopicByValue(String typeUri,
SimpleValue value)
Retrieves a single topic by type and exact value.
|
List<Topic> |
getTopicsByProperty(String propUri,
Object propValue) |
List<Topic> |
getTopicsByPropertyRange(String propUri,
Number from,
Number to) |
List<Topic> |
getTopicsByType(String topicTypeUri) |
List<Topic> |
getTopicsByValue(String typeUri,
SimpleValue value)
Retrieves topics by type and exact value.
|
systems.dmx.core.impl.TopicTypeImpl |
getTopicType(String uri) |
systems.dmx.core.impl.TopicTypeImpl |
getTopicTypeImplicitly(long topicId)
Acccesses a topic type while enforcing the implicit READ permission.
|
WebSocketServiceImpl |
getWebSocketService() |
boolean |
hasProperty(long id,
String propUri)
Checks whether for a given topic or association a property value is associated with a given property URI.
|
QueryResult |
query(String topicQuery,
String topicTypeUri,
boolean searchTopicChildren,
String assocQuery,
String assocTypeUri,
boolean searchAssocChildren) |
List<Assoc> |
queryAssocs(String typeUri,
String query)
Retrieves associations by type and value.
|
List<Topic> |
queryTopics(String typeUri,
String query)
Retrieves topics by type and value.
|
TopicResult |
queryTopicsFulltext(String query,
String typeUri,
boolean searchChildTopics)
Performs a fulltext search in topic values and in entire topic trees.
|
void |
shutdown() |
void |
updateAssoc(AssocModel updateModel) |
void |
updateAssocType(AssocTypeModel updateModel) |
systems.dmx.core.impl.TopicImpl |
updateTopic(TopicModel updateModel) |
void |
updateTopicType(TopicTypeModel updateModel) |
public CoreServiceImpl(AccessLayer al, org.osgi.framework.BundleContext bundleContext)
bundleContext
- The context of the DMX Core bundle.public Topic getTopic(long topicId)
CoreService
getTopic
in interface CoreService
public Topic getTopicByUri(String uri)
CoreService
getTopicByUri
in interface CoreService
null
if no topic is found.public List<Topic> getTopicsByType(String topicTypeUri)
getTopicsByType
in interface CoreService
public Iterable<Topic> getAllTopics()
getAllTopics
in interface CoreService
public Topic getTopicByValue(String typeUri, SimpleValue value)
CoreService
getTopicByValue
in interface CoreService
typeUri
- a topic type URI; only topics of this type are searched; mandatoryvalue
- the value to search fornull
if no topic is found.public List<Topic> getTopicsByValue(String typeUri, SimpleValue value)
CoreService
getTopicsByValue
in interface CoreService
typeUri
- a topic type URI; only topics of this type are searched; mandatoryvalue
- the value to search forpublic List<Topic> queryTopics(String typeUri, String query)
CoreService
queryTopics
in interface CoreService
typeUri
- a topic type URI; only topics of this type are searched; mandatoryquery
- The query. Must be non-empty. Lucene query syntax is supported:
public TopicResult queryTopicsFulltext(String query, String typeUri, boolean searchChildTopics)
CoreService
queryTopicsFulltext
in interface CoreService
query
- The search query. Must be non-empty. Lucene query syntax is supported:
typeUri
- Optional: a topic type URI; only topics of this type are searched. If null all
topics are searched.searchChildTopics
- Applicable only if "topicTypeUri" is given (ignored otherwise): if true the topic's
child topics are searched as well.public systems.dmx.core.impl.TopicImpl createTopic(TopicModel model)
createTopic
in interface CoreService
public systems.dmx.core.impl.TopicImpl updateTopic(TopicModel updateModel)
updateTopic
in interface CoreService
public void deleteTopic(long topicId)
deleteTopic
in interface CoreService
public Assoc getAssoc(long assocId)
getAssoc
in interface CoreService
public List<PlayerModel> getPlayerModels(long assocId)
getPlayerModels
in interface CoreService
public List<Assoc> getAssocsByType(String assocTypeUri)
getAssocsByType
in interface CoreService
public List<Assoc> getAssocsByRoleType(String roleTypeUri)
getAssocsByRoleType
in interface CoreService
public List<Assoc> getAssocs(long topic1Id, long topic2Id)
CoreService
getAssocs
in interface CoreService
public List<Assoc> getAssocs(long topic1Id, long topic2Id, String assocTypeUri)
CoreService
getAssocs
in interface CoreService
assocTypeUri
- Assoc type filter. Pass null
to switch filter off.public Assoc getAssocBetweenTopicAndTopic(String assocTypeUri, long topic1Id, long topic2Id, String roleTypeUri1, String roleTypeUri2)
CoreService
null
is returned.
If more than one association exist, a runtime exception is thrown.getAssocBetweenTopicAndTopic
in interface CoreService
assocTypeUri
- Assoc type filter. Pass null
to switch filter off.public Assoc getAssocBetweenTopicAndAssoc(String assocTypeUri, long topicId, long assocId, String topicRoleTypeUri, String assocRoleTypeUri)
getAssocBetweenTopicAndAssoc
in interface CoreService
public Iterable<Assoc> getAllAssocs()
getAllAssocs
in interface CoreService
public Assoc getAssocByValue(String typeUri, SimpleValue value)
CoreService
getAssocByValue
in interface CoreService
typeUri
- an association type URI; only associations of this type are searched; mandatoryvalue
- the value to search fornull
if no association is found.public List<Assoc> queryAssocs(String typeUri, String query)
CoreService
queryAssocs
in interface CoreService
typeUri
- an association type URI; only associations of this type are searched; mandatoryquery
- The query. Must be non-empty. Lucene query syntax is supported:
public systems.dmx.core.impl.AssocImpl createAssoc(AssocModel model)
createAssoc
in interface CoreService
public void updateAssoc(AssocModel updateModel)
updateAssoc
in interface CoreService
public void deleteAssoc(long assocId)
deleteAssoc
in interface CoreService
public systems.dmx.core.impl.TopicTypeImpl getTopicType(String uri)
getTopicType
in interface CoreService
public systems.dmx.core.impl.TopicTypeImpl getTopicTypeImplicitly(long topicId)
CoreService
getTopicTypeImplicitly
in interface CoreService
public List<TopicType> getAllTopicTypes()
getAllTopicTypes
in interface CoreService
public systems.dmx.core.impl.TopicTypeImpl createTopicType(TopicTypeModel model)
createTopicType
in interface CoreService
public void updateTopicType(TopicTypeModel updateModel)
updateTopicType
in interface CoreService
public void deleteTopicType(String topicTypeUri)
deleteTopicType
in interface CoreService
public systems.dmx.core.impl.AssocTypeImpl getAssocType(String uri)
getAssocType
in interface CoreService
public systems.dmx.core.impl.AssocTypeImpl getAssocTypeImplicitly(long assocId)
CoreService
getAssocTypeImplicitly
in interface CoreService
public List<AssocType> getAllAssocTypes()
getAllAssocTypes
in interface CoreService
public systems.dmx.core.impl.AssocTypeImpl createAssocType(AssocTypeModel model)
createAssocType
in interface CoreService
public void updateAssocType(AssocTypeModel updateModel)
updateAssocType
in interface CoreService
public void deleteAssocType(String assocTypeUri)
deleteAssocType
in interface CoreService
public RoleType getRoleType(String roleTypeUri)
getRoleType
in interface CoreService
public RoleType getRoleTypeImplicitly(long assocId, String roleTypeUri)
getRoleTypeImplicitly
in interface CoreService
public List<RoleType> getAllRoleTypes()
getAllRoleTypes
in interface CoreService
public RoleType createRoleType(RoleTypeModel model)
createRoleType
in interface CoreService
public DMXObject getObject(long id)
getObject
in interface CoreService
public QueryResult query(String topicQuery, String topicTypeUri, boolean searchTopicChildren, String assocQuery, String assocTypeUri, boolean searchAssocChildren)
query
in interface CoreService
public PluginImpl getPlugin(String pluginUri)
getPlugin
in interface CoreService
public List<PluginInfo> getPluginInfo()
getPluginInfo
in interface CoreService
public void fireEvent(DMXEvent event, Object... params)
fireEvent
in interface CoreService
public void dispatchEvent(String pluginUri, DMXEvent event, Object... params)
dispatchEvent
in interface CoreService
public Object getProperty(long id, String propUri)
CoreService
getProperty
in interface CoreService
id
- a topic ID, or an association IDpublic boolean hasProperty(long id, String propUri)
CoreService
hasProperty
in interface CoreService
id
- a topic ID, or an association IDpublic List<Topic> getTopicsByProperty(String propUri, Object propValue)
getTopicsByProperty
in interface CoreService
public List<Topic> getTopicsByPropertyRange(String propUri, Number from, Number to)
getTopicsByPropertyRange
in interface CoreService
public List<Assoc> getAssocsByProperty(String propUri, Object propValue)
getAssocsByProperty
in interface CoreService
public List<Assoc> getAssocsByPropertyRange(String propUri, Number from, Number to)
getAssocsByPropertyRange
in interface CoreService
public void addTopicPropertyIndex(String propUri)
addTopicPropertyIndex
in interface CoreService
public void addAssocPropertyIndex(String propUri)
addAssocPropertyIndex
in interface CoreService
public DMXTransaction beginTx()
beginTx
in interface CoreService
public ModelFactory getModelFactory()
getModelFactory
in interface CoreService
public PrivilegedAccess getPrivilegedAccess()
getPrivilegedAccess
in interface CoreService
public WebSocketServiceImpl getWebSocketService()
getWebSocketService
in interface CoreService
public Object getDatabaseVendorObject()
getDatabaseVendorObject
in interface CoreService
public void shutdown()
Copyright © 2023. All Rights Reserved.