It may be an idea to clarify that in the endNode() javadoc... That in a traversal the end node is the current node the traverser is at, or something like that. If there's one person having troubles figuring it out there's bound to be more.
2010/7/12, Christian Morgner <[email protected]>: > Hi Tobias, > > thank you for the quick answer! > > I should have been aware of the fact that the API may change in SNAPSHOT > versions. :) In this particular case, I was lost because I couldn't work out > the necessary changes on my own, so thank you for providing documentation > and > advice! > > -Christian > > > > Am Montag, 12. Juli 2010, um 14:20:51 schrieb Tobias Ivarsson: >> Hi Christian, >> >> Unfortunately this happens with SNAPSHOT versions sometimes. As an API is >> being worked on there is a chance of it changing between builds. The plan >> for the Traversal API isn't even to have it be final in the upcoming 1.1 >> release, it is included in the 1.1 release so that people can start using >> it and provide feedback on the API design, so that we can make it really >> good when it's finalized in the 1.2 release. And normally in between >> releases (when using SNAPSHOT versions) all things (not really, but >> theoretically) are subject to change. >> >> Now, moving on to this change in particular. After working with the API >> for >> a while (and implementing it three times) it was found that the Position >> interface didn't add any information that the Path interface already >> contained. Thus, since fewer interfaces make for an easier-to-work-with >> API, the Position interface was removed. >> >> The Path object that is supplied to the Predicate-object contains the path >> from where the traversal started to the current position of the traversal. >> The start node is available as path.startNode() and the current position >> of >> the traversal (the one being evaluated by the predicate) is available as >> path.endNode(). Furthermore there is a convenience method for getting the >> relationship used to reach the end node, in the form of >> path.lastRelationship(). In short summary: the node you are asking for is >> path.endNode(). >> >> Cheers, >> Tobias >> >> On Mon, Jul 12, 2010 at 2:00 PM, Christian Morgner < >> >> [email protected]> wrote: >> > Hi guys, >> > >> > unfortunately, the newest 1.1-SNAPSHOT of the Traversal API breaks >> > working code. >> > >> > What are the semantics of Predicate<Path> compared to the previously >> > used >> > Predicate<Position>? >> > >> > In Path, there is no "current position" any more, just an Iterable? How >> > can I >> > determine the node I'm supposed to look at when filtering during >> > traversal? >> > >> > Thanks, >> > Christian >> > _______________________________________________ >> > Neo4j mailing list >> > [email protected] >> > https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > 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

