@Test public void testExactIndexWithQuery() { List<TopicModelImpl> topics; topics = db.queryTopics("uri", "dm?.core.topic_type"); assertEquals(1, topics.size()); topics = db.queryTopics("uri", "*.core.topic_type"); assertEquals(1, topics.size()); topics = db.queryTopics("uri", "dmx.core.*"); assertEquals(2, topics.size()); topics = db.queryTopics("uri", "dmx.*.*"); assertEquals(2, topics.size()); topics = db.queryTopics("uri", "dmx.*.*_type"); assertEquals(2, topics.size()); }
@Override public List<TopicModelImpl> queryTopics(String key, Object value) { return buildTopics(topicIndex.query(key, value)); }
Neo4jStorage implements DMXStorage { @Override public List<TopicModelImpl> queryTopics(String key, Object value) { return buildTopics(topicIndex.query(key, value)); } }
Neo4jStorage implements DMXStorage { @Override public List<TopicModelImpl> queryTopics(String key, Object value) { return buildTopics(topicIndex.query(key, value)); } Neo4jStorage(String databasePath, ModelFactoryImpl mf); }
Neo4jStorage implements DMXStorage { @Override public List<TopicModelImpl> queryTopics(String key, Object value) { return buildTopics(topicIndex.query(key, value)); } Neo4jStorage(String databasePath, ModelFactoryImpl mf); @Override TopicModelImpl fetchTopic(long topicId); @Override List<TopicModelImpl> fetchTopics(String key, Object value); @Override List<TopicModelImpl> queryTopics(String key, Object value); @Override List<TopicModelImpl> queryTopicsFulltext(String key, Object value); @Override Iterable<TopicModelImpl> fetchAllTopics(); @Override void storeTopic(TopicModelImpl topicModel); @Override void storeTopicUri(long topicId, String uri); @Override void storeTopicTypeUri(long topicId, String topicTypeUri); @Override void storeTopicValue(long topicId, SimpleValue value, String indexKey, boolean isHtmlValue); @Override void deleteTopic(long topicId); @Override AssocModelImpl fetchAssoc(long assocId); @Override List<AssocModelImpl> fetchAssocs(String key, Object value); @Override List<AssocModelImpl> queryAssocs(String key, Object value); @Override List<AssocModelImpl> queryAssocsFulltext(String key, Object value); @Override List<AssocModelImpl> fetchAssocs(String assocTypeUri, long topicId1, long topicId2, String roleTypeUri1,
                                                                                               String roleTypeUri2); @Override List<AssocModelImpl> fetchAssocsBetweenTopicAndAssoc(String assocTypeUri, long topicId, long assocId,
                                                                String topicRoleTypeUri, String assocRoleTypeUri); @Override Iterable<AssocModelImpl> fetchAllAssocs(); @Override List<PlayerModel> fetchPlayerModels(long assocId); @Override void storeAssoc(AssocModelImpl assocModel); @Override void storeAssocUri(long assocId, String uri); @Override void storeAssocTypeUri(long assocId, String assocTypeUri); @Override void storeAssocValue(long assocId, SimpleValue value, String indexKey, boolean isHtmlValue); @Override void storeRoleTypeUri(long assocId, long playerId, String roleTypeUri); @Override void deleteAssoc(long assocId); @Override DMXObjectModelImpl fetchObject(long id); @Override List<AssocModelImpl> fetchTopicAssocs(long topicId); @Override List<AssocModelImpl> fetchAssocAssocs(long assocId); @Override List<RelatedTopicModelImpl> fetchTopicRelatedTopics(long topicId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersTopicTypeUri); @Override List<RelatedAssocModelImpl> fetchTopicRelatedAssocs(long topicId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersAssocTypeUri); @Override List<RelatedTopicModelImpl> fetchAssocRelatedTopics(long assocId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersTopicTypeUri); @Override List<RelatedAssocModelImpl> fetchAssocRelatedAssocs(long assocId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersAssocTypeUri); @Override List<M> fetchTopicRelatedObjects(
                                                          long topicId, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersTypeUri); @Override List<M> fetchAssocRelatedObjects(
                                                          long assocId, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersTypeUri); @Override List<RelatedTopicModelImpl> fetchRelatedTopics(long id, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersTopicTypeUri); @Override List<RelatedAssocModelImpl> fetchRelatedAssocs(long id, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersAssocTypeUri); @Override Object fetchProperty(long id, String propUri); @Override boolean hasProperty(long id, String propUri); @Override List<TopicModelImpl> fetchTopicsByProperty(String propUri, Object propValue); @Override List<TopicModelImpl> fetchTopicsByPropertyRange(String propUri, Number from, Number to); @Override List<AssocModelImpl> fetchAssocsByProperty(String propUri, Object propValue); @Override List<AssocModelImpl> fetchAssocsByPropertyRange(String propUri, Number from, Number to); @Override void storeTopicProperty(long topicId, String propUri, Object propValue, boolean addToIndex); @Override void storeAssocProperty(long assocId, String propUri, Object propValue, boolean addToIndex); @Override void indexTopicProperty(long topicId, String propUri, Object propValue); @Override void indexAssocProperty(long assocId, String propUri, Object propValue); @Override void deleteTopicProperty(long topicId, String propUri); @Override void deleteAssocProperty(long assocId, String propUri); @Override DMXTransaction beginTx(); @Override boolean setupRootNode(); @Override void shutdown(); @Override Object getDatabaseVendorObject(); @Override Object getDatabaseVendorObject(long objectId); @Override ModelFactoryImpl getModelFactory(); }
Neo4jStorage implements DMXStorage { @Override public List<TopicModelImpl> queryTopics(String key, Object value) { return buildTopics(topicIndex.query(key, value)); } Neo4jStorage(String databasePath, ModelFactoryImpl mf); @Override TopicModelImpl fetchTopic(long topicId); @Override List<TopicModelImpl> fetchTopics(String key, Object value); @Override List<TopicModelImpl> queryTopics(String key, Object value); @Override List<TopicModelImpl> queryTopicsFulltext(String key, Object value); @Override Iterable<TopicModelImpl> fetchAllTopics(); @Override void storeTopic(TopicModelImpl topicModel); @Override void storeTopicUri(long topicId, String uri); @Override void storeTopicTypeUri(long topicId, String topicTypeUri); @Override void storeTopicValue(long topicId, SimpleValue value, String indexKey, boolean isHtmlValue); @Override void deleteTopic(long topicId); @Override AssocModelImpl fetchAssoc(long assocId); @Override List<AssocModelImpl> fetchAssocs(String key, Object value); @Override List<AssocModelImpl> queryAssocs(String key, Object value); @Override List<AssocModelImpl> queryAssocsFulltext(String key, Object value); @Override List<AssocModelImpl> fetchAssocs(String assocTypeUri, long topicId1, long topicId2, String roleTypeUri1,
                                                                                               String roleTypeUri2); @Override List<AssocModelImpl> fetchAssocsBetweenTopicAndAssoc(String assocTypeUri, long topicId, long assocId,
                                                                String topicRoleTypeUri, String assocRoleTypeUri); @Override Iterable<AssocModelImpl> fetchAllAssocs(); @Override List<PlayerModel> fetchPlayerModels(long assocId); @Override void storeAssoc(AssocModelImpl assocModel); @Override void storeAssocUri(long assocId, String uri); @Override void storeAssocTypeUri(long assocId, String assocTypeUri); @Override void storeAssocValue(long assocId, SimpleValue value, String indexKey, boolean isHtmlValue); @Override void storeRoleTypeUri(long assocId, long playerId, String roleTypeUri); @Override void deleteAssoc(long assocId); @Override DMXObjectModelImpl fetchObject(long id); @Override List<AssocModelImpl> fetchTopicAssocs(long topicId); @Override List<AssocModelImpl> fetchAssocAssocs(long assocId); @Override List<RelatedTopicModelImpl> fetchTopicRelatedTopics(long topicId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersTopicTypeUri); @Override List<RelatedAssocModelImpl> fetchTopicRelatedAssocs(long topicId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersAssocTypeUri); @Override List<RelatedTopicModelImpl> fetchAssocRelatedTopics(long assocId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersTopicTypeUri); @Override List<RelatedAssocModelImpl> fetchAssocRelatedAssocs(long assocId, String assocTypeUri, String myRoleTypeUri,
                                                               String othersRoleTypeUri, String othersAssocTypeUri); @Override List<M> fetchTopicRelatedObjects(
                                                          long topicId, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersTypeUri); @Override List<M> fetchAssocRelatedObjects(
                                                          long assocId, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersTypeUri); @Override List<RelatedTopicModelImpl> fetchRelatedTopics(long id, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersTopicTypeUri); @Override List<RelatedAssocModelImpl> fetchRelatedAssocs(long id, String assocTypeUri, String myRoleTypeUri,
                                                          String othersRoleTypeUri, String othersAssocTypeUri); @Override Object fetchProperty(long id, String propUri); @Override boolean hasProperty(long id, String propUri); @Override List<TopicModelImpl> fetchTopicsByProperty(String propUri, Object propValue); @Override List<TopicModelImpl> fetchTopicsByPropertyRange(String propUri, Number from, Number to); @Override List<AssocModelImpl> fetchAssocsByProperty(String propUri, Object propValue); @Override List<AssocModelImpl> fetchAssocsByPropertyRange(String propUri, Number from, Number to); @Override void storeTopicProperty(long topicId, String propUri, Object propValue, boolean addToIndex); @Override void storeAssocProperty(long assocId, String propUri, Object propValue, boolean addToIndex); @Override void indexTopicProperty(long topicId, String propUri, Object propValue); @Override void indexAssocProperty(long assocId, String propUri, Object propValue); @Override void deleteTopicProperty(long topicId, String propUri); @Override void deleteAssocProperty(long assocId, String propUri); @Override DMXTransaction beginTx(); @Override boolean setupRootNode(); @Override void shutdown(); @Override Object getDatabaseVendorObject(); @Override Object getDatabaseVendorObject(long objectId); @Override ModelFactoryImpl getModelFactory();  }