Examples of forRelationships()


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

                    return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forNodes(indexName));
                Index<Node> index = indexManager.forNodes(indexName, indexConfigFor(indexType));
                return (Index<T>) index;
            } else {
                if (indexManager.existsForRelationships(indexName))
                    return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forRelationships(indexName));
                return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(indexType));
            }
        } finally {
            tx.success();tx.close();
        }
View Full Code Here

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

                Index<Node> index = indexManager.forNodes(indexName, indexConfigFor(indexType));
                return (Index<T>) index;
            } else {
                if (indexManager.existsForRelationships(indexName))
                    return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forRelationships(indexName));
                return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(indexType));
            }
        } finally {
            tx.success();tx.close();
        }
    }
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()

        {
            // START SNIPPET: createIndices
            IndexManager index = graphDb.index();
            Index<Node> actors = index.forNodes( "actors" );
            Index<Node> movies = index.forNodes( "movies" );
            RelationshipIndex roles = index.forRelationships( "roles" );
            // END SNIPPET: createIndices

            // START SNIPPET: createNodes
            // Actors
            Node reeves = graphDb.createNode();
View Full Code Here

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

    @Test
    public void doQueriesForRelationships()
    {
        IndexManager index = graphDb.index();
        RelationshipIndex roles = index.forRelationships( "roles" );
        Index<Node> actors = graphDb.index().forNodes( "actors" );
        Index<Node> movies = index.forNodes( "movies" );

        Node reeves = actors.get( "name", "Keanu Reeves" ).getSingle();
        Node theMatrix = movies.get( "title", "The Matrix" ).getSingle();
View Full Code Here

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

        {
            if ( !indexManager.existsForRelationships( indexName ) )
            {
                continue;
            }
            Index<Relationship> relIndex = indexManager.forRelationships( indexName );
            IndexHits<Relationship> hits;
            switch ( search.getMode() )
            {
            case EXACT_MATCH:
                hits = relIndex.get( search.getKey(), search.getValueOrQuery() );
View Full Code Here

Examples of org.neo4j.rest.graphdb.index.RestIndexManager.forRelationships()

    }

    private void removeFromIndexes(Relationship relationship) {
        final RestIndexManager indexManager = index();
        for (String indexName : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(indexName).remove(relationship);
        }
    }
}
View Full Code Here

Examples of org.neo4j.rest.graphdb.index.RestIndexManager.forRelationships()

    }

    private void removeFromIndexes(Relationship relationship) {
        final RestIndexManager indexManager = index();
        for (String indexName : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(indexName).remove(relationship);
        }
    }
}
View Full Code Here

Examples of org.neo4j.rest.graphdb.index.RestIndexManager.forRelationships()

  }
 
  @Test
  public void testIndexForRelationships(){
    RestIndexManager index = (RestIndexManager) getRestGraphDb().index();
         Index<Relationship> testIndex = index.forRelationships("indexName");
         assertTrue(index.existsForRelationships("indexName"));
  }
 
  @Test
  public void testGetIndexForRelationships(){
View Full Code Here

Examples of org.neo4j.rest.graphdb.index.RestIndexManager.forRelationships()

  }
 
  @Test
  public void testGetIndexForRelationships(){
    RestIndexManager index = (RestIndexManager) getRestGraphDb().index();
      Index<Relationship> testIndex = index.forRelationships("indexName");
      Assert.assertEquals(testIndex.getName(), this.restAPI.getIndex("indexName").getName());     
  }
 
  @Test
  public void testCreateRestAPIIndexForRelationships(){   
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.