The entity at this step in the traversal path.
The TraversalPath previous to this one in the traversal, or null if this path represents the root of the traversal.
Appends the given entity to this Traversal Path. This is useful when adding or modifying results such as when using the replace operator. The result of calling this method is that the a new travesal path is created and returned with the given entity as the entity, and this traversal path is the returned traversal paths prev.
the entity to append onto this traversal path
Marks this traversal path as being complete with the given traversal marking the last traversal path in the path.
the last traversal path in the sequence
Returns true if this TraversalPath contains the given entity.
an entity
Determines if the given traversal path is an ancestor of this Traversal path
the traversal to check if it is an ancestor of this Traversalpath.
returns true if the given traversal path is an ancestor.
Returns the traversal path with the given label. This method allows one to pull out labels that were specified in a query.
the label to search for
the number of occurrences of the given label to ignore. This is useful for a query that makes use of repeats as a label in a repeat can occur many times.
graph.query('movie','edge', 'movie:m', 'edge', 'movie')
.execute()
.onresult(function(path) {
var moviePath = path.labeled('m');
if (moviePath) {
console.log('movie in middle is: ' + moviePath.entity);
}
});
Returns the TraversalPath that was at the root of this traversal.
the TraversalPath that was at the root of this traversal.
Returns this traversal path as an array
Call a function once for every value in this Iterable
optional value to use as "this" when calling the callback