de.deepamehta.core.storage.spi
Interface DeepaMehtaStorage
- All Known Implementing Classes:
- Neo4jStorage
public interface DeepaMehtaStorage
Method Summary |
DeepaMehtaTransaction |
beginTx()
|
void |
deleteAssociation(long assocId)
|
void |
deleteAssociationProperty(long assocId,
String propUri)
|
void |
deleteTopic(long topicId)
|
void |
deleteTopicProperty(long topicId,
String propUri)
|
Iterator<AssociationModel> |
fetchAllAssociations()
|
Iterator<TopicModel> |
fetchAllTopics()
|
AssociationModel |
fetchAssociation(long id)
|
List<AssociationModel> |
fetchAssociationAssociations(long assocId)
|
Object |
fetchAssociationProperty(long assocId,
String propUri)
|
List<RelatedAssociationModel> |
fetchAssociationRelatedAssociations(long assocId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
|
List<RelatedTopicModel> |
fetchAssociationRelatedTopics(long assocId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
|
List<AssociationModel> |
fetchAssociations(String assocTypeUri,
long topicId1,
long topicId2,
String roleTypeUri1,
String roleTypeUri2)
|
List<AssociationModel> |
fetchAssociationsBetweenTopicAndAssociation(String assocTypeUri,
long topicId,
long assocId,
String topicRoleTypeUri,
String assocRoleTypeUri)
|
List<AssociationModel> |
fetchAssociationsByProperty(String propUri,
Object propValue)
|
List<AssociationModel> |
fetchAssociationsByPropertyRange(String propUri,
Number from,
Number to)
|
List<RelatedAssociationModel> |
fetchRelatedAssociations(long id,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
|
List<RelatedTopicModel> |
fetchRelatedTopics(long id,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
|
TopicModel |
fetchTopic(long id)
|
TopicModel |
fetchTopic(String key,
Object value)
|
List<AssociationModel> |
fetchTopicAssociations(long topicId)
|
Object |
fetchTopicProperty(long topicId,
String propUri)
|
List<RelatedAssociationModel> |
fetchTopicRelatedAssociations(long topicId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
|
List<RelatedTopicModel> |
fetchTopicRelatedTopics(long topicId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
|
List<TopicModel> |
fetchTopics(String key,
Object value)
|
List<TopicModel> |
fetchTopicsByProperty(String propUri,
Object propValue)
|
List<TopicModel> |
fetchTopicsByPropertyRange(String propUri,
Number from,
Number to)
|
boolean |
hasAssociationProperty(long assocId,
String propUri)
|
boolean |
hasTopicProperty(long topicId,
String propUri)
|
List<TopicModel> |
queryTopics(Object value)
|
List<TopicModel> |
queryTopics(String key,
Object value)
|
boolean |
setupRootNode()
|
void |
shutdown()
|
void |
storeAssociation(AssociationModel assocModel)
|
void |
storeAssociationProperty(long assocId,
String propUri,
Object propValue,
boolean addToIndex)
|
void |
storeAssociationTypeUri(long assocId,
String assocTypeUri)
|
void |
storeAssociationUri(long assocId,
String uri)
|
void |
storeAssociationValue(long assocId,
SimpleValue value,
List<IndexMode> indexModes,
String indexKey,
SimpleValue indexValue)
|
void |
storeRoleTypeUri(long assocId,
long playerId,
String roleTypeUri)
|
void |
storeTopic(TopicModel topicModel)
Stores a rudimentary topic in the DB. |
void |
storeTopicProperty(long topicId,
String propUri,
Object propValue,
boolean addToIndex)
|
void |
storeTopicTypeUri(long topicId,
String topicTypeUri)
|
void |
storeTopicUri(long topicId,
String uri)
|
void |
storeTopicValue(long topicId,
SimpleValue value,
List<IndexMode> indexModes,
String indexKey,
SimpleValue indexValue)
|
fetchTopic
TopicModel fetchTopic(long id)
fetchTopic
TopicModel fetchTopic(String key,
Object value)
fetchTopics
List<TopicModel> fetchTopics(String key,
Object value)
queryTopics
List<TopicModel> queryTopics(Object value)
queryTopics
List<TopicModel> queryTopics(String key,
Object value)
fetchAllTopics
Iterator<TopicModel> fetchAllTopics()
storeTopic
void storeTopic(TopicModel topicModel)
- Stores a rudimentary topic in the DB.
Only the topic URI and the topic type URI are stored.
The topic value (simple or composite) is not stored.
The "Instantiation" association is not stored.
An URI uniqueness check is performed. If the DB already contains a topic or an association with
the URI passed, an exception is thrown and nothing is stored.
- Parameters:
topicModel
- The topic to store. Once the method returns the topic model contains:
- the ID of the stored topic.
- an empty URI ("") in case null
was passed.
- an empty simple value ("") in case null
was passed.
storeTopicUri
void storeTopicUri(long topicId,
String uri)
storeTopicTypeUri
void storeTopicTypeUri(long topicId,
String topicTypeUri)
storeTopicValue
void storeTopicValue(long topicId,
SimpleValue value,
List<IndexMode> indexModes,
String indexKey,
SimpleValue indexValue)
- Parameters:
indexValue
- Optional: the value to be indexed. If indexValue is not specified, value is used.
deleteTopic
void deleteTopic(long topicId)
fetchAssociation
AssociationModel fetchAssociation(long id)
fetchAssociations
List<AssociationModel> fetchAssociations(String assocTypeUri,
long topicId1,
long topicId2,
String roleTypeUri1,
String roleTypeUri2)
fetchAssociationsBetweenTopicAndAssociation
List<AssociationModel> fetchAssociationsBetweenTopicAndAssociation(String assocTypeUri,
long topicId,
long assocId,
String topicRoleTypeUri,
String assocRoleTypeUri)
fetchAllAssociations
Iterator<AssociationModel> fetchAllAssociations()
storeAssociation
void storeAssociation(AssociationModel assocModel)
storeAssociationUri
void storeAssociationUri(long assocId,
String uri)
storeAssociationTypeUri
void storeAssociationTypeUri(long assocId,
String assocTypeUri)
storeAssociationValue
void storeAssociationValue(long assocId,
SimpleValue value,
List<IndexMode> indexModes,
String indexKey,
SimpleValue indexValue)
- Parameters:
indexValue
- Optional: the value to be indexed. If indexValue is not specified, value is used.
storeRoleTypeUri
void storeRoleTypeUri(long assocId,
long playerId,
String roleTypeUri)
deleteAssociation
void deleteAssociation(long assocId)
fetchTopicAssociations
List<AssociationModel> fetchTopicAssociations(long topicId)
fetchAssociationAssociations
List<AssociationModel> fetchAssociationAssociations(long assocId)
fetchTopicRelatedTopics
List<RelatedTopicModel> fetchTopicRelatedTopics(long topicId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
- Parameters:
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be null
fetchTopicRelatedAssociations
List<RelatedAssociationModel> fetchTopicRelatedAssociations(long topicId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
- Parameters:
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be null
fetchAssociationRelatedTopics
List<RelatedTopicModel> fetchAssociationRelatedTopics(long assocId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
- Parameters:
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be null
fetchAssociationRelatedAssociations
List<RelatedAssociationModel> fetchAssociationRelatedAssociations(long assocId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
- Parameters:
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be null
fetchRelatedTopics
List<RelatedTopicModel> fetchRelatedTopics(long id,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
- Parameters:
id
- id of a topic or an associationassocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be null
fetchRelatedAssociations
List<RelatedAssociationModel> fetchRelatedAssociations(long id,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
- Parameters:
id
- id of a topic or an associationassocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be null
fetchTopicProperty
Object fetchTopicProperty(long topicId,
String propUri)
fetchAssociationProperty
Object fetchAssociationProperty(long assocId,
String propUri)
fetchTopicsByProperty
List<TopicModel> fetchTopicsByProperty(String propUri,
Object propValue)
fetchTopicsByPropertyRange
List<TopicModel> fetchTopicsByPropertyRange(String propUri,
Number from,
Number to)
fetchAssociationsByProperty
List<AssociationModel> fetchAssociationsByProperty(String propUri,
Object propValue)
fetchAssociationsByPropertyRange
List<AssociationModel> fetchAssociationsByPropertyRange(String propUri,
Number from,
Number to)
storeTopicProperty
void storeTopicProperty(long topicId,
String propUri,
Object propValue,
boolean addToIndex)
storeAssociationProperty
void storeAssociationProperty(long assocId,
String propUri,
Object propValue,
boolean addToIndex)
hasTopicProperty
boolean hasTopicProperty(long topicId,
String propUri)
hasAssociationProperty
boolean hasAssociationProperty(long assocId,
String propUri)
deleteTopicProperty
void deleteTopicProperty(long topicId,
String propUri)
deleteAssociationProperty
void deleteAssociationProperty(long assocId,
String propUri)
beginTx
DeepaMehtaTransaction beginTx()
setupRootNode
boolean setupRootNode()
shutdown
void shutdown()
Copyright © 2014. All Rights Reserved.