Examples of forRelationships()


Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

                return (Index<T>) checkAndGetExistingIndex(indexName, fullText, indexManager.forNodes(indexName));
            return (Index<T>) indexManager.forNodes(indexName, indexConfigFor(fullText));
        } else {
            if (indexManager.existsForRelationships(indexName))
                return (Index<T>) checkAndGetExistingIndex(indexName, fullText, indexManager.forRelationships(indexName));
            return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(fullText));
        }
    }

    public boolean isNode(Class<? extends PropertyContainer> type) {
        if (type.equals(Node.class)) return true;
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

        IndexManager indexManager = gds.index();
        for (String ix : indexManager.nodeIndexNames()) {
            indexManager.forNodes(ix).delete();
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(ix).delete();
        }
    }
}
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

        result.put("relationship-indexes", Arrays.asList(indexManager.relationshipIndexNames()));
        for (String ix : indexManager.nodeIndexNames()) {
            indexManager.forNodes(ix).delete();
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(ix).delete();
        }
    }
}
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

        result.put("relationship-indexes", Arrays.asList(indexManager.relationshipIndexNames()));
        for (String ix : indexManager.nodeIndexNames()) {
            deleteIndex(indexManager.forNodes(ix));
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            deleteIndex(indexManager.forRelationships(ix));
        }
    }

    private void deleteIndex(Index index) {
        try {
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

        result.put("relationship-indexes", Arrays.asList(indexManager.relationshipIndexNames()));
        for (String ix : indexManager.nodeIndexNames()) {
            indexManager.forNodes(ix).delete();
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(ix).delete();
        }
    }
}
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

  }
 
  @Test
  public void testGetIndexByIndexForRelationshipsCreationViaRestAPI(){
    IndexManager index = getRestGraphDb().index();
      Index<Relationship> testIndex = index.forRelationships("indexName");
      Assert.assertEquals(testIndex.getName(), this.restAPI.getIndex("indexName").getName());
  }
 
  @Test
  public void testCreateIndexWithSameNameButDifferentType(){
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

        result.put("relationship-indexes", Arrays.asList(indexManager.relationshipIndexNames()));
        for (String ix : indexManager.nodeIndexNames()) {
            indexManager.forNodes(ix).delete();
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(ix).delete();
        }
    }
}
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

                log.warn("Cannot delete node index "+ix+" "+e.getMessage());
            }
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            try {
                RelationshipIndex relationshipIndex = indexManager.forRelationships(ix);
                if (relationshipIndex.isWriteable()) relationshipIndex.delete();
            } catch(Exception e) {
                log.warn("Cannot delete relationship index "+ix+" "+e.getMessage());
            }
        }
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

    }

    private void removeFromIndexes(Relationship relationship) {
        final IndexManager indexManager = delegate.index();
        for (String indexName : indexManager.relationshipIndexNames()) {
            RelationshipIndex relationshipIndex = indexManager.forRelationships(indexName);
            if (relationshipIndex.isWriteable()) relationshipIndex.remove(relationship);
        }
    }

    @Override
View Full Code Here

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()

    @SuppressWarnings("unchecked")
    @Override
    public <T extends PropertyContainer> Index<T> getIndex(String indexName) {
        IndexManager indexManager = delegate.index();
        if (indexManager.existsForNodes(indexName)) return (Index<T>) indexManager.forNodes(indexName);
        if (indexManager.existsForRelationships(indexName)) return (Index<T>) indexManager.forRelationships(indexName);
        throw new NoSuchIndexException(indexName);
    }

    // TODO handle existing indexes
    @SuppressWarnings("unchecked")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.