Examples of relationships()


Examples of org.neo4j.graphdb.Path.relationships()

            }

            Iterator<Relationship> thisPathIterator =
                    this.relationships().iterator();
            Iterator<Relationship> thatPathIterator =
                    other.relationships().iterator();
            while ( thisPathIterator.hasNext() && thatPathIterator.hasNext() )
            {
                if ( thisPathIterator.hasNext() != thatPathIterator.hasNext() )
                {
                    return false;
View Full Code Here

Examples of org.neo4j.graphdb.Path.relationships()

                    "The nodes of the head and tail must match" );
        }
        Path headPath = source.position(), tailPath = target.position();
        Relationship[] relationships = new Relationship[headPath.length()
                                                        + tailPath.length()];
        Iterator<Relationship> iter = headPath.relationships().iterator();
        for ( int i = 0; iter.hasNext(); i++ )
        {
            relationships[i] = iter.next();
        }
        iter = tailPath.relationships().iterator();
View Full Code Here

Examples of org.neo4j.graphdb.Path.relationships()

        {
            Path other = (Path) obj;
            if ( startNode().equals( other.startNode() ) )
            {
                Iterator<Relationship> these = relationships().iterator();
                Iterator<Relationship> those = other.relationships().iterator();
                while ( these.hasNext() && those.hasNext() )
                {
                    if ( !these.next().equals( those.next() ) )
                    {
                        return false;
View Full Code Here

Examples of org.neo4j.graphdb.Path.relationships()

        {
            assertTrue( "expected more paths (found: " + foundCount + ")", paths.hasNext() );
            Path path = paths.next();
            assertPath( path, nodeA, nodeB, nodeC );

            Iterator<Relationship> relationships = path.relationships().iterator();
            assertTrue( "found shorter path than expected",
                    relationships.hasNext() );
            assertTrue( "path contained unexpected relationship",
                    expectedFirsts.remove( relationships.next() ) );
            assertTrue( "found shorter path than expected",
View Full Code Here

Examples of org.neo4j.graphdb.Path.relationships()

        {
            assertTrue( "expected more paths", paths.hasNext() );
            Path path = paths.next();
            assertPath( path, nodeA, nodeB, nodeC );

            Iterator<Relationship> relationships = path.relationships().iterator();
            assertTrue( "found shorter path than expected",
                    relationships.hasNext() );
            assertTrue( "path contained unexpected relationship",
                    expectedFirsts.remove( relationships.next() ) );
            assertTrue( "found shorter path than expected",
View Full Code Here

Examples of org.neo4j.graphdb.traversal.TraversalDescription.relationships()

    // set rel type and direction
    int numRels = relTypes.size();
    for (int i=0; i<numRels; i++) {
      RelationshipType relType = relTypes.get(i);
      Direction direction = directions.get(i);
      description = description.relationships(relType, direction);
    }

    return description;
  }
View Full Code Here

Examples of org.neo4j.graphdb.traversal.TraversalDescription.relationships()

    int numRels = relTypes.size();
    for(int i=0; i<numRels; i++) {
      RelationshipType relType = relTypes.get(i);
      Direction direction = directions.get(i);
      description = description.relationships(relType, direction);
    }

    return description;
  }
View Full Code Here

Examples of org.neo4j.graphdb.traversal.TraversalDescription.relationships()

            description.breadthFirst().evaluator( Evaluators.all() );
            relTypes.clear();
            for ( DirectedRelationship directedRel : directedRels )
            {
                Direction d = directedRel.hasDirection() ?  directedRel.getDirection() : Direction.BOTH;
                description.relationships( directedRel.getRelType(), d );
                relTypes.add( directedRel.getRelType() );
            }
            for ( Node currentNode : description.traverse( node ).nodes() )
            {
                if ( nodes.size() >= nodeLimit )
View Full Code Here

Examples of org.neo4j.graphdb.traversal.Traverser.relationships()

    @Test
    public void relationshipsIteratorReturnAllNodes() throws Exception
    {
        Traverser traverser = Traversal.description().traverse( referenceNode() );
        int count = 0;
        for ( Relationship relationship : traverser.relationships() )
        {
            assertNotNull(
                    "returned relationships should not be. relationship #"
                            + count, relationship );
            count++;
View Full Code Here

Examples of org.neo4j.rest.graphdb.traversal.RestTraversal.relationships()

                break;
        }
        // writing down relations
        while (!entries.isEmpty()) {
            Object[] entry = entries.pop();
            rt.relationships((RelationshipType) entry[0], (Direction) entry[1]);
        }
        return rt;
    }

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.