|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.deepamehta.storage.neo4j.Neo4jStorage
public class Neo4jStorage
| Field Summary | |
|---|---|
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
assocContentExact
|
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
assocContentFulltext
|
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
assocMetadata
|
private static String |
KEY_ASSOC_ID
|
private static String |
KEY_ASSOC_TPYE_URI
|
private static String |
KEY_FULLTEXT
|
private static String |
KEY_NODE_TYPE
|
private static String |
KEY_PLAYER_ID
|
private static String |
KEY_PLAYER_TPYE
|
private static String |
KEY_PLAYER_TYPE_URI
|
private static String |
KEY_ROLE_TPYE_URI
|
private static String |
KEY_TPYE_URI
|
private static String |
KEY_URI
|
private static String |
KEY_VALUE
|
private Logger |
logger
|
(package private) org.neo4j.graphdb.GraphDatabaseService |
neo4j
|
private RelationtypeCache |
relTypeCache
|
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
topicContentExact
|
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
topicContentFulltext
|
| Constructor Summary | |
|---|---|
Neo4jStorage(String databasePath)
|
|
| Method Summary | |
|---|---|
private void |
addRole(org.apache.lucene.search.BooleanQuery query,
int pos,
String roleTypeUri,
NodeType playerType,
long playerId,
String playerTypeUri)
|
private void |
addTermQuery(String key,
long value,
org.apache.lucene.search.BooleanQuery query)
|
private void |
addTermQuery(String key,
NodeType nodeType,
org.apache.lucene.search.BooleanQuery query)
|
private void |
addTermQuery(String key,
String value,
org.apache.lucene.search.BooleanQuery query)
|
DeepaMehtaTransaction |
beginTx()
|
(package private) AssociationModel |
buildAssociation(org.neo4j.graphdb.Node assocNode)
|
private org.apache.lucene.search.Query |
buildAssociationQuery(String assocTypeUri,
String roleTypeUri1,
NodeType playerType1,
long playerId1,
String playerTypeUri1,
String roleTypeUri2,
NodeType playerType2,
long playerId2,
String playerTypeUri2)
|
private List<AssociationModel> |
buildAssociations(Iterable<org.neo4j.graphdb.Node> assocNodes)
|
private org.neo4j.index.lucene.QueryContext |
buildNumericRangeQuery(String propUri,
Number from,
Number to)
|
private List<RelatedAssociationModel> |
buildRelatedAssociations(List<AssociationModel> assocs,
long playerId)
|
private List<RelatedTopicModel> |
buildRelatedTopics(List<AssociationModel> assocs,
long playerId)
|
private List<RoleModel> |
buildRoleModels(org.neo4j.graphdb.Node assocNode)
|
(package private) TopicModel |
buildTopic(org.neo4j.graphdb.Node topicNode)
|
private List<TopicModel> |
buildTopics(Iterable<org.neo4j.graphdb.Node> topicNodes)
|
private org.neo4j.graphdb.Node |
checkType(org.neo4j.graphdb.Node node,
NodeType type)
|
private void |
checkUriUniqueness(String uri)
Checks if a topic or an association with the given URI exists in the DB, and throws an exception if so. |
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
createExactIndex(String name)
|
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> |
createFulltextIndex(String name)
|
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)
|
private org.neo4j.graphdb.Node |
fetchAssociationNode(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)
|
private List<AssociationModel> |
fetchAssociations(org.neo4j.graphdb.Node node)
Fetches all associations the given topic or association is involved in. |
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)
|
private org.neo4j.graphdb.Node |
fetchNode(long id)
|
private org.neo4j.graphdb.Node |
fetchPlayerNode(RoleModel roleModel)
|
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)
|
private org.neo4j.graphdb.Relationship |
fetchRelationship(org.neo4j.graphdb.Node assocNode,
long playerId)
|
private List<org.neo4j.graphdb.Relationship> |
fetchRelationships(org.neo4j.graphdb.Node assocNode)
|
TopicModel |
fetchTopic(long topicId)
|
TopicModel |
fetchTopic(String key,
Object value)
|
List<AssociationModel> |
fetchTopicAssociations(long topicId)
|
private org.neo4j.graphdb.Node |
fetchTopicNode(long topicId)
|
private org.neo4j.graphdb.Node |
fetchTopicNodeByUri(String uri)
|
private org.neo4j.graphdb.Node |
fetchTopicPlayerNode(TopicRoleModel roleModel)
|
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)
|
Object |
getDatabaseVendorObject()
|
Object |
getDatabaseVendorObject(long objectId)
|
private Object |
getIndexValue(SimpleValue value,
SimpleValue indexValue)
|
private org.neo4j.graphdb.RelationshipType |
getRelationshipType(String typeName)
|
boolean |
hasAssociationProperty(long assocId,
String propUri)
|
boolean |
hasTopicProperty(long topicId,
String propUri)
|
private void |
indexAssociation(org.neo4j.graphdb.Node assocNode,
String roleTypeUri1,
org.neo4j.graphdb.Node playerNode1,
String roleTypeUri2,
org.neo4j.graphdb.Node playerNode2)
|
private void |
indexAssociationId(org.neo4j.graphdb.Node assocNode)
|
private void |
indexAssociationNodeValue(org.neo4j.graphdb.Node assocNode,
List<IndexMode> indexModes,
String indexKey,
Object indexValue)
|
private void |
indexAssociationRole(org.neo4j.graphdb.Node assocNode,
int pos,
String roleTypeUri,
org.neo4j.graphdb.Node playerNode)
|
private void |
indexAssociationRoleType(org.neo4j.graphdb.Node assocNode,
long playerId,
String roleTypeUri)
|
private void |
indexAssociationType(org.neo4j.graphdb.Node assocNode,
String assocTypeUri)
|
void |
indexAssociationValue(long assocId,
IndexMode indexMode,
String indexKey,
SimpleValue indexValue)
|
private void |
indexNodeValue(org.neo4j.graphdb.Node node,
Object value,
List<IndexMode> indexModes,
String indexKey,
org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> exactIndex,
org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> fulltextIndex)
|
private void |
indexTopicNodeValue(org.neo4j.graphdb.Node topicNode,
List<IndexMode> indexModes,
String indexKey,
Object indexValue)
|
void |
indexTopicValue(long topicId,
IndexMode indexMode,
String indexKey,
SimpleValue indexValue)
|
private boolean |
isPlayerAtPosition(int pos,
long assocId,
long playerId)
|
private org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> |
lookupAssociations(int pos,
org.neo4j.graphdb.Node playerNode)
|
private int |
lookupPlayerPosition(long assocId,
long playerId)
|
private List<AssociationModel> |
queryAssociationIndex(String assocTypeUri,
String roleTypeUri1,
NodeType playerType1,
long playerId1,
String playerTypeUri1,
String roleTypeUri2,
NodeType playerType2,
long playerId2,
String playerTypeUri2)
|
private org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> |
queryIndexByProperty(org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> index,
String propUri,
Object propValue)
|
private org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> |
queryIndexByPropertyRange(org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> index,
String propUri,
Number from,
Number to)
|
List<TopicModel> |
queryTopics(Object value)
|
List<TopicModel> |
queryTopics(String key,
Object value)
|
private void |
reindexTypeUri(int pos,
org.neo4j.graphdb.Node playerNode,
String typeUri)
Re-indexes the KEY_PLAYER_TYPE_URI of all associations in which the specified node is a player at the specified position. |
private void |
reindexTypeUri(org.neo4j.graphdb.Node playerNode,
String typeUri)
|
private void |
reindexValue(org.neo4j.graphdb.Node assocNode,
String key,
int pos,
String value)
|
private void |
reindexValue(org.neo4j.graphdb.Node assocNode,
String key,
String value)
|
private void |
removeAssociationFromIndex(org.neo4j.graphdb.Node assocNode)
|
private void |
removeAssociationPropertyFromIndex(org.neo4j.graphdb.Node assocNode,
String propUri)
|
private void |
removeTopicFromIndex(org.neo4j.graphdb.Node topicNode)
|
private void |
removeTopicPropertyFromIndex(org.neo4j.graphdb.Node topicNode,
String propUri)
|
private void |
setDefaults(DeepaMehtaObjectModel model)
|
boolean |
setupRootNode()
|
void |
shutdown()
|
private SimpleValue |
simpleValue(org.neo4j.graphdb.Node node)
|
private void |
storeAndIndexAssociationTypeUri(org.neo4j.graphdb.Node assocNode,
String assocTypeUri)
|
private void |
storeAndIndexAssociationUri(org.neo4j.graphdb.Node assocNode,
String uri)
|
private void |
storeAndIndexExactValue(org.neo4j.graphdb.Node node,
String key,
Object value,
org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> exactIndex)
Stores a node value under the specified key and adds the value to the specified index (under the same key). |
private void |
storeAndIndexTopicTypeUri(org.neo4j.graphdb.Node topicNode,
String topicTypeUri)
|
private void |
storeAndIndexTopicUri(org.neo4j.graphdb.Node topicNode,
String uri)
|
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. |
private org.neo4j.graphdb.Node |
storePlayerRelationship(org.neo4j.graphdb.Node assocNode,
RoleModel roleModel)
|
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. |
private String |
typeUri(org.neo4j.graphdb.Node node)
|
private String |
uri(org.neo4j.graphdb.Node node)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String KEY_NODE_TYPE
private static final String KEY_VALUE
private static final String KEY_URI
private static final String KEY_TPYE_URI
private static final String KEY_FULLTEXT
private static final String KEY_ASSOC_ID
private static final String KEY_ASSOC_TPYE_URI
private static final String KEY_ROLE_TPYE_URI
private static final String KEY_PLAYER_TPYE
private static final String KEY_PLAYER_ID
private static final String KEY_PLAYER_TYPE_URI
org.neo4j.graphdb.GraphDatabaseService neo4j
private RelationtypeCache relTypeCache
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> topicContentExact
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> topicContentFulltext
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> assocContentExact
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> assocContentFulltext
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> assocMetadata
private final Logger logger
| Constructor Detail |
|---|
Neo4jStorage(String databasePath)
| Method Detail |
|---|
public TopicModel fetchTopic(long topicId)
fetchTopic in interface DeepaMehtaStorage
public TopicModel fetchTopic(String key,
Object value)
fetchTopic in interface DeepaMehtaStorage
public List<TopicModel> fetchTopics(String key,
Object value)
fetchTopics in interface DeepaMehtaStoragepublic List<TopicModel> queryTopics(Object value)
queryTopics in interface DeepaMehtaStorage
public List<TopicModel> queryTopics(String key,
Object value)
queryTopics in interface DeepaMehtaStoragepublic Iterator<TopicModel> fetchAllTopics()
fetchAllTopics in interface DeepaMehtaStoragepublic void storeTopic(TopicModel topicModel)
DeepaMehtaStorageOnly 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.
storeTopic in interface DeepaMehtaStoragetopicModel - 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.
public void storeTopicUri(long topicId,
String uri)
storeTopicUri in interface DeepaMehtaStorage
public void storeTopicTypeUri(long topicId,
String topicTypeUri)
storeTopicTypeUri in interface DeepaMehtaStorage
public void storeTopicValue(long topicId,
SimpleValue value,
List<IndexMode> indexModes,
String indexKey,
SimpleValue indexValue)
DeepaMehtaStorage
storeTopicValue in interface DeepaMehtaStorageindexValue - Optional: the value to be indexed. If indexValue is not specified, value is used.
public void indexTopicValue(long topicId,
IndexMode indexMode,
String indexKey,
SimpleValue indexValue)
indexTopicValue in interface DeepaMehtaStoragepublic void deleteTopic(long topicId)
deleteTopic in interface DeepaMehtaStoragepublic AssociationModel fetchAssociation(long assocId)
fetchAssociation in interface DeepaMehtaStorage
public List<AssociationModel> fetchAssociations(String assocTypeUri,
long topicId1,
long topicId2,
String roleTypeUri1,
String roleTypeUri2)
fetchAssociations in interface DeepaMehtaStorage
public List<AssociationModel> fetchAssociationsBetweenTopicAndAssociation(String assocTypeUri,
long topicId,
long assocId,
String topicRoleTypeUri,
String assocRoleTypeUri)
fetchAssociationsBetweenTopicAndAssociation in interface DeepaMehtaStoragepublic Iterator<AssociationModel> fetchAllAssociations()
fetchAllAssociations in interface DeepaMehtaStoragepublic void storeAssociation(AssociationModel assocModel)
storeAssociation in interface DeepaMehtaStorage
public void storeAssociationUri(long assocId,
String uri)
storeAssociationUri in interface DeepaMehtaStorage
public void storeAssociationTypeUri(long assocId,
String assocTypeUri)
storeAssociationTypeUri in interface DeepaMehtaStorage
public void storeAssociationValue(long assocId,
SimpleValue value,
List<IndexMode> indexModes,
String indexKey,
SimpleValue indexValue)
DeepaMehtaStorage
storeAssociationValue in interface DeepaMehtaStorageindexValue - Optional: the value to be indexed. If indexValue is not specified, value is used.
public void indexAssociationValue(long assocId,
IndexMode indexMode,
String indexKey,
SimpleValue indexValue)
indexAssociationValue in interface DeepaMehtaStorage
public void storeRoleTypeUri(long assocId,
long playerId,
String roleTypeUri)
storeRoleTypeUri in interface DeepaMehtaStoragepublic void deleteAssociation(long assocId)
deleteAssociation in interface DeepaMehtaStoragepublic List<AssociationModel> fetchTopicAssociations(long topicId)
fetchTopicAssociations in interface DeepaMehtaStoragepublic List<AssociationModel> fetchAssociationAssociations(long assocId)
fetchAssociationAssociations in interface DeepaMehtaStorage
public List<RelatedTopicModel> fetchTopicRelatedTopics(long topicId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
fetchTopicRelatedTopics in interface DeepaMehtaStorageassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be nullothersTopicTypeUri - may be null
public List<RelatedAssociationModel> fetchTopicRelatedAssociations(long topicId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
fetchTopicRelatedAssociations in interface DeepaMehtaStorageassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be null
public List<RelatedTopicModel> fetchAssociationRelatedTopics(long assocId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
fetchAssociationRelatedTopics in interface DeepaMehtaStorageassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be nullothersTopicTypeUri - may be null
public List<RelatedAssociationModel> fetchAssociationRelatedAssociations(long assocId,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
fetchAssociationRelatedAssociations in interface DeepaMehtaStorageassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be null
public List<RelatedTopicModel> fetchRelatedTopics(long id,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
fetchRelatedTopics in interface DeepaMehtaStorageid - id of a topic or an associationassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be nullothersTopicTypeUri - may be null
public List<RelatedAssociationModel> fetchRelatedAssociations(long id,
String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri)
fetchRelatedAssociations in interface DeepaMehtaStorageid - id of a topic or an associationassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be null
public Object fetchTopicProperty(long topicId,
String propUri)
fetchTopicProperty in interface DeepaMehtaStorage
public Object fetchAssociationProperty(long assocId,
String propUri)
fetchAssociationProperty in interface DeepaMehtaStorage
public List<TopicModel> fetchTopicsByProperty(String propUri,
Object propValue)
fetchTopicsByProperty in interface DeepaMehtaStorage
public List<TopicModel> fetchTopicsByPropertyRange(String propUri,
Number from,
Number to)
fetchTopicsByPropertyRange in interface DeepaMehtaStorage
public List<AssociationModel> fetchAssociationsByProperty(String propUri,
Object propValue)
fetchAssociationsByProperty in interface DeepaMehtaStorage
public List<AssociationModel> fetchAssociationsByPropertyRange(String propUri,
Number from,
Number to)
fetchAssociationsByPropertyRange in interface DeepaMehtaStorage
public void storeTopicProperty(long topicId,
String propUri,
Object propValue,
boolean addToIndex)
storeTopicProperty in interface DeepaMehtaStorage
public void storeAssociationProperty(long assocId,
String propUri,
Object propValue,
boolean addToIndex)
storeAssociationProperty in interface DeepaMehtaStorage
public boolean hasTopicProperty(long topicId,
String propUri)
hasTopicProperty in interface DeepaMehtaStorage
public boolean hasAssociationProperty(long assocId,
String propUri)
hasAssociationProperty in interface DeepaMehtaStorage
public void deleteTopicProperty(long topicId,
String propUri)
deleteTopicProperty in interface DeepaMehtaStorage
public void deleteAssociationProperty(long assocId,
String propUri)
deleteAssociationProperty in interface DeepaMehtaStoragepublic DeepaMehtaTransaction beginTx()
beginTx in interface DeepaMehtaStoragepublic boolean setupRootNode()
setupRootNode in interface DeepaMehtaStoragepublic void shutdown()
shutdown in interface DeepaMehtaStoragepublic Object getDatabaseVendorObject()
getDatabaseVendorObject in interface DeepaMehtaStoragepublic Object getDatabaseVendorObject(long objectId)
getDatabaseVendorObject in interface DeepaMehtaStorage
private void storeAndIndexTopicUri(org.neo4j.graphdb.Node topicNode,
String uri)
private void storeAndIndexAssociationUri(org.neo4j.graphdb.Node assocNode,
String uri)
private void storeAndIndexTopicTypeUri(org.neo4j.graphdb.Node topicNode,
String topicTypeUri)
private void storeAndIndexAssociationTypeUri(org.neo4j.graphdb.Node assocNode,
String assocTypeUri)
private void storeAndIndexExactValue(org.neo4j.graphdb.Node node,
String key,
Object value,
org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> exactIndex)
IndexMode.KEY is used for indexing.
Used for URIs, type URIs, and properties.
node - a topic node, or an association node.exactIndex - the index to add the value to. If null no indexing is performed.
private void indexTopicNodeValue(org.neo4j.graphdb.Node topicNode,
List<IndexMode> indexModes,
String indexKey,
Object indexValue)
private void indexAssociationNodeValue(org.neo4j.graphdb.Node assocNode,
List<IndexMode> indexModes,
String indexKey,
Object indexValue)
private Object getIndexValue(SimpleValue value,
SimpleValue indexValue)
private void indexNodeValue(org.neo4j.graphdb.Node node,
Object value,
List<IndexMode> indexModes,
String indexKey,
org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> exactIndex,
org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> fulltextIndex)
private void indexAssociation(org.neo4j.graphdb.Node assocNode,
String roleTypeUri1,
org.neo4j.graphdb.Node playerNode1,
String roleTypeUri2,
org.neo4j.graphdb.Node playerNode2)
private void indexAssociationId(org.neo4j.graphdb.Node assocNode)
private void indexAssociationType(org.neo4j.graphdb.Node assocNode,
String assocTypeUri)
private void indexAssociationRole(org.neo4j.graphdb.Node assocNode,
int pos,
String roleTypeUri,
org.neo4j.graphdb.Node playerNode)
private void indexAssociationRoleType(org.neo4j.graphdb.Node assocNode,
long playerId,
String roleTypeUri)
private int lookupPlayerPosition(long assocId,
long playerId)
private boolean isPlayerAtPosition(int pos,
long assocId,
long playerId)
private void reindexTypeUri(org.neo4j.graphdb.Node playerNode,
String typeUri)
private void reindexTypeUri(int pos,
org.neo4j.graphdb.Node playerNode,
String typeUri)
playerNode - a topic node or an association node.typeUri - the new type URI to be indexed for the player node.
private org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> lookupAssociations(int pos,
org.neo4j.graphdb.Node playerNode)
private void reindexValue(org.neo4j.graphdb.Node assocNode,
String key,
int pos,
String value)
private void reindexValue(org.neo4j.graphdb.Node assocNode,
String key,
String value)
private org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> queryIndexByProperty(org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> index,
String propUri,
Object propValue)
private org.neo4j.graphdb.index.IndexHits<org.neo4j.graphdb.Node> queryIndexByPropertyRange(org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> index,
String propUri,
Number from,
Number to)
private List<AssociationModel> queryAssociationIndex(String assocTypeUri,
String roleTypeUri1,
NodeType playerType1,
long playerId1,
String playerTypeUri1,
String roleTypeUri2,
NodeType playerType2,
long playerId2,
String playerTypeUri2)
private org.neo4j.index.lucene.QueryContext buildNumericRangeQuery(String propUri,
Number from,
Number to)
private org.apache.lucene.search.Query buildAssociationQuery(String assocTypeUri,
String roleTypeUri1,
NodeType playerType1,
long playerId1,
String playerTypeUri1,
String roleTypeUri2,
NodeType playerType2,
long playerId2,
String playerTypeUri2)
private void addRole(org.apache.lucene.search.BooleanQuery query,
int pos,
String roleTypeUri,
NodeType playerType,
long playerId,
String playerTypeUri)
private void addTermQuery(String key,
long value,
org.apache.lucene.search.BooleanQuery query)
private void addTermQuery(String key,
NodeType nodeType,
org.apache.lucene.search.BooleanQuery query)
private void addTermQuery(String key,
String value,
org.apache.lucene.search.BooleanQuery query)
private void removeTopicFromIndex(org.neo4j.graphdb.Node topicNode)
private void removeAssociationFromIndex(org.neo4j.graphdb.Node assocNode)
private void removeTopicPropertyFromIndex(org.neo4j.graphdb.Node topicNode,
String propUri)
private void removeAssociationPropertyFromIndex(org.neo4j.graphdb.Node assocNode,
String propUri)
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> createExactIndex(String name)
private org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> createFulltextIndex(String name)
TopicModel buildTopic(org.neo4j.graphdb.Node topicNode)
private List<TopicModel> buildTopics(Iterable<org.neo4j.graphdb.Node> topicNodes)
AssociationModel buildAssociation(org.neo4j.graphdb.Node assocNode)
private List<AssociationModel> buildAssociations(Iterable<org.neo4j.graphdb.Node> assocNodes)
private List<RoleModel> buildRoleModels(org.neo4j.graphdb.Node assocNode)
private org.neo4j.graphdb.Node storePlayerRelationship(org.neo4j.graphdb.Node assocNode,
RoleModel roleModel)
private org.neo4j.graphdb.Node fetchPlayerNode(RoleModel roleModel)
private org.neo4j.graphdb.Node fetchTopicPlayerNode(TopicRoleModel roleModel)
private org.neo4j.graphdb.Relationship fetchRelationship(org.neo4j.graphdb.Node assocNode,
long playerId)
private List<org.neo4j.graphdb.Relationship> fetchRelationships(org.neo4j.graphdb.Node assocNode)
private List<AssociationModel> fetchAssociations(org.neo4j.graphdb.Node node)
node - a topic node or an association node.private org.neo4j.graphdb.Node fetchTopicNode(long topicId)
private org.neo4j.graphdb.Node fetchAssociationNode(long assocId)
private org.neo4j.graphdb.Node fetchNode(long id)
private org.neo4j.graphdb.Node fetchTopicNodeByUri(String uri)
private org.neo4j.graphdb.Node checkType(org.neo4j.graphdb.Node node,
NodeType type)
private org.neo4j.graphdb.RelationshipType getRelationshipType(String typeName)
private String uri(org.neo4j.graphdb.Node node)
private String typeUri(org.neo4j.graphdb.Node node)
private SimpleValue simpleValue(org.neo4j.graphdb.Node node)
private List<RelatedTopicModel> buildRelatedTopics(List<AssociationModel> assocs,
long playerId)
private List<RelatedAssociationModel> buildRelatedAssociations(List<AssociationModel> assocs,
long playerId)
private void setDefaults(DeepaMehtaObjectModel model)
private void checkUriUniqueness(String uri)
uri - The URI to check. Must not be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||