Examples of OrderedByTypeExpander


Examples of org.neo4j.kernel.OrderedByTypeExpander

                        return Evaluation.INCLUDE_AND_PRUNE;
                    }

                    return Evaluation.EXCLUDE_AND_CONTINUE;
                }
            }).expand((RelationshipExpander) new OrderedByTypeExpander()
                        .add(OSMRelation.FIRST_NODE, Direction.OUTGOING)
                        .add(OSMRelation.NEXT, Direction.OUTGOING)
                        .add(OSMRelation.NODE, Direction.OUTGOING))
        .uniqueness(Uniqueness.NODE_PATH);
   
View Full Code Here

Examples of org.neo4j.kernel.OrderedByTypeExpander

                        + ", found " + direction );
            }
            entries.push( new Object[] { relType, direction } );
        }

        OrderedByTypeExpander expander = new OrderedByTypeExpander();
        while ( !entries.isEmpty() )
        {
            Object[] entry = entries.pop();
            expander = (OrderedByTypeExpander) expander.add(
                    (RelationshipType) entry[0], (Direction) entry[1] );
        }
        return expander;
    }
View Full Code Here

Examples of org.neo4j.kernel.OrderedByTypeExpander

    {
        RelationshipType next = DynamicRelationshipType.withName( "NEXT" );
        RelationshipType firstComment = DynamicRelationshipType.withName( "FIRST_COMMENT" );
        RelationshipType comment = DynamicRelationshipType.withName( "COMMENT" );
        RelationshipExpander expander =
            new OrderedByTypeExpander().add( firstComment ).add( comment ).add( next );
        Iterator<Node> itr = Traversal.description().depthFirst().expand(
                expander ).traverse( referenceNode() ).nodes().iterator();
        assertOrder( itr, "A1", "C1", "C2", "C3", "A2", "C4", "C5", "C6", "A3", "C7", "C8", "C9" );

        expander = new OrderedByTypeExpander().add( next ).add( firstComment ).add( comment );
        itr = Traversal.description().depthFirst().expand(
                expander ).traverse( referenceNode() ).nodes().iterator();
        assertOrder( itr, "A1", "A2", "A3", "C7", "C8", "C9", "C4", "C5", "C6", "C1", "C2", "C3" );
    }
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.