[Neo] Change sugestions

Tobias Ivarsson thobes at gmail.com
Tue Apr 10 19:18:12 CEST 2007


With all the traffic I've been generating on this list today I might as well
continue, now that I've got the momentum.

As seen from my previous posts I am having some problems with the Traverser.
Most of those problems seem to originate from JPype, but some of them are
things that I think need to be changed:
* It should be possible to "reuse" a traverser-object.
I think it is quite silly that the traverser returns itself as its iterator,
it would be better if it returned some other object that held the state of
the traversion so that the same traversion could be performed multiple
times, without the need to create a new traverser.
This might mean that the currentPosition method have to move, and perhaps
that the iterator would return something other than Node, TraversalPosition

* AbstractTraverser.currentPosition() should return
org.neo4j.api.core.TraversalPosition, not
This migh not be a big deal, but if this was changed I could probably make
neo4j.py work useing the AbstractTraverser.nextNode() method. While this
might not be a stable solution in the long run, it would be enough to let
people start playing with it.
This change is in a bit of a conflict with the above change though.

Further changes I would find nice:

* Add more traverse orders. I miss the ability to specify if the depth first
traversal should traverse the nodes pre-order or post-order.

* Add an easier way to do other kinds of traversals. I would like to have
some traverser that gave me all the nodes in a specific path. Both in normal
and reversed order (this actually translates to pre-order / post-order).
This could perhaps be implemented in a higher level. But it would be


More information about the User mailing list