public interface CoreService
Inside the PluginActivator
and Migration
(sub)classes an instance of the DMX Core Service is
available as the dmx
object.
Modifier and Type | Method and Description |
---|---|
void |
addAssocPropertyIndex(String propUri) |
void |
addTopicPropertyIndex(String propUri) |
DMXTransaction |
beginTx() |
Assoc |
createAssoc(AssocModel model) |
AssocType |
createAssocType(AssocTypeModel model) |
RoleType |
createRoleType(RoleTypeModel model) |
Topic |
createTopic(TopicModel model) |
TopicType |
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) |
AssocType |
getAssocType(String assocTypeUri) |
AssocType |
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) |
Plugin |
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.
|
TopicType |
getTopicType(String topicTypeUri) |
TopicType |
getTopicTypeImplicitly(long topicId)
Acccesses a topic type while enforcing the implicit READ permission.
|
WebSocketService |
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 |
updateAssoc(AssocModel updateModel) |
void |
updateAssocType(AssocTypeModel updateModel) |
Topic |
updateTopic(TopicModel updateModel) |
void |
updateTopicType(TopicTypeModel updateModel) |
Topic getTopic(long topicId)
RuntimeException
- if no topic is found.Topic getTopicByUri(String uri)
null
if no topic is found.Topic getTopicByValue(String typeUri, SimpleValue value)
typeUri
- a topic type URI; only topics of this type are searched; mandatoryvalue
- the value to search fornull
if no topic is found.RuntimeException
- If more than one topic is found.RuntimeException
- If null is given for "typeUri".List<Topic> getTopicsByValue(String typeUri, SimpleValue value)
typeUri
- a topic type URI; only topics of this type are searched; mandatoryvalue
- the value to search forRuntimeException
- If null is given for "typeUri".List<Topic> queryTopics(String typeUri, String query)
typeUri
- a topic type URI; only topics of this type are searched; mandatoryquery
- The query. Must be non-empty. Lucene query syntax is supported:
RuntimeException
- If null is given for "typeUri".TopicResult queryTopicsFulltext(String query, String typeUri, boolean searchChildTopics)
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.Topic createTopic(TopicModel model)
Topic updateTopic(TopicModel updateModel)
void deleteTopic(long topicId)
Assoc getAssoc(long assocId)
List<PlayerModel> getPlayerModels(long assocId)
List<Assoc> getAssocs(long topic1Id, long topic2Id)
List<Assoc> getAssocs(long topic1Id, long topic2Id, String assocTypeUri)
assocTypeUri
- Assoc type filter. Pass null
to switch filter off.Assoc getAssocBetweenTopicAndTopic(String assocTypeUri, long topic1Id, long topic2Id, String roleTypeUri1, String roleTypeUri2)
null
is returned.
If more than one association exist, a runtime exception is thrown.assocTypeUri
- Assoc type filter. Pass null
to switch filter off.Assoc getAssocBetweenTopicAndAssoc(String assocTypeUri, long topicId, long assocId, String topicRoleTypeUri, String assocRoleTypeUri)
Assoc getAssocByValue(String typeUri, SimpleValue value)
typeUri
- an association type URI; only associations of this type are searched; mandatoryvalue
- the value to search fornull
if no association is found.RuntimeException
- If more than one association is found.RuntimeException
- If null is given for "typeUri".List<Assoc> queryAssocs(String typeUri, String query)
typeUri
- an association type URI; only associations of this type are searched; mandatoryquery
- The query. Must be non-empty. Lucene query syntax is supported:
RuntimeException
- If null is given for "typeUri".Assoc createAssoc(AssocModel model)
void updateAssoc(AssocModel updateModel)
void deleteAssoc(long assocId)
TopicType getTopicTypeImplicitly(long topicId)
TopicType createTopicType(TopicTypeModel model)
void updateTopicType(TopicTypeModel updateModel)
void deleteTopicType(String topicTypeUri)
AssocType getAssocTypeImplicitly(long assocId)
AssocType createAssocType(AssocTypeModel model)
void updateAssocType(AssocTypeModel updateModel)
void deleteAssocType(String assocTypeUri)
RoleType createRoleType(RoleTypeModel model)
DMXObject getObject(long id)
QueryResult query(String topicQuery, String topicTypeUri, boolean searchTopicChildren, String assocQuery, String assocTypeUri, boolean searchAssocChildren)
List<PluginInfo> getPluginInfo()
Object getProperty(long id, String propUri)
id
- a topic ID, or an association IDboolean hasProperty(long id, String propUri)
id
- a topic ID, or an association IDList<Topic> getTopicsByPropertyRange(String propUri, Number from, Number to)
List<Assoc> getAssocsByPropertyRange(String propUri, Number from, Number to)
void addTopicPropertyIndex(String propUri)
void addAssocPropertyIndex(String propUri)
DMXTransaction beginTx()
ModelFactory getModelFactory()
PrivilegedAccess getPrivilegedAccess()
WebSocketService getWebSocketService()
Object getDatabaseVendorObject()
Copyright © 2023. All Rights Reserved.