use of org.neo4j.graphdb.traversal.TraversalDescription in project neo4j by neo4j.
the class TraversalDescriptionBuilder method from.
public TraversalDescription from(Map<String, Object> description) {
try {
TraversalDescription result = new MonoDirectionalTraversalDescription();
result = describeOrder(result, description);
result = describeUniqueness(result, description);
result = describeExpander(result, description);
result = describePruneEvaluator(result, description);
result = describeReturnFilter(result, description);
return result;
} catch (NoClassDefFoundError e) {
// the backported javax.script jar file(s) on the classpath.
throw new EvaluationException(e);
}
}
use of org.neo4j.graphdb.traversal.TraversalDescription in project neo4j by neo4j.
the class DatabaseActions method traverse.
// Traversal
public ListRepresentation traverse(long startNode, Map<String, Object> description, final TraverserReturnType returnType) {
Node node = graphDb.getNodeById(startNode);
TraversalDescription traversalDescription = traversalDescriptionBuilder.from(description);
final Iterable<Path> paths = traversalDescription.traverse(node);
return toListPathRepresentation(paths, returnType);
}
Aggregations