de.deepamehta.core.storage.spi
Interface DeepaMehtaStorage

Show UML class diagram
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 assocId)
           
 List<AssociationModel> fetchAssociationAssociations(long assocId)
           
 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)
           
 DeepaMehtaObjectModel fetchObject(long id)
           
 long[] fetchPlayerIds(long assocId)
           
 Object fetchProperty(long id, String propUri)
           
 List<RelatedAssociationModel> fetchRelatedAssociations(long objectId, String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
           
 List<RelatedTopicModel> fetchRelatedTopics(long objectId, String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
           
 TopicModel fetchTopic(long topicId)
           
 TopicModel fetchTopic(String key, Object value)
           
 List<AssociationModel> fetchTopicAssociations(long topicId)
           
 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)
           
 Object getDatabaseVendorObject()
           
 Object getDatabaseVendorObject(long objectId)
           
 boolean hasProperty(long id, String propUri)
           
 void indexAssociationValue(long assocId, IndexMode indexMode, String indexKey, SimpleValue indexValue)
           
 void indexTopicValue(long topicId, IndexMode indexMode, String indexKey, SimpleValue indexValue)
           
 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)
          Stores and indexes an association value.
 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)
          Stores and indexes a topic value.
 

Method Detail

fetchTopic

TopicModel fetchTopic(long topicId)

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)
Stores and indexes a topic value.

Parameters:
indexValue - Optional: the value to be indexed. If indexValue is not specified, value is used.

indexTopicValue

void indexTopicValue(long topicId,
                     IndexMode indexMode,
                     String indexKey,
                     SimpleValue indexValue)

deleteTopic

void deleteTopic(long topicId)

fetchAssociation

AssociationModel fetchAssociation(long assocId)

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()

fetchPlayerIds

long[] fetchPlayerIds(long assocId)

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)
Stores and indexes an association value.

Parameters:
indexValue - Optional: the value to be indexed. If indexValue is not specified, value is used.

indexAssociationValue

void indexAssociationValue(long assocId,
                           IndexMode indexMode,
                           String indexKey,
                           SimpleValue indexValue)

storeRoleTypeUri

void storeRoleTypeUri(long assocId,
                      long playerId,
                      String roleTypeUri)

deleteAssociation

void deleteAssociation(long assocId)

fetchObject

DeepaMehtaObjectModel fetchObject(long id)

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 null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

fetchTopicRelatedAssociations

List<RelatedAssociationModel> fetchTopicRelatedAssociations(long topicId,
                                                            String assocTypeUri,
                                                            String myRoleTypeUri,
                                                            String othersRoleTypeUri,
                                                            String othersAssocTypeUri)
Parameters:
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

fetchAssociationRelatedTopics

List<RelatedTopicModel> fetchAssociationRelatedTopics(long assocId,
                                                      String assocTypeUri,
                                                      String myRoleTypeUri,
                                                      String othersRoleTypeUri,
                                                      String othersTopicTypeUri)
Parameters:
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

fetchAssociationRelatedAssociations

List<RelatedAssociationModel> fetchAssociationRelatedAssociations(long assocId,
                                                                  String assocTypeUri,
                                                                  String myRoleTypeUri,
                                                                  String othersRoleTypeUri,
                                                                  String othersAssocTypeUri)
Parameters:
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

fetchRelatedTopics

List<RelatedTopicModel> fetchRelatedTopics(long objectId,
                                           String assocTypeUri,
                                           String myRoleTypeUri,
                                           String othersRoleTypeUri,
                                           String othersTopicTypeUri)
Parameters:
objectId - id of a topic or an association
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

fetchRelatedAssociations

List<RelatedAssociationModel> fetchRelatedAssociations(long objectId,
                                                       String assocTypeUri,
                                                       String myRoleTypeUri,
                                                       String othersRoleTypeUri,
                                                       String othersAssocTypeUri)
Parameters:
objectId - id of a topic or an association
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

fetchProperty

Object fetchProperty(long id,
                     String propUri)
Parameters:
id - id of a topic or an association

hasProperty

boolean hasProperty(long id,
                    String propUri)
Parameters:
id - id of a topic or an association

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)

deleteTopicProperty

void deleteTopicProperty(long topicId,
                         String propUri)

deleteAssociationProperty

void deleteAssociationProperty(long assocId,
                               String propUri)

beginTx

DeepaMehtaTransaction beginTx()

setupRootNode

boolean setupRootNode()

shutdown

void shutdown()

getDatabaseVendorObject

Object getDatabaseVendorObject()

getDatabaseVendorObject

Object getDatabaseVendorObject(long objectId)


Copyright © 2015. All Rights Reserved.