public class CoreServiceImpl extends Object implements CoreService
| Constructor and Description |
|---|
CoreServiceImpl(PersistenceLayer pl,
org.osgi.framework.BundleContext bundleContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssociationPropertyIndex(String propUri) |
void |
addTopicPropertyIndex(String propUri) |
DeepaMehtaTransaction |
beginTx() |
de.deepamehta.core.impl.AssociationImpl |
createAssociation(AssociationModel model) |
de.deepamehta.core.impl.AssociationTypeImpl |
createAssociationType(AssociationTypeModel model) |
Topic |
createRoleType(TopicModel model) |
de.deepamehta.core.impl.TopicImpl |
createTopic(TopicModel model) |
de.deepamehta.core.impl.TopicTypeImpl |
createTopicType(TopicTypeModel model) |
void |
deleteAssociation(long assocId) |
void |
deleteAssociationType(String assocTypeUri) |
void |
deleteTopic(long topicId) |
void |
deleteTopicType(String topicTypeUri) |
void |
dispatchEvent(String pluginUri,
DeepaMehtaEvent event,
Object... params) |
void |
fireEvent(DeepaMehtaEvent event,
Object... params) |
AccessControl |
getAccessControl() |
Iterable<Association> |
getAllAssociations() |
List<AssociationType> |
getAllAssociationTypes() |
Iterable<Topic> |
getAllTopics() |
List<TopicType> |
getAllTopicTypes() |
Association |
getAssociation(long assocId) |
Association |
getAssociation(String assocTypeUri,
long topic1Id,
long topic2Id,
String roleTypeUri1,
String roleTypeUri2)
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) |
Association |
getAssociationByValue(String key,
SimpleValue value)
Looks up a single association by exact value.
|
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<Association> |
getAssociationsByProperty(String propUri,
Object propValue) |
List<Association> |
getAssociationsByPropertyRange(String propUri,
Number from,
Number to) |
List<Association> |
getAssociationsByType(String assocTypeUri) |
List<Association> |
getAssociationsByValue(String key,
SimpleValue value)
Looks up associations by key and value.
|
de.deepamehta.core.impl.AssociationTypeImpl |
getAssociationType(String uri) |
de.deepamehta.core.impl.AssociationTypeImpl |
getAssociationTypeImplicitly(long assocId)
Acccesses an association type while enforcing the implicit READ permission.
|
Object |
getDatabaseVendorObject() |
ModelFactory |
getModelFactory() |
DeepaMehtaObject |
getObject(long id) |
long[] |
getPlayerIds(long assocId) |
PluginImpl |
getPlugin(String pluginUri) |
List<PluginInfo> |
getPluginInfo() |
Object |
getProperty(long id,
String propUri)
Returns a topic's or association's property value associated with the given property URI.
|
Topic |
getTopic(long topicId)
Accesses a topic by ID.
|
de.deepamehta.core.impl.TopicImpl |
getTopicByUri(String uri)
Accesses a topic by URI.
|
Topic |
getTopicByValue(String key,
SimpleValue value)
Looks up a single topic by 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 key,
SimpleValue value)
Looks up topics by key and value.
|
de.deepamehta.core.impl.TopicTypeImpl |
getTopicType(String uri) |
de.deepamehta.core.impl.TopicTypeImpl |
getTopicTypeImplicitly(long topicId)
Acccesses a topic type while enforcing the implicit READ permission.
|
boolean |
hasProperty(long id,
String propUri)
Checks whether for a given topic or association a property value is associated with a given property URI.
|
List<Topic> |
searchTopics(String searchTerm,
String fieldUri)
Performs a fulltext search.
|
void |
updateAssociation(AssociationModel updateModel) |
void |
updateAssociationType(AssociationTypeModel updateModel) |
void |
updateTopic(TopicModel updateModel) |
void |
updateTopicType(TopicTypeModel updateModel) |
public CoreServiceImpl(PersistenceLayer pl, org.osgi.framework.BundleContext bundleContext)
bundleContext - The context of the DeepaMehta 4 Core bundle.public Topic getTopic(long topicId)
CoreServicegetTopic in interface CoreServicepublic de.deepamehta.core.impl.TopicImpl getTopicByUri(String uri)
CoreServicegetTopicByUri in interface CoreServicenull if no such topic exists.public Topic getTopicByValue(String key, SimpleValue value)
CoreService
Note: wildcards like "*" in String values are not interpreted. They are treated literally.
Compare to CoreService.getTopicsByValue(String,SimpleValue)
IMPORTANT: Looking up a topic this way requires the corresponding type to be indexed with indexing mode
dm4.core.key.
getTopicByValue in interface CoreServicenull if no such topic exists.public List<Topic> getTopicsByValue(String key, SimpleValue value)
CoreServiceWildcards like "*" in String values are interpreted.
IMPORTANT: Looking up topics this way requires the corresponding type to be indexed with indexing mode
dm4.core.key.
getTopicsByValue in interface CoreServicepublic List<Topic> getTopicsByType(String topicTypeUri)
getTopicsByType in interface CoreServicepublic List<Topic> searchTopics(String searchTerm, String fieldUri)
CoreService
IMPORTANT: Searching topics this way requires the corresponding type to be indexed with indexing mode
dm4.core.fulltext or dm4.core.fulltext_key. ### FIXDOC
searchTopics in interface CoreServicefieldUri - The URI of the data field to search. If null is provided all fields are searched. ### FIXDOC
### TODO: rename parameter to "key"?public Iterable<Topic> getAllTopics()
getAllTopics in interface CoreServicepublic de.deepamehta.core.impl.TopicImpl createTopic(TopicModel model)
createTopic in interface CoreServicepublic void updateTopic(TopicModel updateModel)
updateTopic in interface CoreServicepublic void deleteTopic(long topicId)
deleteTopic in interface CoreServicepublic Association getAssociation(long assocId)
getAssociation in interface CoreServicepublic Association getAssociationByValue(String key, SimpleValue value)
CoreService
Note: wildcards like "*" in String values are not interpreted. They are treated literally.
Compare to CoreService.getAssociationsByValue(String,SimpleValue)
IMPORTANT: Looking up an association this way requires the corresponding type to be indexed with indexing mode
dm4.core.key.
getAssociationByValue in interface CoreServicenull if no such association exists.public List<Association> getAssociationsByValue(String key, SimpleValue value)
CoreServiceWildcards like "*" in String values are interpreted.
IMPORTANT: Looking up associations this way requires the corresponding type to be indexed with indexing mode
dm4.core.key.
getAssociationsByValue in interface CoreServicepublic Association getAssociation(String assocTypeUri, long topic1Id, long topic2Id, String roleTypeUri1, String roleTypeUri2)
CoreServicenull is returned.
If more than one association exist, a runtime exception is thrown.getAssociation in interface CoreServiceassocTypeUri - Association type filter. Pass null to switch filter off.public Association getAssociationBetweenTopicAndAssociation(String assocTypeUri, long topicId, long assocId, String topicRoleTypeUri, String assocRoleTypeUri)
getAssociationBetweenTopicAndAssociation in interface CoreServicepublic List<Association> getAssociationsByType(String assocTypeUri)
getAssociationsByType in interface CoreServicepublic List<Association> getAssociations(long topic1Id, long topic2Id)
CoreServicegetAssociations in interface CoreServicepublic List<Association> getAssociations(long topic1Id, long topic2Id, String assocTypeUri)
CoreServicegetAssociations in interface CoreServiceassocTypeUri - Association type filter. Pass null to switch filter off.public Iterable<Association> getAllAssociations()
getAllAssociations in interface CoreServicepublic long[] getPlayerIds(long assocId)
getPlayerIds in interface CoreServicepublic de.deepamehta.core.impl.AssociationImpl createAssociation(AssociationModel model)
createAssociation in interface CoreServicepublic void updateAssociation(AssociationModel updateModel)
updateAssociation in interface CoreServicepublic void deleteAssociation(long assocId)
deleteAssociation in interface CoreServicepublic de.deepamehta.core.impl.TopicTypeImpl getTopicType(String uri)
getTopicType in interface CoreServicepublic de.deepamehta.core.impl.TopicTypeImpl getTopicTypeImplicitly(long topicId)
CoreServicegetTopicTypeImplicitly in interface CoreServicepublic List<TopicType> getAllTopicTypes()
getAllTopicTypes in interface CoreServicepublic de.deepamehta.core.impl.TopicTypeImpl createTopicType(TopicTypeModel model)
createTopicType in interface CoreServicepublic void updateTopicType(TopicTypeModel updateModel)
updateTopicType in interface CoreServicepublic void deleteTopicType(String topicTypeUri)
deleteTopicType in interface CoreServicepublic de.deepamehta.core.impl.AssociationTypeImpl getAssociationType(String uri)
getAssociationType in interface CoreServicepublic de.deepamehta.core.impl.AssociationTypeImpl getAssociationTypeImplicitly(long assocId)
CoreServicegetAssociationTypeImplicitly in interface CoreServicepublic List<AssociationType> getAllAssociationTypes()
getAllAssociationTypes in interface CoreServicepublic de.deepamehta.core.impl.AssociationTypeImpl createAssociationType(AssociationTypeModel model)
createAssociationType in interface CoreServicepublic void updateAssociationType(AssociationTypeModel updateModel)
updateAssociationType in interface CoreServicepublic void deleteAssociationType(String assocTypeUri)
deleteAssociationType in interface CoreServicepublic Topic createRoleType(TopicModel model)
createRoleType in interface CoreServicepublic DeepaMehtaObject getObject(long id)
getObject in interface CoreServicepublic PluginImpl getPlugin(String pluginUri)
getPlugin in interface CoreServicepublic List<PluginInfo> getPluginInfo()
getPluginInfo in interface CoreServicepublic void fireEvent(DeepaMehtaEvent event, Object... params)
fireEvent in interface CoreServicepublic void dispatchEvent(String pluginUri, DeepaMehtaEvent event, Object... params)
dispatchEvent in interface CoreServicepublic Object getProperty(long id, String propUri)
CoreServicegetProperty in interface CoreServiceid - a topic ID, or an association IDpublic boolean hasProperty(long id,
String propUri)
CoreServicehasProperty in interface CoreServiceid - a topic ID, or an association IDpublic List<Topic> getTopicsByProperty(String propUri, Object propValue)
getTopicsByProperty in interface CoreServicepublic List<Topic> getTopicsByPropertyRange(String propUri, Number from, Number to)
getTopicsByPropertyRange in interface CoreServicepublic List<Association> getAssociationsByProperty(String propUri, Object propValue)
getAssociationsByProperty in interface CoreServicepublic List<Association> getAssociationsByPropertyRange(String propUri, Number from, Number to)
getAssociationsByPropertyRange in interface CoreServicepublic void addTopicPropertyIndex(String propUri)
addTopicPropertyIndex in interface CoreServicepublic void addAssociationPropertyIndex(String propUri)
addAssociationPropertyIndex in interface CoreServicepublic DeepaMehtaTransaction beginTx()
beginTx in interface CoreServicepublic ModelFactory getModelFactory()
getModelFactory in interface CoreServicepublic AccessControl getAccessControl()
getAccessControl in interface CoreServicepublic Object getDatabaseVendorObject()
getDatabaseVendorObject in interface CoreServiceCopyright © 2018. All rights reserved.