Esempio n. 1
0
 @SuppressWarnings("deprecation")
 @Override
 public TraversalDescription build(
     Object start, Neo4jPersistentProperty property, String... params) {
   return new TraversalDescriptionImpl()
       .relationships(DynamicRelationshipType.withName(params[0]))
       .filter(Traversal.returnAllButStartNode());
 }
 /**
  * returns a traverser for all nodes that have an outgoing relationship of the type KNOWS
  *
  * @param person the startnode
  * @return the Traverser
  */
 private static Traverser getFriends(final Node person) {
   TraversalDescription td =
       RestTraversal.description()
           .maxDepth(10)
           .breadthFirst()
           .relationships(RelTypes.KNOWS, Direction.OUTGOING)
           .filter(Traversal.returnAllButStartNode());
   return td.traverse(person);
 }