Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Path


   
    @Test
    public void testSingle()
    {
        PathFinder<Path> finder = newFinder();
        Path path = finder.findSinglePath( graph.getNode( "SOURCE" ), graph.getNode( "TARGET" ) );
        assertNotNull( path );
        assertPathDef( path, "SOURCE", "z", "9", "0", "TARGET" );
    }
View Full Code Here


    }
   
    @Test
    public void testPathIterator()
    {
        Path path = Traversal.description().evaluator( Evaluators.atDepth( 4 ) ).traverse(
                referenceNode() ).iterator().next();
       
        assertPathIsCorrect( path );
    }
View Full Code Here

    public List<?> getBaconPath(final Actor actor) {
        if (actor == null) throw new IllegalArgumentException("Null actor");

        Actor bacon = actorRepository.findByPropertyValue("name", "Bacon, Kevin");

        Path path = GraphAlgoFactory.shortestPath(StandardExpander.DEFAULT.add(RelTypes.ACTS_IN), 10).findSinglePath(bacon.getPersistentState(), actor.getPersistentState());
        if (path==null) return Collections.emptyList();
        return convertNodesToActorsAndMovies(path);
    }
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.Path

Copyright © 2018 www.massapicom. 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.