import org.neo4j.graphdb.RelationshipType;
public enum RelationTypes implements RelationshipType
{
EXAMPLE_ROLE ("example.Role"),
EXAMPLE_USER ("example.User");
String name = "dummy";
private RelationTypes(String name)
{
this.name = name;
}
public String getName() {
return name;
}
}
Then, in the traversal, you specify RelationshipType/Direction pairs
to be traversed, like this:
refNode.traverse(
Traverser.Order.DEPTH_FIRST,
StopEvaluator.END_OF_GRAPH,
ReturnableEvaluator.ALL,
RelationTypes.EXAMPLE_USER,
Direction.OUTGOING,
RelationTypes.EXAMPLE_ROLE,
Direction.OUTGOING );
That way, you will get the right Strings returned from the relationship types.
Does that work out better?
Cheers,
/peter neubauer
COO and Sales, Neo Technology
GTalk: neubauer.peter
Skype peter.neubauer
Phone +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer
http://www.neo4j.org - Your high performance graph database.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.