public interface CredentialTraversal<S,E> extends CredentialTraversalDsl<S,E>
GraphTraversal.Admin<S,E>, GraphTraversal.Symbols
Traversal.Exceptions
BCRYPT_ROUNDS
Modifier and Type | Method and Description |
---|---|
default CredentialTraversal<S,Edge> |
addE(String edgeLabel)
Adds an
Edge with the specified edge label. |
default CredentialTraversal<S,Edge> |
addE(Traversal<?,String> edgeLabelTraversal)
|
default CredentialTraversal<S,Vertex> |
addV()
Adds a
Vertex with a default vertex label. |
default CredentialTraversal<S,Vertex> |
addV(String vertexLabel)
Adds a
Vertex . |
default CredentialTraversal<S,Vertex> |
addV(Traversal<?,String> vertexLabelTraversal)
|
default CredentialTraversal<S,E> |
aggregate(Scope scope,
String sideEffectKey)
Collects objects in a list using the
Scope argument to determine whether it should be lazy
Scope.local or eager (Scope.global while gathering those objects. |
default CredentialTraversal<S,E> |
aggregate(String sideEffectKey)
Eagerly collects objects up to this step into a side-effect.
|
default CredentialTraversal<S,E> |
and(Traversal<?,?>... andTraversals)
Ensures that all of the provided traversals yield a result.
|
default CredentialTraversal<S,E> |
as(String stepLabel,
String... stepLabels)
A step modulator that provides a label to the step that can be accessed later in the traversal by other steps.
|
default CredentialTraversal<S,E> |
barrier()
Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to
the size of the barrier.
|
default CredentialTraversal<S,E> |
barrier(Consumer<TraverserSet<Object>> barrierConsumer)
Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to
the size of the barrier.
|
default CredentialTraversal<S,E> |
barrier(int maxBarrierSize)
Turns the lazy traversal pipeline into a bulk-synchronous pipeline which basically iterates that traversal to
the size of the barrier.
|
default CredentialTraversal<S,Vertex> |
both(String... edgeLabels)
Map the
Vertex to its adjacent vertices given the edge labels. |
default CredentialTraversal<S,Edge> |
bothE(String... edgeLabels)
Map the
Vertex to its incident edges given the edge labels. |
default CredentialTraversal<S,Vertex> |
bothV()
Map the
Edge to its incident vertices. |
default <M,E2> CredentialTraversal<S,E2> |
branch(Function<Traverser<E>,M> function)
Split the
Traverser to all the specified functions. |
default <M,E2> CredentialTraversal<S,E2> |
branch(Traversal<?,M> branchTraversal)
Split the
Traverser to all the specified traversals. |
default CredentialTraversal<S,E> |
by()
The
by() can be applied to a number of different step to alter their behaviors. |
default CredentialTraversal<S,E> |
by(Comparator<E> comparator)
The
by() can be applied to a number of different step to alter their behaviors. |
default <U> CredentialTraversal<S,E> |
by(Function<U,Object> function,
Comparator comparator)
The
by() can be applied to a number of different step to alter their behaviors. |
default <V> CredentialTraversal<S,E> |
by(Function<V,Object> function)
The
by() can be applied to a number of different step to alter their behaviors. |
default CredentialTraversal<S,E> |
by(Order order)
The
by() can be applied to a number of different step to alter their behaviors. |
default CredentialTraversal<S,E> |
by(String key)
The
by() can be applied to a number of different step to alter their behaviors. |
default <V> CredentialTraversal<S,E> |
by(String key,
Comparator<V> comparator)
The
by() can be applied to a number of different step to alter their behaviors. |
default CredentialTraversal<S,E> |
by(T token)
The
by() can be applied to a number of different step to alter their behaviors. |
default CredentialTraversal<S,E> |
by(Traversal<?,?> traversal)
The
by() can be applied to a number of different step to alter their behaviors. |
default <V> CredentialTraversal<S,E> |
by(Traversal<?,?> traversal,
Comparator<V> comparator)
The
by() can be applied to a number of different step to alter their behaviors. |
default <E> CredentialTraversal<S,E> |
call(String service)
Perform the specified service call with no parameters.
|
default <E> CredentialTraversal<S,E> |
call(String service,
Map params)
Perform the specified service call with the specified static parameters.
|
default <E> CredentialTraversal<S,E> |
call(String service,
Map params,
Traversal<?,Map<?,?>> childTraversal)
Perform the specified service call with both static and dynamic parameters produced by the specified child
traversal.
|
default <E> CredentialTraversal<S,E> |
call(String service,
Traversal<?,Map<?,?>> childTraversal)
Perform the specified service call with dynamic parameters produced by the specified child traversal.
|
default <E2> CredentialTraversal<S,E2> |
cap(String sideEffectKey,
String... sideEffectKeys)
Iterates the traversal up to the itself and emits the side-effect referenced by the key.
|
default <M,E2> CredentialTraversal<S,E2> |
choose(Function<E,M> choiceFunction)
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else
like semantics within a traversal.
|
default <E2> CredentialTraversal<S,E2> |
choose(Predicate<E> choosePredicate,
Traversal<?,E2> trueChoice)
Routes the current traverser to a particular traversal branch option which allows the creation of if-then
like semantics within a traversal.
|
default <E2> CredentialTraversal<S,E2> |
choose(Predicate<E> choosePredicate,
Traversal<?,E2> trueChoice,
Traversal<?,E2> falseChoice)
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else
like semantics within a traversal.
|
default <E2> CredentialTraversal<S,E2> |
choose(Traversal<?,?> traversalPredicate,
Traversal<?,E2> trueChoice)
Routes the current traverser to a particular traversal branch option which allows the creation of if-then
like semantics within a traversal.
|
default <E2> CredentialTraversal<S,E2> |
choose(Traversal<?,?> traversalPredicate,
Traversal<?,E2> trueChoice,
Traversal<?,E2> falseChoice)
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else
like semantics within a traversal.
|
default <M,E2> CredentialTraversal<S,E2> |
choose(Traversal<?,M> choiceTraversal)
Routes the current traverser to a particular traversal branch option which allows the creation of if-then-else
like semantics within a traversal.
|
default <E2> CredentialTraversal<S,E2> |
coalesce(Traversal<?,E2>... coalesceTraversals)
Evaluates the provided traversals and returns the result of the first traversal to emit at least one object.
|
default CredentialTraversal<S,E> |
coin(double probability)
Filter the
E object given a biased coin toss. |
default CredentialTraversal<S,E> |
connectedComponent()
Executes a Connected Component algorithm over the graph.
|
default <E2> CredentialTraversal<S,E2> |
constant(E2 e)
Map any object to a fixed
E value. |
default CredentialTraversal<S,Long> |
count()
Map the traversal stream to its reduction as a sum of the
Traverser.bulk() values (i.e. |
default CredentialTraversal<S,Long> |
count(Scope scope)
Map the traversal stream to its reduction as a sum of the
Traverser.bulk() values given the specified
Scope (i.e. |
default CredentialTraversal<S,E> |
cyclicPath()
|
default CredentialTraversal<S,E> |
dedup(Scope scope,
String... dedupLabels)
Remove all duplicates in the traversal stream up to this point.
|
default CredentialTraversal<S,E> |
dedup(String... dedupLabels)
Remove all duplicates in the traversal stream up to this point.
|
default CredentialTraversal<S,E> |
drop()
Removes elements and properties from the graph.
|
default CredentialTraversal<S,Element> |
element()
|
default <E2> CredentialTraversal<S,Map<Object,E2>> |
elementMap(String... propertyKeys)
|
default CredentialTraversal<S,E> |
emit()
Emit is used in conjunction with
GraphTraversal.repeat(Traversal) to emit all objects from the loop. |
default CredentialTraversal<S,E> |
emit(Predicate<Traverser<E>> emitPredicate)
Emit is used in conjunction with
GraphTraversal.repeat(Traversal) to determine what objects get emit from the loop. |
default CredentialTraversal<S,E> |
emit(Traversal<?,?> emitTraversal)
Emit is used in conjunction with
GraphTraversal.repeat(Traversal) to determine what objects get emit from the loop. |
default CredentialTraversal<S,E> |
fail()
When triggered, immediately throws a
RuntimeException which implements the Failure interface. |
default CredentialTraversal<S,E> |
fail(String message)
When triggered, immediately throws a
RuntimeException which implements the Failure interface. |
default CredentialTraversal<S,E> |
filter(Predicate<Traverser<E>> predicate)
Map the
Traverser to either true or false , where false will not pass the
traverser to the next step. |
default CredentialTraversal<S,E> |
filter(Traversal<?,?> filterTraversal)
Map the
Traverser to either true or false , where false will not pass the
traverser to the next step. |
default <E2> CredentialTraversal<S,E2> |
flatMap(Function<Traverser<E>,Iterator<E2>> function)
|
default <E2> CredentialTraversal<S,E2> |
flatMap(Traversal<?,E2> flatMapTraversal)
|
default CredentialTraversal<S,List<E>> |
fold()
Rolls up objects in the stream into an aggregate list.
|
default <E2> CredentialTraversal<S,E2> |
fold(E2 seed,
BiFunction<E2,E,E2> foldFunction)
Rolls up objects in the stream into an aggregate value as defined by a
seed and BiFunction . |
default CredentialTraversal<S,E> |
from(String fromStepLabel)
Provide
from() -modulation to respective steps. |
default CredentialTraversal<S,E> |
from(Traversal<?,Vertex> fromVertex)
When used as a modifier to
GraphTraversal.addE(String) this method specifies the traversal to use for selecting the
outgoing vertex of the newly added Edge . |
default CredentialTraversal<S,E> |
from(Vertex fromVertex)
When used as a modifier to
GraphTraversal.addE(String) this method specifies the traversal to use for selecting the
outgoing vertex of the newly added Edge . |
default <K,V> CredentialTraversal<S,Map<K,V>> |
group()
Organize objects in the stream into a
Map . |
default CredentialTraversal<S,E> |
group(String sideEffectKey)
Organize objects in the stream into a
Map . |
default <K> CredentialTraversal<S,Map<K,Long>> |
groupCount()
Counts the number of times a particular objects has been part of a traversal, returning a
Map where the
object is the key and the value is the count. |
default CredentialTraversal<S,E> |
groupCount(String sideEffectKey)
Counts the number of times a particular objects has been part of a traversal, returning a
Map where the
object is the key and the value is the count. |
default CredentialTraversal<S,E> |
has(String propertyKey)
Filters vertices, edges and vertex properties based on the existence of properties.
|
default CredentialTraversal<S,E> |
has(String propertyKey,
Object value)
Filters vertices, edges and vertex properties based on their properties.
|
default CredentialTraversal<S,E> |
has(String propertyKey,
P<?> predicate)
Filters vertices, edges and vertex properties based on their properties.
|
default CredentialTraversal<S,E> |
has(String label,
String propertyKey,
Object value)
Filters vertices, edges and vertex properties based on their properties.
|
default CredentialTraversal<S,E> |
has(String label,
String propertyKey,
P<?> predicate)
Filters vertices, edges and vertex properties based on their properties.
|
default CredentialTraversal<S,E> |
has(String propertyKey,
Traversal<?,?> propertyTraversal)
Filters vertices, edges and vertex properties based on the value of the specified property key.
|
default CredentialTraversal<S,E> |
has(T accessor,
Object value)
Filters vertices, edges and vertex properties based on their properties.
|
default CredentialTraversal<S,E> |
has(T accessor,
P<?> predicate)
Filters vertices, edges and vertex properties based on their properties.
|
default CredentialTraversal<S,E> |
has(T accessor,
Traversal<?,?> propertyTraversal)
|
default CredentialTraversal<S,E> |
hasId(Object id,
Object... otherIds)
Filters vertices, edges and vertex properties based on their identifier.
|
default CredentialTraversal<S,E> |
hasId(P<Object> predicate)
Filters vertices, edges and vertex properties based on their identifier.
|
default CredentialTraversal<S,E> |
hasKey(P<String> predicate)
Filters
Property objects based on their key. |
default CredentialTraversal<S,E> |
hasKey(String label,
String... otherLabels)
Filters
Property objects based on their key. |
default CredentialTraversal<S,E> |
hasLabel(P<String> predicate)
Filters vertices, edges and vertex properties based on their label.
|
default CredentialTraversal<S,E> |
hasLabel(String label,
String... otherLabels)
Filters vertices, edges and vertex properties based on their label.
|
default CredentialTraversal<S,E> |
hasNot(String propertyKey)
Filters vertices, edges and vertex properties based on the non-existence of properties.
|
default CredentialTraversal<S,E> |
hasValue(Object value,
Object... otherValues)
Filters
Property objects based on their value. |
default CredentialTraversal<S,E> |
hasValue(P<Object> predicate)
Filters
Property objects based on their value.Note that calling this step with null is the same
as calling GraphTraversal.hasValue(Object, Object...) with a single null . |
default CredentialTraversal<S,Object> |
id()
Map the
Element to its Element.id() . |
default CredentialTraversal<S,E> |
identity()
Map the
E object to itself. |
default CredentialTraversal<S,Vertex> |
in(String... edgeLabels)
Map the
Vertex to its incoming adjacent vertices given the edge labels. |
default <E2> CredentialTraversal<S,E2> |
index()
Indexes all items of the current collection.
|
default CredentialTraversal<S,Edge> |
inE(String... edgeLabels)
Map the
Vertex to its incoming incident edges given the edge labels. |
default CredentialTraversal<S,E> |
inject(E... injections)
Provides a way to add arbitrary objects to a traversal stream.
|
default CredentialTraversal<S,Vertex> |
inV()
|
default CredentialTraversal<S,E> |
is(Object value)
Filter the
E object if it is not P.eq(V) to the provided value. |
default CredentialTraversal<S,E> |
is(P<E> predicate)
Filters
E object values given the provided predicate . |
default CredentialTraversal<S,E> |
iterate()
Iterate all the
Traverser instances in the traversal. |
default CredentialTraversal<S,String> |
key()
Map the
Property to its Property.key() . |
default CredentialTraversal<S,String> |
label()
Map the
Element to its Element.label() . |
default CredentialTraversal<S,E> |
limit(long limit)
Filter the objects in the traversal by the number of them to pass through the stream, where only the first
n objects are allowed as defined by the limit argument. |
default <E2> CredentialTraversal<S,E2> |
limit(Scope scope,
long limit)
Filter the objects in the traversal by the number of them to pass through the stream given the
Scope ,
where only the first n objects are allowed as defined by the limit argument. |
default <E2> CredentialTraversal<S,E2> |
local(Traversal<?,E2> localTraversal)
Provides a execute a specified traversal on a single element within a stream.
|
default CredentialTraversal<S,Integer> |
loops()
If the
Traverser supports looping then calling this method will extract the number of loops for that
traverser. |
default CredentialTraversal<S,Integer> |
loops(String loopName)
If the
Traverser supports looping then calling this method will extract the number of loops for that
traverser for the named loop. |
default <E2> CredentialTraversal<S,E2> |
map(Function<Traverser<E>,E2> function)
|
default <E2> CredentialTraversal<S,E2> |
map(Traversal<?,E2> mapTraversal)
|
default <E2> CredentialTraversal<S,Map<String,E2>> |
match(Traversal<?,?>... matchTraversals)
|
default CredentialTraversal<S,Double> |
math(String expression)
|
default <E2 extends Comparable> |
max()
Determines the largest value in the stream.
|
default <E2 extends Comparable> |
max(Scope scope)
Determines the largest value in the stream given the
Scope . |
default <E2 extends Number> |
mean()
Determines the mean value in the stream.
|
default <E2 extends Number> |
mean(Scope scope)
Determines the mean value in the stream given the
Scope . |
default CredentialTraversal<S,Edge> |
mergeE()
Spawns a
GraphTraversal by doing a merge (i.e. |
default CredentialTraversal<S,Edge> |
mergeE(Map<Object,Object> searchCreate)
Spawns a
GraphTraversal by doing a merge (i.e. |
default CredentialTraversal<S,Edge> |
mergeE(Traversal<?,Map<Object,Object>> searchCreate)
Spawns a
GraphTraversal by doing a merge (i.e. |
default CredentialTraversal<S,Vertex> |
mergeV()
Performs a merge (i.e.
|
default CredentialTraversal<S,Vertex> |
mergeV(Map<Object,Object> searchCreate)
Performs a merge (i.e.
|
default CredentialTraversal<S,Vertex> |
mergeV(Traversal<?,Map<Object,Object>> searchCreate)
Performs a merge (i.e.
|
default <E2 extends Comparable> |
min()
Determines the smallest value in the stream.
|
default <E2 extends Comparable> |
min(Scope scope)
Determines the smallest value in the stream given the
Scope . |
default CredentialTraversal<S,E> |
none()
Filter all traversers in the traversal.
|
default CredentialTraversal<S,E> |
not(Traversal<?,?> notTraversal)
Removes objects from the traversal stream when the traversal provided as an argument does not return any objects.
|
default <M,E2> CredentialTraversal<S,E> |
option(M token,
Map<Object,Object> m)
This is a step modulator to a
TraversalOptionParent like choose() or mergeV() where the
provided argument associated to the token is applied according to the semantics of the step. |
default <M,E2> CredentialTraversal<S,E> |
option(M token,
Traversal<?,E2> traversalOption)
This is a step modulator to a
TraversalOptionParent like choose() or mergeV() where the
provided argument associated to the token is applied according to the semantics of the step. |
default <E2> CredentialTraversal<S,E> |
option(Traversal<?,E2> traversalOption)
This step modifies
GraphTraversal.choose(Function) to specifies the available choices that might be executed. |
default <E2> CredentialTraversal<S,E2> |
optional(Traversal<?,E2> optionalTraversal)
Returns the result of the specified traversal if it yields a result, otherwise it returns the calling element.
|
default CredentialTraversal<S,E> |
or(Traversal<?,?>... orTraversals)
Ensures that at least one of the provided traversals yield a result.
|
default CredentialTraversal<S,E> |
order()
Order all the objects in the traversal up to this point and then emit them one-by-one in their ordered sequence.
|
default CredentialTraversal<S,E> |
order(Scope scope)
Order either the
Scope.local object (e.g. |
default CredentialTraversal<S,Vertex> |
otherV()
Map the
Edge to the incident vertex that was not just traversed from in the path history. |
default CredentialTraversal<S,Vertex> |
out(String... edgeLabels)
Map the
Vertex to its outgoing adjacent vertices given the edge labels. |
default CredentialTraversal<S,Edge> |
outE(String... edgeLabels)
Map the
Vertex to its outgoing incident edges given the edge labels. |
default CredentialTraversal<S,Vertex> |
outV()
|
default CredentialTraversal<S,E> |
pageRank()
Calculates a PageRank over the graph using a 0.85 for the
alpha value. |
default CredentialTraversal<S,E> |
pageRank(double alpha)
Calculates a PageRank over the graph.
|
default CredentialTraversal<S,Path> |
path()
|
default CredentialTraversal<S,E> |
peerPressure()
Executes a Peer Pressure community detection algorithm over the graph.
|
default CredentialTraversal<S,TraversalMetrics> |
profile()
Profile the traversal.
|
default CredentialTraversal<S,E> |
profile(String sideEffectKey)
Allows developers to examine statistical information about a traversal providing data like execution times,
counts, etc.
|
default CredentialTraversal<S,E> |
program(VertexProgram<?> vertexProgram)
Executes an arbitrary
VertexProgram over the graph. |
default <E2> CredentialTraversal<S,Map<String,E2>> |
project(String projectKey,
String... otherProjectKeys)
Projects the current object in the stream into a
Map that is keyed by the provided labels. |
default <E2> CredentialTraversal<S,? extends Property<E2>> |
properties(String... propertyKeys)
Map the
Element to its associated properties given the provide property keys. |
default CredentialTraversal<S,E> |
property(Map<Object,Object> value)
When a
Map is supplied then each of the key/value pairs in the map will
be added as property. |
default CredentialTraversal<S,E> |
property(Object key,
Object value,
Object... keyValues)
Sets the key and value of a
Property . |
default CredentialTraversal<S,E> |
property(VertexProperty.Cardinality cardinality,
Object key,
Object value,
Object... keyValues)
Sets a
Property value and related meta properties if supplied, if supported by the Graph
and if the Element is a VertexProperty . |
default <E2> CredentialTraversal<S,Map<String,E2>> |
propertyMap(String... propertyKeys)
|
default CredentialTraversal<S,E> |
range(long low,
long arg1)
Filter the objects in the traversal by the number of them to pass through the stream.
|
default <E2> CredentialTraversal<S,E2> |
range(Scope scope,
long low,
long arg2)
Filter the objects in the traversal by the number of them to pass through the stream as constrained by the
Scope . |
default CredentialTraversal<S,E> |
read()
This step is technically a step modulator for the the
GraphTraversalSource.io(String) step which
instructs the step to perform a read with its given configuration. |
default CredentialTraversal<S,E> |
repeat(String loopName,
Traversal<?,E> repeatTraversal)
This step is used for looping over a traversal given some break predicate and with a specified loop name.
|
default CredentialTraversal<S,E> |
repeat(Traversal<?,E> repeatTraversal)
This step is used for looping over a traversal given some break predicate.
|
default <E2> CredentialTraversal<S,E2> |
sack()
Map the
Traverser to its Traverser.sack() value. |
default <V,U> CredentialTraversal<S,E> |
sack(BiFunction<V,U,V> sackOperator)
Map the
Traverser to its Traverser.sack() value. |
default CredentialTraversal<S,E> |
sample(int amountToSample)
Allow some specified number of objects to pass through the stream.
|
default CredentialTraversal<S,E> |
sample(Scope scope,
int amountToSample)
Allow some specified number of objects to pass through the stream.
|
default <E2> CredentialTraversal<S,Collection<E2>> |
select(Column column)
A version of
select that allows for the extraction of a Column from objects in the traversal. |
default <E2> CredentialTraversal<S,E2> |
select(Pop pop,
String selectKey)
|
default <E2> CredentialTraversal<S,Map<String,E2>> |
select(Pop pop,
String selectKey1,
String selectKey2,
String... otherSelectKeys)
|
default <E2> CredentialTraversal<S,E2> |
select(Pop pop,
Traversal<S,E2> keyTraversal)
|
default <E2> CredentialTraversal<S,E2> |
select(String selectKey)
Map the
Traverser to the object specified by the selectKey . |
default <E2> CredentialTraversal<S,Map<String,E2>> |
select(String selectKey1,
String selectKey2,
String... otherSelectKeys)
|
default <E2> CredentialTraversal<S,E2> |
select(Traversal<S,E2> keyTraversal)
Map the
Traverser to the object specified by the key returned by the keyTraversal . |
default CredentialTraversal<S,Path> |
shortestPath()
Executes a Shortest Path algorithm over the graph.
|
default CredentialTraversal<S,E> |
sideEffect(Consumer<Traverser<E>> consumer)
Perform some operation on the
Traverser and pass it to the next step unmodified. |
default CredentialTraversal<S,E> |
sideEffect(Traversal<?,?> sideEffectTraversal)
Perform some operation on the
Traverser and pass it to the next step unmodified. |
default CredentialTraversal<S,E> |
simplePath()
|
default CredentialTraversal<S,E> |
skip(long skip)
Filters out the first
n objects in the traversal. |
default <E2> CredentialTraversal<S,E2> |
skip(Scope scope,
long skip)
Filters out the first
n objects in the traversal. |
default CredentialTraversal<S,E> |
store(String sideEffectKey)
Lazily aggregates objects in the stream into a side-effect collection.
|
default CredentialTraversal<S,Edge> |
subgraph(String sideEffectKey)
Extracts a portion of the graph being traversed into a
Graph object held in the specified side-effect
key. |
default <E2 extends Number> |
sum()
Map the traversal stream to its reduction as a sum of the
Traverser.get() values multiplied by their
Traverser.bulk() (i.e. |
default <E2 extends Number> |
sum(Scope scope)
Map the traversal stream to its reduction as a sum of the
Traverser.get() values multiplied by their
Traverser.bulk() given the specified Scope (i.e. |
default CredentialTraversal<S,E> |
tail()
Filters the objects in the traversal emitted as being last objects in the stream.
|
default CredentialTraversal<S,E> |
tail(long limit)
Filters the objects in the traversal emitted as being last objects in the stream.
|
default <E2> CredentialTraversal<S,E2> |
tail(Scope scope)
Filters the objects in the traversal emitted as being last objects in the stream given the
Scope . |
default <E2> CredentialTraversal<S,E2> |
tail(Scope scope,
long limit)
Filters the objects in the traversal emitted as being last objects in the stream given the
Scope . |
default CredentialTraversal<S,E> |
timeLimit(long timeLimit)
Once the first
Traverser hits this step, a count down is started. |
default CredentialTraversal<S,E> |
times(int maxLoops)
Modifies a
GraphTraversal.repeat(Traversal) to specify how many loops should occur before exiting. |
default CredentialTraversal<S,Vertex> |
to(Direction direction,
String... edgeLabels)
Map the
Vertex to its adjacent vertices given a direction and edge labels. |
default CredentialTraversal<S,E> |
to(String toStepLabel)
Provide
to() -modulation to respective steps. |
default CredentialTraversal<S,E> |
to(Traversal<?,Vertex> toVertex)
When used as a modifier to
GraphTraversal.addE(String) this method specifies the traversal to use for selecting the
incoming vertex of the newly added Edge . |
default CredentialTraversal<S,E> |
to(Vertex toVertex)
When used as a modifier to
GraphTraversal.addE(String) this method specifies the traversal to use for selecting the
incoming vertex of the newly added Edge . |
default CredentialTraversal<S,Edge> |
toE(Direction direction,
String... edgeLabels)
Map the
Vertex to its incident edges given the direction and edge labels. |
default CredentialTraversal<S,Vertex> |
toV(Direction direction)
Map the
Edge to its incident vertices given the direction. |
default CredentialTraversal<S,Tree> |
tree()
Aggregates the emanating paths into a
Tree data structure. |
default CredentialTraversal<S,E> |
tree(String sideEffectKey)
Aggregates the emanating paths into a
Tree data structure. |
default <E2> CredentialTraversal<S,E2> |
unfold()
Unrolls a
Iterator , Iterable or Map into a linear form or simply emits the object if it
is not one of those types. |
default <E2> CredentialTraversal<S,E2> |
union(Traversal<?,E2>... unionTraversals)
Merges the results of an arbitrary number of traversals.
|
default CredentialTraversal<S,E> |
until(Predicate<Traverser<E>> untilPredicate)
Modifies a
GraphTraversal.repeat(Traversal) to determine when the loop should exit. |
default CredentialTraversal<S,E> |
until(Traversal<?,?> untilTraversal)
Modifies a
GraphTraversal.repeat(Traversal) to determine when the loop should exit. |
default CredentialTraversal<S,Vertex> |
user(String username,
String password)
Creates or updates a user.
|
default CredentialTraversal<S,Vertex> |
users()
Finds all users.
|
default CredentialTraversal<S,Vertex> |
users(String username,
String... more)
Finds users by name.
|
default CredentialTraversal<S,Vertex> |
V(Object... vertexIdsOrElements)
A
V step is usually used to start a traversal but it may also be used mid-traversal. |
default <E2> CredentialTraversal<S,E2> |
value()
Map the
Property to its Property.value() . |
default <E2> CredentialTraversal<S,Map<Object,E2>> |
valueMap(boolean includeTokens,
String... propertyKeys)
|
default <E2> CredentialTraversal<S,Map<Object,E2>> |
valueMap(String... propertyKeys)
|
default <E2> CredentialTraversal<S,E2> |
values(String... propertyKeys)
Map the
Element to the values of the associated properties given the provide property keys. |
default CredentialTraversal<S,E> |
where(P<String> predicate)
Filters the current object based on the object itself or the path history.
|
default CredentialTraversal<S,E> |
where(String startKey,
P<String> predicate)
Filters the current object based on the object itself or the path history.
|
default CredentialTraversal<S,E> |
where(Traversal<?,?> whereTraversal)
Filters the current object based on the object itself or the path history.
|
default CredentialTraversal<S,E> |
with(String key)
Provides a configuration to a step in the form of a key which is the same as
with(key, true) . |
default CredentialTraversal<S,E> |
with(String key,
Object value)
Provides a configuration to a step in the form of a key and value pair.
|
default CredentialTraversal<S,E> |
write()
This step is technically a step modulator for the the
GraphTraversalSource.io(String) step which
instructs the step to perform a write with its given configuration. |
addStep, clone
addStart, addStarts, addStep, applyStrategies, equals, getBytecode, getEndStep, getGraph, getParent, getSideEffects, getStartStep, getSteps, getStrategies, getTraversalSource, getTraverserGenerator, getTraverserRequirements, getTraverserSetSupplier, isLocked, isRoot, nextTraverser, removeStep, removeStep, reset, setGraph, setParent, setSideEffects, setStrategies
asAdmin
close, explain, fill, forEachRemaining, forEachRemaining, next, notifyClose, promise, toBulkSet, toList, toSet, toStream, tryNext
default CredentialTraversal<S,Vertex> users()
CredentialTraversalDsl
users
in interface CredentialTraversalDsl<S,E>
default CredentialTraversal<S,Vertex> users(String username, String... more)
CredentialTraversalDsl
users
in interface CredentialTraversalDsl<S,E>
default CredentialTraversal<S,Vertex> user(String username, String password)
CredentialTraversalDsl
user
in interface CredentialTraversalDsl<S,E>
default <E2> CredentialTraversal<S,E2> map(Function<Traverser<E>,E2> function)
GraphTraversal
map
in interface GraphTraversal<S,E>
function
- the lambda expression that does the functional mappingLambdaMapStep
.default <E2> CredentialTraversal<S,E2> map(Traversal<?,E2> mapTraversal)
GraphTraversal
map
in interface GraphTraversal<S,E>
mapTraversal
- the traversal expression that does the functional mappingLambdaMapStep
.default <E2> CredentialTraversal<S,E2> flatMap(Function<Traverser<E>,Iterator<E2>> function)
GraphTraversal
Traverser
referencing an object of type E
to an iterator of objects of type E2
.
The resultant iterator is drained one-by-one before a new E
object is pulled in for processing.flatMap
in interface GraphTraversal<S,E>
E2
- the type of the returned iterator objectsfunction
- the lambda expression that does the functional mappingLambdaFlatMapStep
.default <E2> CredentialTraversal<S,E2> flatMap(Traversal<?,E2> flatMapTraversal)
GraphTraversal
Traverser
referencing an object of type E
to an iterator of objects of type E2
.
The internal traversal is drained one-by-one before a new E
object is pulled in for processing.flatMap
in interface GraphTraversal<S,E>
E2
- the end type of the internal traversalflatMapTraversal
- the traversal generating objects of type E2
TraversalFlatMapStep
.default CredentialTraversal<S,Object> id()
GraphTraversal
Element
to its Element.id()
.id
in interface GraphTraversal<S,E>
IdStep
.default CredentialTraversal<S,String> label()
GraphTraversal
Element
to its Element.label()
.label
in interface GraphTraversal<S,E>
LabelStep
.default CredentialTraversal<S,E> identity()
GraphTraversal
E
object to itself. In other words, a "no op."identity
in interface GraphTraversal<S,E>
IdentityStep
.default <E2> CredentialTraversal<S,E2> constant(E2 e)
GraphTraversal
E
value.constant
in interface GraphTraversal<S,E>
ConstantStep
.default CredentialTraversal<S,Vertex> V(Object... vertexIdsOrElements)
GraphTraversal
V
step is usually used to start a traversal but it may also be used mid-traversal.V
in interface GraphTraversal<S,E>
vertexIdsOrElements
- vertices to inject into the traversalGraphStep
default CredentialTraversal<S,Vertex> to(Direction direction, String... edgeLabels)
GraphTraversal
Vertex
to its adjacent vertices given a direction and edge labels.to
in interface GraphTraversal<S,E>
direction
- the direction to traverse from the current vertexedgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Vertex> out(String... edgeLabels)
GraphTraversal
Vertex
to its outgoing adjacent vertices given the edge labels.out
in interface GraphTraversal<S,E>
edgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Vertex> in(String... edgeLabels)
GraphTraversal
Vertex
to its incoming adjacent vertices given the edge labels.in
in interface GraphTraversal<S,E>
edgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Vertex> both(String... edgeLabels)
GraphTraversal
Vertex
to its adjacent vertices given the edge labels.both
in interface GraphTraversal<S,E>
edgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Edge> toE(Direction direction, String... edgeLabels)
GraphTraversal
Vertex
to its incident edges given the direction and edge labels.toE
in interface GraphTraversal<S,E>
direction
- the direction to traverse from the current vertexedgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Edge> outE(String... edgeLabels)
GraphTraversal
Vertex
to its outgoing incident edges given the edge labels.outE
in interface GraphTraversal<S,E>
edgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Edge> inE(String... edgeLabels)
GraphTraversal
Vertex
to its incoming incident edges given the edge labels.inE
in interface GraphTraversal<S,E>
edgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Edge> bothE(String... edgeLabels)
GraphTraversal
Vertex
to its incident edges given the edge labels.bothE
in interface GraphTraversal<S,E>
edgeLabels
- the edge labels to traverseVertexStep
.default CredentialTraversal<S,Vertex> toV(Direction direction)
GraphTraversal
Edge
to its incident vertices given the direction.toV
in interface GraphTraversal<S,E>
direction
- the direction to traverser from the current edgeEdgeVertexStep
.default CredentialTraversal<S,Vertex> inV()
GraphTraversal
inV
in interface GraphTraversal<S,E>
EdgeVertexStep
.default CredentialTraversal<S,Vertex> outV()
GraphTraversal
outV
in interface GraphTraversal<S,E>
EdgeVertexStep
.default CredentialTraversal<S,Vertex> bothV()
GraphTraversal
Edge
to its incident vertices.bothV
in interface GraphTraversal<S,E>
EdgeVertexStep
.default CredentialTraversal<S,Vertex> otherV()
GraphTraversal
Edge
to the incident vertex that was not just traversed from in the path history.otherV
in interface GraphTraversal<S,E>
EdgeOtherVertexStep
.default CredentialTraversal<S,E> order()
GraphTraversal
order
in interface GraphTraversal<S,E>
OrderGlobalStep
.default CredentialTraversal<S,E> order(Scope scope)
GraphTraversal
Scope.local
object (e.g. a list, map, etc.) or the entire Scope.global
traversal stream.order
in interface GraphTraversal<S,E>
scope
- whether the ordering is the current local object or the entire global stream.OrderGlobalStep
or OrderLocalStep
depending on the scope
.default <E2> CredentialTraversal<S,? extends Property<E2>> properties(String... propertyKeys)
GraphTraversal
Element
to its associated properties given the provide property keys.
If no property keys are provided, then all properties are emitted.properties
in interface GraphTraversal<S,E>
E2
- the value type of the returned propertiespropertyKeys
- the properties to retrievePropertiesStep
.default <E2> CredentialTraversal<S,E2> values(String... propertyKeys)
GraphTraversal
Element
to the values of the associated properties given the provide property keys.
If no property keys are provided, then all property values are emitted.values
in interface GraphTraversal<S,E>
E2
- the value type of the propertiespropertyKeys
- the properties to retrieve their value fromPropertiesStep
.default <E2> CredentialTraversal<S,Map<String,E2>> propertyMap(String... propertyKeys)
GraphTraversal
Element
to a Map
of the properties key'd according to their Property.key()
.
If no property keys are provided, then all properties are retrieved.propertyMap
in interface GraphTraversal<S,E>
E2
- the value type of the returned propertiespropertyKeys
- the properties to retrievePropertyMapStep
.default <E2> CredentialTraversal<S,Map<Object,E2>> elementMap(String... propertyKeys)
GraphTraversal
Element
to a Map
of the property values key'd according to their Property.key()
.
If no property keys are provided, then all property values are retrieved. For vertices, the Map
will
be returned with the assumption of single property values along with T.id
and T.label
. Prefer
GraphTraversal.valueMap(String...)
if multi-property processing is required. For edges, keys will include additional
related edge structure of Direction.IN
and Direction.OUT
which themselves are Map
instances of the particular Vertex
represented by T.id
and T.label
.elementMap
in interface GraphTraversal<S,E>
E2
- the value type of the returned propertiespropertyKeys
- the properties to retrieveElementMapStep
.default <E2> CredentialTraversal<S,Map<Object,E2>> valueMap(String... propertyKeys)
GraphTraversal
Element
to a Map
of the property values key'd according to their Property.key()
.
If no property keys are provided, then all property values are retrieved.valueMap
in interface GraphTraversal<S,E>
E2
- the value type of the returned propertiespropertyKeys
- the properties to retrievePropertyMapStep
.default <E2> CredentialTraversal<S,Map<Object,E2>> valueMap(boolean includeTokens, String... propertyKeys)
GraphTraversal
Element
to a Map
of the property values key'd according to their Property.key()
.
If no property keys are provided, then all property values are retrieved.valueMap
in interface GraphTraversal<S,E>
E2
- the value type of the returned propertiesincludeTokens
- whether to include T
tokens in the emitted map.propertyKeys
- the properties to retrievePropertyMapStep
.default CredentialTraversal<S,String> key()
GraphTraversal
Property
to its Property.key()
.key
in interface GraphTraversal<S,E>
PropertyKeyStep
.default <E2> CredentialTraversal<S,E2> value()
GraphTraversal
Property
to its Property.value()
.value
in interface GraphTraversal<S,E>
PropertyValueStep
.default CredentialTraversal<S,Path> path()
GraphTraversal
path
in interface GraphTraversal<S,E>
PathStep
.default <E2> CredentialTraversal<S,Map<String,E2>> match(Traversal<?,?>... matchTraversals)
GraphTraversal
match
in interface GraphTraversal<S,E>
E2
- the type of the objects bound in the variablesmatchTraversals
- the traversal that maintain variables which must hold for the life of the traverserMatchStep
.default <E2> CredentialTraversal<S,E2> sack()
GraphTraversal
Traverser
to its Traverser.sack()
value.sack
in interface GraphTraversal<S,E>
E2
- the sack value typeSackStep
.default CredentialTraversal<S,Integer> loops()
GraphTraversal
Traverser
supports looping then calling this method will extract the number of loops for that
traverser.loops
in interface GraphTraversal<S,E>
LoopsStep
default CredentialTraversal<S,Integer> loops(String loopName)
GraphTraversal
Traverser
supports looping then calling this method will extract the number of loops for that
traverser for the named loop.loops
in interface GraphTraversal<S,E>
LoopsStep
default <E2> CredentialTraversal<S,Map<String,E2>> project(String projectKey, String... otherProjectKeys)
GraphTraversal
Map
that is keyed by the provided labels.project
in interface GraphTraversal<S,E>
ProjectStep
default <E2> CredentialTraversal<S,Map<String,E2>> select(Pop pop, String selectKey1, String selectKey2, String... otherSelectKeys)
GraphTraversal
select
in interface GraphTraversal<S,E>
E2
- the type of the objects projectedpop
- if there are multiple objects referenced in the path, the Pop
to use.selectKey1
- the first key to projectselectKey2
- the second key to projectotherSelectKeys
- the third+ keys to projectSelectStep
.default <E2> CredentialTraversal<S,Map<String,E2>> select(String selectKey1, String selectKey2, String... otherSelectKeys)
GraphTraversal
select
in interface GraphTraversal<S,E>
E2
- the type of the objects projectedselectKey1
- the first key to projectselectKey2
- the second key to projectotherSelectKeys
- the third+ keys to projectSelectStep
.default <E2> CredentialTraversal<S,E2> select(Pop pop, String selectKey)
GraphTraversal
select
in interface GraphTraversal<S,E>
selectKey
- the key to projectSelectStep
.default <E2> CredentialTraversal<S,E2> select(String selectKey)
GraphTraversal
Traverser
to the object specified by the selectKey
. Note that unlike other uses of
select
where there are multiple keys, this use of select
with a single key does not produce a
Map
.select
in interface GraphTraversal<S,E>
selectKey
- the key to projectSelectStep
.default <E2> CredentialTraversal<S,E2> select(Pop pop, Traversal<S,E2> keyTraversal)
GraphTraversal
Traverser
to the object specified by the key returned by the keyTraversal
and apply the Pop
operation
to it.select
in interface GraphTraversal<S,E>
keyTraversal
- the traversal expression that selects the key to projectSelectStep
.default <E2> CredentialTraversal<S,E2> select(Traversal<S,E2> keyTraversal)
GraphTraversal
Traverser
to the object specified by the key returned by the keyTraversal
. Note that unlike other uses of
select
where there are multiple keys, this use of select
with a traversal does not produce a
Map
.select
in interface GraphTraversal<S,E>
keyTraversal
- the traversal expression that selects the key to projectTraversalSelectStep
.default <E2> CredentialTraversal<S,Collection<E2>> select(Column column)
GraphTraversal
select
that allows for the extraction of a Column
from objects in the traversal.select
in interface GraphTraversal<S,E>
column
- the column to extractTraversalMapStep
default <E2> CredentialTraversal<S,E2> unfold()
GraphTraversal
Iterator
, Iterable
or Map
into a linear form or simply emits the object if it
is not one of those types.unfold
in interface GraphTraversal<S,E>
UnfoldStep
default CredentialTraversal<S,List<E>> fold()
GraphTraversal
fold
in interface GraphTraversal<S,E>
FoldStep
default <E2> CredentialTraversal<S,E2> fold(E2 seed, BiFunction<E2,E,E2> foldFunction)
GraphTraversal
seed
and BiFunction
.fold
in interface GraphTraversal<S,E>
seed
- the value to provide as the first argument to the foldFunction
foldFunction
- the function to fold by where the first argument is the seed
or the value returned from subsequent class and
the second argument is the value from the streamFoldStep
default CredentialTraversal<S,Long> count()
GraphTraversal
Traverser.bulk()
values (i.e. count the number
of traversers up to this point).count
in interface GraphTraversal<S,E>
CountGlobalStep
.default CredentialTraversal<S,Long> count(Scope scope)
GraphTraversal
Traverser.bulk()
values given the specified
Scope
(i.e. count the number of traversers up to this point).count
in interface GraphTraversal<S,E>
CountGlobalStep
or CountLocalStep
depending on the Scope
default <E2 extends Number> CredentialTraversal<S,E2> sum()
GraphTraversal
Traverser.get()
values multiplied by their
Traverser.bulk()
(i.e. sum the traverser values up to this point).sum
in interface GraphTraversal<S,E>
SumGlobalStep
.default <E2 extends Number> CredentialTraversal<S,E2> sum(Scope scope)
GraphTraversal
Traverser.get()
values multiplied by their
Traverser.bulk()
given the specified Scope
(i.e. sum the traverser values up to this point).sum
in interface GraphTraversal<S,E>
SumGlobalStep
or SumLocalStep
depending on the Scope
.default <E2 extends Comparable> CredentialTraversal<S,E2> max()
GraphTraversal
max
in interface GraphTraversal<S,E>
MaxGlobalStep
.default <E2 extends Comparable> CredentialTraversal<S,E2> max(Scope scope)
GraphTraversal
Scope
.max
in interface GraphTraversal<S,E>
MaxGlobalStep
or MaxLocalStep
depending on the Scope
default <E2 extends Comparable> CredentialTraversal<S,E2> min()
GraphTraversal
min
in interface GraphTraversal<S,E>
MinGlobalStep
.default <E2 extends Comparable> CredentialTraversal<S,E2> min(Scope scope)
GraphTraversal
Scope
.min
in interface GraphTraversal<S,E>
MinGlobalStep
or MinLocalStep
depending on the Scope
default <E2 extends Number> CredentialTraversal<S,E2> mean()
GraphTraversal
mean
in interface GraphTraversal<S,E>
MeanGlobalStep
.default <E2 extends Number> CredentialTraversal<S,E2> mean(Scope scope)
GraphTraversal
Scope
.mean
in interface GraphTraversal<S,E>
MeanGlobalStep
or MeanLocalStep
depending on the Scope
default <K,V> CredentialTraversal<S,Map<K,V>> group()
GraphTraversal
Map
. Calls to group()
are typically accompanied with
GraphTraversal.by()
modulators which help specify how the grouping should occur.group
in interface GraphTraversal<S,E>
GroupStep
.default <K> CredentialTraversal<S,Map<K,Long>> groupCount()
GraphTraversal
Map
where the
object is the key and the value is the count.groupCount
in interface GraphTraversal<S,E>
GroupCountStep
.default CredentialTraversal<S,Tree> tree()
GraphTraversal
Tree
data structure.tree
in interface GraphTraversal<S,E>
TreeStep
default CredentialTraversal<S,Vertex> addV(String vertexLabel)
GraphTraversal
Vertex
.addV
in interface GraphTraversal<S,E>
vertexLabel
- the label of the Vertex
to addAddVertexStep
addeddefault CredentialTraversal<S,Vertex> addV(Traversal<?,String> vertexLabelTraversal)
GraphTraversal
addV
in interface GraphTraversal<S,E>
AddVertexStep
addeddefault CredentialTraversal<S,Vertex> addV()
GraphTraversal
Vertex
with a default vertex label.addV
in interface GraphTraversal<S,E>
AddVertexStep
addeddefault CredentialTraversal<S,Vertex> mergeV()
GraphTraversal
Vertex
using the incoming Map
traverser as
an argument. The Map
represents search criteria and will match each of the supplied key/value pairs where
the keys may be String
property values or a value of T
. If a match is not made it will use that
search criteria to create the new Vertex
.mergeV
in interface GraphTraversal<S,E>
default CredentialTraversal<S,Vertex> mergeV(Map<Object,Object> searchCreate)
GraphTraversal
Vertex
using a Map
as an argument.
The Map
represents search criteria and will match each of the supplied key/value pairs where the keys
may be String
property values or a value of T
. If a match is not made it will use that search
criteria to create the new Vertex
.mergeV
in interface GraphTraversal<S,E>
searchCreate
- This Map
can have a key of T
or a String
.default CredentialTraversal<S,Vertex> mergeV(Traversal<?,Map<Object,Object>> searchCreate)
GraphTraversal
Vertex
using a Map
as an argument.
The Map
represents search criteria and will match each of the supplied key/value pairs where the keys
may be String
property values or a value of T
. If a match is not made it will use that search
criteria to create the new Vertex
.default CredentialTraversal<S,Edge> mergeE()
GraphTraversal
GraphTraversal
by doing a merge (i.e. upsert) style operation for an Edge
using an
incoming Map
as an argument.mergeE
in interface GraphTraversal<S,E>
default CredentialTraversal<S,Edge> mergeE(Map<Object,Object> searchCreate)
GraphTraversal
GraphTraversal
by doing a merge (i.e. upsert) style operation for an Edge
using a
Map
as an argument.default CredentialTraversal<S,Edge> mergeE(Traversal<?,Map<Object,Object>> searchCreate)
GraphTraversal
GraphTraversal
by doing a merge (i.e. upsert) style operation for an Edge
using a
Map
as an argument.default CredentialTraversal<S,Edge> addE(String edgeLabel)
GraphTraversal
Edge
with the specified edge label.addE
in interface GraphTraversal<S,E>
edgeLabel
- the label of the newly added edgeAddEdgeStep
addeddefault CredentialTraversal<S,Edge> addE(Traversal<?,String> edgeLabelTraversal)
GraphTraversal
addE
in interface GraphTraversal<S,E>
AddEdgeStep
addeddefault CredentialTraversal<S,E> to(String toStepLabel)
GraphTraversal
to()
-modulation to respective steps.to
in interface GraphTraversal<S,E>
toStepLabel
- the step label to modulate to.FromToModulating
step.default CredentialTraversal<S,E> from(String fromStepLabel)
GraphTraversal
from()
-modulation to respective steps.from
in interface GraphTraversal<S,E>
fromStepLabel
- the step label to modulate to.FromToModulating
step.default CredentialTraversal<S,E> to(Traversal<?,Vertex> toVertex)
GraphTraversal
GraphTraversal.addE(String)
this method specifies the traversal to use for selecting the
incoming vertex of the newly added Edge
.to
in interface GraphTraversal<S,E>
toVertex
- the traversal for selecting the incoming vertexAddEdgeStep
default CredentialTraversal<S,E> from(Traversal<?,Vertex> fromVertex)
GraphTraversal
GraphTraversal.addE(String)
this method specifies the traversal to use for selecting the
outgoing vertex of the newly added Edge
.from
in interface GraphTraversal<S,E>
fromVertex
- the traversal for selecting the outgoing vertexAddEdgeStep
default CredentialTraversal<S,E> to(Vertex toVertex)
GraphTraversal
GraphTraversal.addE(String)
this method specifies the traversal to use for selecting the
incoming vertex of the newly added Edge
.to
in interface GraphTraversal<S,E>
toVertex
- the vertex for selecting the incoming vertexAddEdgeStep
default CredentialTraversal<S,E> from(Vertex fromVertex)
GraphTraversal
GraphTraversal.addE(String)
this method specifies the traversal to use for selecting the
outgoing vertex of the newly added Edge
.from
in interface GraphTraversal<S,E>
fromVertex
- the vertex for selecting the outgoing vertexAddEdgeStep
default CredentialTraversal<S,Double> math(String expression)
GraphTraversal
math
in interface GraphTraversal<S,E>
expression
- the mathematical expression with variables refering to scope variables.MathStep
added.default CredentialTraversal<S,Element> element()
GraphTraversal
element
in interface GraphTraversal<S,E>
ElementStep
.default <E> CredentialTraversal<S,E> call(String service)
GraphTraversal
call
in interface GraphTraversal<S,E>
service
- the name of the service callCallStep
.default <E> CredentialTraversal<S,E> call(String service, Map params)
GraphTraversal
call
in interface GraphTraversal<S,E>
service
- the name of the service callparams
- static parameter map (no nested traversals)CallStep
.default <E> CredentialTraversal<S,E> call(String service, Traversal<?,Map<?,?>> childTraversal)
GraphTraversal
call
in interface GraphTraversal<S,E>
service
- the name of the service callchildTraversal
- a traversal that will produce a Map of parameters for the service call when invoked.CallStep
.default <E> CredentialTraversal<S,E> call(String service, Map params, Traversal<?,Map<?,?>> childTraversal)
GraphTraversal
call
in interface GraphTraversal<S,E>
service
- the name of the service callparams
- static parameter map (no nested traversals)childTraversal
- a traversal that will produce a Map of parameters for the service call when invoked.CallStep
.default CredentialTraversal<S,E> filter(Predicate<Traverser<E>> predicate)
GraphTraversal
Traverser
to either true
or false
, where false
will not pass the
traverser to the next step.filter
in interface GraphTraversal<S,E>
predicate
- the filter function to applyLambdaFilterStep
addeddefault CredentialTraversal<S,E> filter(Traversal<?,?> filterTraversal)
GraphTraversal
Traverser
to either true
or false
, where false
will not pass the
traverser to the next step.filter
in interface GraphTraversal<S,E>
filterTraversal
- the filter traversal to applyTraversalFilterStep
addeddefault CredentialTraversal<S,E> none()
Traversal
Traversal.iterate()
was called. While it may be directly used, it is often a sign
that a traversal should be re-written in another form.default CredentialTraversal<S,E> or(Traversal<?,?>... orTraversals)
GraphTraversal
or
in interface GraphTraversal<S,E>
orTraversals
- filter traversals where at least one must be satisfiedOrStep
default CredentialTraversal<S,E> and(Traversal<?,?>... andTraversals)
GraphTraversal
and
in interface GraphTraversal<S,E>
andTraversals
- filter traversals that must be satisfiedAndStep
default CredentialTraversal<S,E> inject(E... injections)
GraphTraversal
inject
in interface GraphTraversal<S,E>
injections
- the objects to add to the streamInjectStep
default CredentialTraversal<S,E> dedup(Scope scope, String... dedupLabels)
GraphTraversal
dedup
in interface GraphTraversal<S,E>
scope
- whether the deduplication is on the stream (global) or the current object (local).dedupLabels
- if labels are provided, then the scope labels determine de-duplication. No labels implies current object.DedupGlobalStep
or DedupLocalStep
depending on scope
default CredentialTraversal<S,E> dedup(String... dedupLabels)
GraphTraversal
dedup
in interface GraphTraversal<S,E>
dedupLabels
- if labels are provided, then the scoped object's labels determine de-duplication. No labels implies current object.DedupGlobalStep
.default CredentialTraversal<S,E> where(String startKey, P<String> predicate)
GraphTraversal
where
in interface GraphTraversal<S,E>
startKey
- the key containing the object to filterpredicate
- the filter to applyWherePredicateStep
default CredentialTraversal<S,E> where(P<String> predicate)
GraphTraversal
where
in interface GraphTraversal<S,E>
predicate
- the filter to applyWherePredicateStep
default CredentialTraversal<S,E> where(Traversal<?,?> whereTraversal)
GraphTraversal
where
in interface GraphTraversal<S,E>
whereTraversal
- the filter to applyWherePredicateStep
default CredentialTraversal<S,E> has(String propertyKey, P<?> predicate)
GraphTraversal
has
in interface GraphTraversal<S,E>
propertyKey
- the key of the property to filter onpredicate
- the filter to apply to the key's valueHasStep
default CredentialTraversal<S,E> has(T accessor, P<?> predicate)
GraphTraversal
has
in interface GraphTraversal<S,E>
accessor
- the T
accessor of the property to filter onpredicate
- the filter to apply to the key's valueHasStep
default CredentialTraversal<S,E> has(String propertyKey, Object value)
GraphTraversal
has
in interface GraphTraversal<S,E>
propertyKey
- the key of the property to filter onvalue
- the value to compare the property value to for equalityHasStep
default CredentialTraversal<S,E> has(T accessor, Object value)
GraphTraversal
has
in interface GraphTraversal<S,E>
accessor
- the T
accessor of the property to filter onvalue
- the value to compare the accessor value to for equalityHasStep
default CredentialTraversal<S,E> has(String label, String propertyKey, P<?> predicate)
GraphTraversal
has
in interface GraphTraversal<S,E>
label
- the label of the Element
propertyKey
- the key of the property to filter onpredicate
- the filter to apply to the key's valueHasStep
default CredentialTraversal<S,E> has(String label, String propertyKey, Object value)
GraphTraversal
has
in interface GraphTraversal<S,E>
label
- the label of the Element
propertyKey
- the key of the property to filter onvalue
- the value to compare the accessor value to for equalityHasStep
default CredentialTraversal<S,E> has(T accessor, Traversal<?,?> propertyTraversal)
GraphTraversal
T
where only T.id
and
T.label
are supported.has
in interface GraphTraversal<S,E>
accessor
- the T
accessor of the property to filter onpropertyTraversal
- the traversal to filter the accessor value byHasStep
default CredentialTraversal<S,E> has(String propertyKey, Traversal<?,?> propertyTraversal)
GraphTraversal
has
in interface GraphTraversal<S,E>
propertyKey
- the key of the property to filter onpropertyTraversal
- the traversal to filter the property value byHasStep
default CredentialTraversal<S,E> has(String propertyKey)
GraphTraversal
has
in interface GraphTraversal<S,E>
propertyKey
- the key of the property to filter on for existenceHasStep
default CredentialTraversal<S,E> hasNot(String propertyKey)
GraphTraversal
hasNot
in interface GraphTraversal<S,E>
propertyKey
- the key of the property to filter on for existenceHasStep
default CredentialTraversal<S,E> hasLabel(String label, String... otherLabels)
GraphTraversal
hasLabel
in interface GraphTraversal<S,E>
label
- the label of the Element
otherLabels
- additional labels of the Element
HasStep
default CredentialTraversal<S,E> hasLabel(P<String> predicate)
GraphTraversal
null
is the same as calling GraphTraversal.hasLabel(String, String...)
with a single null
.hasLabel
in interface GraphTraversal<S,E>
predicate
- the filter to apply to the label of the Element
HasStep
default CredentialTraversal<S,E> hasId(Object id, Object... otherIds)
GraphTraversal
hasId
in interface GraphTraversal<S,E>
id
- the identifier of the Element
otherIds
- additional identifiers of the Element
HasStep
default CredentialTraversal<S,E> hasId(P<Object> predicate)
GraphTraversal
null
value will result in effectively calling GraphTraversal.hasId(Object, Object...)
wit a single null
identifier
and therefore filter all results since a T.id
cannot be null
.hasId
in interface GraphTraversal<S,E>
predicate
- the filter to apply to the identifier of the Element
HasStep
default CredentialTraversal<S,E> hasKey(String label, String... otherLabels)
GraphTraversal
Property
objects based on their key. It is not meant to test key existence on an Edge
or
a Vertex
. In that case, prefer GraphTraversal.has(String)
.hasKey
in interface GraphTraversal<S,E>
label
- the key of the Property
otherLabels
- additional key of the Property
HasStep
default CredentialTraversal<S,E> hasKey(P<String> predicate)
GraphTraversal
Property
objects based on their key. It is not meant to test key existence on an Edge
or
a Vertex
. In that case, prefer GraphTraversal.has(String)
. Note that calling this step with null
is
the same as calling GraphTraversal.hasKey(String, String...)
with a single null
.hasKey
in interface GraphTraversal<S,E>
predicate
- the filter to apply to the key of the Property
HasStep
default CredentialTraversal<S,E> hasValue(Object value, Object... otherValues)
GraphTraversal
Property
objects based on their value.hasValue
in interface GraphTraversal<S,E>
value
- the value of the Element
otherValues
- additional values of the Element
HasStep
default CredentialTraversal<S,E> hasValue(P<Object> predicate)
GraphTraversal
Property
objects based on their value.Note that calling this step with null
is the same
as calling GraphTraversal.hasValue(Object, Object...)
with a single null
.hasValue
in interface GraphTraversal<S,E>
predicate
- the filter to apply to the value of the Element
HasStep
default CredentialTraversal<S,E> is(P<E> predicate)
GraphTraversal
E
object values given the provided predicate
.is
in interface GraphTraversal<S,E>
predicate
- the filter to applyIsStep
default CredentialTraversal<S,E> is(Object value)
GraphTraversal
E
object if it is not P.eq(V)
to the provided value.is
in interface GraphTraversal<S,E>
value
- the value that the object must equal.IsStep
.default CredentialTraversal<S,E> not(Traversal<?,?> notTraversal)
GraphTraversal
not
in interface GraphTraversal<S,E>
notTraversal
- the traversal to filter by.NotStep
.default CredentialTraversal<S,E> coin(double probability)
GraphTraversal
E
object given a biased coin toss.coin
in interface GraphTraversal<S,E>
probability
- the probability that the object will pass throughCoinStep
.default CredentialTraversal<S,E> range(long low, long arg1)
GraphTraversal
low
do not pass through and those that exceed the value of high
will end the iteration.range
in interface GraphTraversal<S,E>
low
- the number at which to start allowing objects through the streamarg1
- the number at which to end the stream - use -1
to emit all remaining objectsRangeGlobalStep
default <E2> CredentialTraversal<S,E2> range(Scope scope, long low, long arg2)
GraphTraversal
Scope
. Those before the value of low
do not pass through and those that exceed the value of
high
will end the iteration.range
in interface GraphTraversal<S,E>
scope
- the scope of how to apply the range
low
- the number at which to start allowing objects through the streamarg2
- the number at which to end the stream - use -1
to emit all remaining objectsRangeGlobalStep
or RangeLocalStep
depending on scope
default CredentialTraversal<S,E> limit(long limit)
GraphTraversal
n
objects are allowed as defined by the limit
argument.limit
in interface GraphTraversal<S,E>
limit
- the number at which to end the streamRangeGlobalStep
default <E2> CredentialTraversal<S,E2> limit(Scope scope, long limit)
GraphTraversal
Scope
,
where only the first n
objects are allowed as defined by the limit
argument.limit
in interface GraphTraversal<S,E>
scope
- the scope of how to apply the limit
limit
- the number at which to end the streamRangeGlobalStep
or RangeLocalStep
depending on scope
default CredentialTraversal<S,E> tail()
GraphTraversal
tail
in interface GraphTraversal<S,E>
TailGlobalStep
default CredentialTraversal<S,E> tail(long limit)
GraphTraversal
n
objects will be returned as defined by the limit
.tail
in interface GraphTraversal<S,E>
limit
- the number at which to end the streamTailGlobalStep
default <E2> CredentialTraversal<S,E2> tail(Scope scope)
GraphTraversal
Scope
. In
this case, only the last object in the stream will be returned.tail
in interface GraphTraversal<S,E>
scope
- the scope of how to apply the tail
TailGlobalStep
or TailLocalStep
depending on scope
default <E2> CredentialTraversal<S,E2> tail(Scope scope, long limit)
GraphTraversal
Scope
. In
this case, only the last n
objects will be returned as defined by the limit
.tail
in interface GraphTraversal<S,E>
scope
- the scope of how to apply the tail
limit
- the number at which to end the streamTailGlobalStep
or TailLocalStep
depending on scope
default CredentialTraversal<S,E> skip(long skip)
GraphTraversal
n
objects in the traversal.skip
in interface GraphTraversal<S,E>
skip
- the number of objects to skipRangeGlobalStep
default <E2> CredentialTraversal<S,E2> skip(Scope scope, long skip)
GraphTraversal
n
objects in the traversal.skip
in interface GraphTraversal<S,E>
scope
- the scope of how to apply the tail
skip
- the number of objects to skipRangeGlobalStep
or RangeLocalStep
depending on scope
default CredentialTraversal<S,E> timeLimit(long timeLimit)
GraphTraversal
Traverser
hits this step, a count down is started. Once the time limit is up, all remaining traversers are filtered out.timeLimit
in interface GraphTraversal<S,E>
timeLimit
- the count down timeTimeLimitStep
default CredentialTraversal<S,E> simplePath()
GraphTraversal
simplePath
in interface GraphTraversal<S,E>
PathFilterStep
.default CredentialTraversal<S,E> cyclicPath()
GraphTraversal
cyclicPath
in interface GraphTraversal<S,E>
PathFilterStep
.default CredentialTraversal<S,E> sample(int amountToSample)
GraphTraversal
sample
in interface GraphTraversal<S,E>
amountToSample
- the number of objects to allowSampleGlobalStep
default CredentialTraversal<S,E> sample(Scope scope, int amountToSample)
GraphTraversal
sample
in interface GraphTraversal<S,E>
scope
- the scope of how to apply the sample
amountToSample
- the number of objects to allowSampleGlobalStep
or SampleLocalStep
depending on the scope
default CredentialTraversal<S,E> drop()
GraphTraversal
g.V().drop().iterate()
.drop
in interface GraphTraversal<S,E>
DropStep
addeddefault CredentialTraversal<S,E> sideEffect(Consumer<Traverser<E>> consumer)
GraphTraversal
Traverser
and pass it to the next step unmodified.sideEffect
in interface GraphTraversal<S,E>
consumer
- the operation to perform at this step in relation to the Traverser
LambdaSideEffectStep
default CredentialTraversal<S,E> sideEffect(Traversal<?,?> sideEffectTraversal)
GraphTraversal
Traverser
and pass it to the next step unmodified.sideEffect
in interface GraphTraversal<S,E>
sideEffectTraversal
- the operation to perform at this step in relation to the Traverser
TraversalSideEffectStep
default <E2> CredentialTraversal<S,E2> cap(String sideEffectKey, String... sideEffectKeys)
GraphTraversal
Map
.cap
in interface GraphTraversal<S,E>
sideEffectKey
- the side-effect to emitsideEffectKeys
- other side-effects to emitSideEffectCapStep
default CredentialTraversal<S,Edge> subgraph(String sideEffectKey)
GraphTraversal
Graph
object held in the specified side-effect
key.subgraph
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the subgraphSubgraphStep
default CredentialTraversal<S,E> aggregate(String sideEffectKey)
GraphTraversal
GraphTraversal.aggregate(Scope, String)
with a Scope.global
.aggregate
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the aggregated objectsAggregateGlobalStep
default CredentialTraversal<S,E> aggregate(Scope scope, String sideEffectKey)
GraphTraversal
Scope
argument to determine whether it should be lazy
Scope.local
or eager (Scope.global
while gathering those objects.aggregate
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the aggregated objectsAggregateGlobalStep
default CredentialTraversal<S,E> group(String sideEffectKey)
GraphTraversal
Map
. Calls to group()
are typically accompanied with
GraphTraversal.by()
modulators which help specify how the grouping should occur.group
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the aggregated groupingGroupStep
.default CredentialTraversal<S,E> groupCount(String sideEffectKey)
GraphTraversal
Map
where the
object is the key and the value is the count.groupCount
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the aggregated groupingGroupCountStep
.default CredentialTraversal<S,E> fail()
GraphTraversal
RuntimeException
which implements the Failure
interface.
The traversal will be terminated as a result.fail
in interface GraphTraversal<S,E>
FailStep
.default CredentialTraversal<S,E> fail(String message)
GraphTraversal
RuntimeException
which implements the Failure
interface.
The traversal will be terminated as a result.fail
in interface GraphTraversal<S,E>
message
- the error message to include in the exceptionFailStep
.default CredentialTraversal<S,E> tree(String sideEffectKey)
GraphTraversal
Tree
data structure.tree
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the treeTreeStep
default <V,U> CredentialTraversal<S,E> sack(BiFunction<V,U,V> sackOperator)
GraphTraversal
Traverser
to its Traverser.sack()
value.sack
in interface GraphTraversal<S,E>
sackOperator
- the operator to apply to the sack valueSackStep
.default CredentialTraversal<S,E> store(String sideEffectKey)
GraphTraversal
store
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key that will hold the aggregateAggregateLocalStep
default CredentialTraversal<S,E> profile(String sideEffectKey)
GraphTraversal
profile
in interface GraphTraversal<S,E>
sideEffectKey
- the name of the side-effect key within which to hold the profile objectProfileSideEffectStep
default CredentialTraversal<S,TraversalMetrics> profile()
Traversal
profile
in interface GraphTraversal<S,E>
profile
in interface Traversal<S,E>
ProfileSideEffectStep
.default CredentialTraversal<S,E> property(VertexProperty.Cardinality cardinality, Object key, Object value, Object... keyValues)
GraphTraversal
Property
value and related meta properties if supplied, if supported by the Graph
and if the Element
is a VertexProperty
. This method is the long-hand version of
GraphTraversal.property(Object, Object, Object...)
with the difference that the VertexProperty.Cardinality
can be supplied.
*
Generally speaking, this method will append an AddPropertyStep
to the Traversal
but when
possible, this method will attempt to fold key/value pairs into an AddVertexStep
, AddEdgeStep
or
AddVertexStartStep
. This potential optimization can only happen if cardinality is not supplied
and when meta-properties are not included.property
in interface GraphTraversal<S,E>
cardinality
- the specified cardinality of the property where null
will allow the Graph
to use its default settingskey
- the key for the propertyvalue
- the value for the property which may not be null if the key
is of type T
keyValues
- any meta properties to be assigned to this propertydefault CredentialTraversal<S,E> property(Object key, Object value, Object... keyValues)
GraphTraversal
Property
. If the Element
is a VertexProperty
and the
Graph
supports it, meta properties can be set. Use of this method assumes that the
VertexProperty.Cardinality
is defaulted to null
which means that the default cardinality for
the Graph
will be used.
If a Map
is supplied then each of the key/value pairs in the map will
be added as property. This method is the long-hand version of looping through the
GraphTraversal.property(Object, Object, Object...)
method for each key/value pair supplied.
This method is effectively calls GraphTraversal.property(VertexProperty.Cardinality, Object, Object, Object...)
as property(null, key, value, keyValues
.property
in interface GraphTraversal<S,E>
key
- the key for the propertyvalue
- the value for the propertykeyValues
- any meta properties to be assigned to this propertydefault CredentialTraversal<S,E> property(Map<Object,Object> value)
GraphTraversal
Map
is supplied then each of the key/value pairs in the map will
be added as property. This method is the long-hand version of looping through the
GraphTraversal.property(Object, Object, Object...)
method for each key/value pair supplied.
If a Map
is not supplied then an exception is thrown.
This method is effectively calls GraphTraversal.property(VertexProperty.Cardinality, Object, Object, Object...)
as property(null, key, value, keyValues
.property
in interface GraphTraversal<S,E>
value
- the value for the propertydefault <M,E2> CredentialTraversal<S,E2> branch(Traversal<?,M> branchTraversal)
GraphTraversal
Traverser
to all the specified traversals.branch
in interface GraphTraversal<S,E>
branchTraversal
- the traversal to branch the Traverser
toTraversal
with the BranchStep
addeddefault <M,E2> CredentialTraversal<S,E2> branch(Function<Traverser<E>,M> function)
GraphTraversal
Traverser
to all the specified functions.branch
in interface GraphTraversal<S,E>
function
- the traversal to branch the Traverser
toTraversal
with the BranchStep
addeddefault <M,E2> CredentialTraversal<S,E2> choose(Traversal<?,M> choiceTraversal)
GraphTraversal
choose
is modified by GraphTraversal.option(M, org.apache.tinkerpop.gremlin.process.traversal.Traversal<?, E2>)
which provides the various
branch choices.choose
in interface GraphTraversal<S,E>
choiceTraversal
- the traversal used to determine the value for the branchChooseStep
default <E2> CredentialTraversal<S,E2> choose(Traversal<?,?> traversalPredicate, Traversal<?,E2> trueChoice, Traversal<?,E2> falseChoice)
GraphTraversal
choose
in interface GraphTraversal<S,E>
traversalPredicate
- the traversal used to determine the "if" portion of the if-then-elsetrueChoice
- the traversal to execute in the event the traversalPredicate
returns truefalseChoice
- the traversal to execute in the event the traversalPredicate
returns falseChooseStep
default <E2> CredentialTraversal<S,E2> choose(Traversal<?,?> traversalPredicate, Traversal<?,E2> trueChoice)
GraphTraversal
choose
in interface GraphTraversal<S,E>
traversalPredicate
- the traversal used to determine the "if" portion of the if-then-elsetrueChoice
- the traversal to execute in the event the traversalPredicate
returns trueChooseStep
default <M,E2> CredentialTraversal<S,E2> choose(Function<E,M> choiceFunction)
GraphTraversal
choose
is modified by GraphTraversal.option(M, org.apache.tinkerpop.gremlin.process.traversal.Traversal<?, E2>)
which provides the various
branch choices.choose
in interface GraphTraversal<S,E>
choiceFunction
- the function used to determine the value for the branchChooseStep
default <E2> CredentialTraversal<S,E2> choose(Predicate<E> choosePredicate, Traversal<?,E2> trueChoice, Traversal<?,E2> falseChoice)
GraphTraversal
choose
in interface GraphTraversal<S,E>
choosePredicate
- the function used to determine the "if" portion of the if-then-elsetrueChoice
- the traversal to execute in the event the traversalPredicate
returns truefalseChoice
- the traversal to execute in the event the traversalPredicate
returns falseChooseStep
default <E2> CredentialTraversal<S,E2> choose(Predicate<E> choosePredicate, Traversal<?,E2> trueChoice)
GraphTraversal
choose
in interface GraphTraversal<S,E>
choosePredicate
- the function used to determine the "if" portion of the if-then-elsetrueChoice
- the traversal to execute in the event the traversalPredicate
returns trueChooseStep
default <E2> CredentialTraversal<S,E2> optional(Traversal<?,E2> optionalTraversal)
GraphTraversal
optional
in interface GraphTraversal<S,E>
optionalTraversal
- the traversal to execute for a potential resultChooseStep
default <E2> CredentialTraversal<S,E2> union(Traversal<?,E2>... unionTraversals)
GraphTraversal
union
in interface GraphTraversal<S,E>
unionTraversals
- the traversals to mergeUnionStep
default <E2> CredentialTraversal<S,E2> coalesce(Traversal<?,E2>... coalesceTraversals)
GraphTraversal
coalesce
in interface GraphTraversal<S,E>
coalesceTraversals
- the traversals to coalesceCoalesceStep
default CredentialTraversal<S,E> repeat(Traversal<?,E> repeatTraversal)
GraphTraversal
repeat
in interface GraphTraversal<S,E>
repeatTraversal
- the traversal to repeat overRepeatStep
default CredentialTraversal<S,E> repeat(String loopName, Traversal<?,E> repeatTraversal)
GraphTraversal
repeat
in interface GraphTraversal<S,E>
loopName
- The name given to the looprepeatTraversal
- the traversal to repeat overRepeatStep
default CredentialTraversal<S,E> emit(Traversal<?,?> emitTraversal)
GraphTraversal
GraphTraversal.repeat(Traversal)
to determine what objects get emit from the loop.emit
in interface GraphTraversal<S,E>
emitTraversal
- the emit predicate defined as a traversalRepeatStep
default CredentialTraversal<S,E> emit(Predicate<Traverser<E>> emitPredicate)
GraphTraversal
GraphTraversal.repeat(Traversal)
to determine what objects get emit from the loop.emit
in interface GraphTraversal<S,E>
emitPredicate
- the emit predicateRepeatStep
default CredentialTraversal<S,E> emit()
GraphTraversal
GraphTraversal.repeat(Traversal)
to emit all objects from the loop.emit
in interface GraphTraversal<S,E>
RepeatStep
default CredentialTraversal<S,E> until(Traversal<?,?> untilTraversal)
GraphTraversal
GraphTraversal.repeat(Traversal)
to determine when the loop should exit.until
in interface GraphTraversal<S,E>
untilTraversal
- the traversal that determines when the loop exitsRepeatStep
default CredentialTraversal<S,E> until(Predicate<Traverser<E>> untilPredicate)
GraphTraversal
GraphTraversal.repeat(Traversal)
to determine when the loop should exit.until
in interface GraphTraversal<S,E>
untilPredicate
- the predicate that determines when the loop exitsRepeatStep
default CredentialTraversal<S,E> times(int maxLoops)
GraphTraversal
GraphTraversal.repeat(Traversal)
to specify how many loops should occur before exiting.times
in interface GraphTraversal<S,E>
maxLoops
- the number of loops to execute prior to exitingRepeatStep
default <E2> CredentialTraversal<S,E2> local(Traversal<?,E2> localTraversal)
GraphTraversal
local
in interface GraphTraversal<S,E>
localTraversal
- the traversal to execute locallyLocalStep
default CredentialTraversal<S,E> pageRank()
GraphTraversal
alpha
value.pageRank
in interface GraphTraversal<S,E>
PageRankVertexProgramStep
default CredentialTraversal<S,E> pageRank(double alpha)
GraphTraversal
pageRank
in interface GraphTraversal<S,E>
PageRankVertexProgramStep
default CredentialTraversal<S,E> peerPressure()
GraphTraversal
peerPressure
in interface GraphTraversal<S,E>
PeerPressureVertexProgramStep
default CredentialTraversal<S,E> connectedComponent()
GraphTraversal
connectedComponent
in interface GraphTraversal<S,E>
ConnectedComponentVertexProgram
default CredentialTraversal<S,Path> shortestPath()
GraphTraversal
shortestPath
in interface GraphTraversal<S,E>
ShortestPathVertexProgramStep
default CredentialTraversal<S,E> program(VertexProgram<?> vertexProgram)
GraphTraversal
VertexProgram
over the graph.program
in interface GraphTraversal<S,E>
ProgramVertexProgramStep
default CredentialTraversal<S,E> as(String stepLabel, String... stepLabels)
GraphTraversal
as
in interface GraphTraversal<S,E>
stepLabel
- the name of the stepstepLabels
- additional names for the labeldefault CredentialTraversal<S,E> barrier()
GraphTraversal
Integer.MAX_VALUE
.barrier
in interface GraphTraversal<S,E>
NoOpBarrierStep
default CredentialTraversal<S,E> barrier(int maxBarrierSize)
GraphTraversal
barrier
in interface GraphTraversal<S,E>
maxBarrierSize
- the size of the barrierNoOpBarrierStep
default <E2> CredentialTraversal<S,E2> index()
GraphTraversal
GraphTraversal.with(String, Object)
and WithOptions.indexer
.
Indexed as list: ["a","b","c"] => [["a",0],["b",1],["c",2]]
Indexed as map: ["a","b","c"] => {0:"a",1:"b",2:"c"}
If the current object is not a collection, this step will map the object to a single item collection/map:
Indexed as list: "a" => ["a",0]
Indexed as map: "a" => {0:"a"}index
in interface GraphTraversal<S,E>
IndexStep
default CredentialTraversal<S,E> barrier(Consumer<TraverserSet<Object>> barrierConsumer)
GraphTraversal
Integer.MAX_VALUE
.barrier
in interface GraphTraversal<S,E>
barrierConsumer
- a consumer function that is applied to the objects aggregated to the barrierNoOpBarrierStep
default CredentialTraversal<S,E> with(String key)
GraphTraversal
with(key, true)
. The key
of the configuration must be step specific and therefore a configuration could be supplied that is not known to
be valid until execution.with
in interface GraphTraversal<S,E>
key
- the key of the configuration to apply to a stepdefault CredentialTraversal<S,E> with(String key, Object value)
GraphTraversal
with
in interface GraphTraversal<S,E>
key
- the key of the configuration to apply to a stepvalue
- the value of the configuration to apply to a stepdefault CredentialTraversal<S,E> by()
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. This form is essentially
an GraphTraversal.identity()
modulation.by
in interface GraphTraversal<S,E>
default CredentialTraversal<S,E> by(Traversal<?,?> traversal)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified traversal.by
in interface GraphTraversal<S,E>
traversal
- the traversal to applydefault CredentialTraversal<S,E> by(T token)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified token of T
.by
in interface GraphTraversal<S,E>
token
- the token to applydefault CredentialTraversal<S,E> by(String key)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified key.by
in interface GraphTraversal<S,E>
key
- the key to applydefault <V> CredentialTraversal<S,E> by(Function<V,Object> function)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified function.by
in interface GraphTraversal<S,E>
function
- the function to applydefault <V> CredentialTraversal<S,E> by(Traversal<?,?> traversal, Comparator<V> comparator)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified function.by
in interface GraphTraversal<S,E>
traversal
- the traversal to applycomparator
- the comparator to apply typically for some GraphTraversal.order()
default CredentialTraversal<S,E> by(Comparator<E> comparator)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified function.by
in interface GraphTraversal<S,E>
comparator
- the comparator to apply typically for some GraphTraversal.order()
default CredentialTraversal<S,E> by(Order order)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified function.by
in interface GraphTraversal<S,E>
order
- the comparator to apply typically for some GraphTraversal.order()
default <V> CredentialTraversal<S,E> by(String key, Comparator<V> comparator)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified function.by
in interface GraphTraversal<S,E>
key
- the key to apply traversalcomparator
- the comparator to apply typically for some GraphTraversal.order()
default <U> CredentialTraversal<S,E> by(Function<U,Object> function, Comparator comparator)
GraphTraversal
by()
can be applied to a number of different step to alter their behaviors. Modifies the previous
step with the specified function.by
in interface GraphTraversal<S,E>
function
- the function to applycomparator
- the comparator to apply typically for some GraphTraversal.order()
default <M,E2> CredentialTraversal<S,E> option(M token, Traversal<?,E2> traversalOption)
GraphTraversal
TraversalOptionParent
like choose()
or mergeV()
where the
provided argument associated to the token
is applied according to the semantics of the step. Please see
the documentation of such steps to understand the usage context.option
in interface GraphTraversal<S,E>
token
- the token that would trigger this option which may be a Pick
, Merge
,
a Traversal
, Predicate
, or object depending on the step being modulated.traversalOption
- the option as a traversaldefault <M,E2> CredentialTraversal<S,E> option(M token, Map<Object,Object> m)
GraphTraversal
TraversalOptionParent
like choose()
or mergeV()
where the
provided argument associated to the token
is applied according to the semantics of the step. Please see
the documentation of such steps to understand the usage context.option
in interface GraphTraversal<S,E>
m
- Provides a Map
as the option which is the same as doing constant(m)
.default <E2> CredentialTraversal<S,E> option(Traversal<?,E2> traversalOption)
GraphTraversal
GraphTraversal.choose(Function)
to specifies the available choices that might be executed.option
in interface GraphTraversal<S,E>
traversalOption
- the option as a traversaldefault CredentialTraversal<S,E> read()
GraphTraversal
GraphTraversalSource.io(String)
step which
instructs the step to perform a read with its given configuration.read
in interface GraphTraversal<S,E>
IoStep
modulated to readdefault CredentialTraversal<S,E> write()
GraphTraversal
GraphTraversalSource.io(String)
step which
instructs the step to perform a write with its given configuration.write
in interface GraphTraversal<S,E>
IoStep
modulated to writedefault CredentialTraversal<S,E> iterate()
Traversal
Traverser
instances in the traversal.
What is returned is the empty traversal.
It is assumed that what is desired from the computation is are the sideEffects yielded by the traversal.Copyright © 2013–2022 Apache Software Foundation. All rights reserved.