There have been thoughts a long while to make something like this with the
traversal framework, but time has never been allocated to evolve it. I'm
adding stuff to the framework in a side track and will surely add some
aspect of composable traversers also.

2011/7/29 Niels Hoogeveen <pd_aficion...@hotmail.com>

>
> I'd like to take a stab at implementing traversals in the Enhanced API. One
> of the things I'd like to do, is to make traversals composable.
>
> Right now a Traverser is created by either calling the traverse method on
> Node, or to call the traverse(Node) method on TraversalDescription.
>
> This makes traversals inherently non-composable, so we can't define a
> single traversal that returns the parents of all our friends.
>
> To make Traversers composable we need a function:
>
> Traverser traverse(Traverser, TraversalDescription)
>
> My take on it is to make Element (which is a superinterface of Node) into a
> Traverser.
>
> Traverser is basically another name for Iterable<Path>.
>
> Every Node (or more generally every Element) can be seen as an
> Iterabe<Path>, returning a single Path, which contains a single
> path-element, the Node/Element itself.
>
> Composing traversals would entail the concatenation of the paths returned
> with the paths supplied, so when we ask for the parents of all our friends,
> the returned paths would take the form:
>
> Node --FRIEND--> Node --> PARENT --> Node
>
> Niels
>
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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

Reply via email to