TraversalDescription description = gsm.isRemote() ? RestTraversal.description().maxDepth( depth ) : Traversal.description().evaluator( Evaluators.toDepth( depth ) );
description.breadthFirst().evaluator( Evaluators.all() );
relTypes.clear();
for ( DirectedRelationship directedRel : directedRels )
{
Direction d = directedRel.hasDirection() ? directedRel.getDirection() : Direction.BOTH;
description.relationships( directedRel.getRelType(), d );
relTypes.add( directedRel.getRelType() );
}
for ( Node currentNode : description.traverse( node ).nodes() )
{