I'd do something like this:

        Iterator<Relationship> allRels = new NestingIterator<Relationship,
Node>( db.getAllNodes() )
        {
            @Override
            protected Iterator<Relationship> createNestedIterator( Node item
)
            {
                return item.getRelationships( Direction.OUTGOING
).iterator();
            }
        };

There's a NestingIterable also if an Iterable<Relationship> is desired.

2011/2/19 Jose Angel Inda Herrera <[email protected]>

> hello list,
> how can i get all relationship of my graph, as iterator,
> thank beforehand.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [[email protected]]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to