public interface GraphTraversal<S,E> extends Traversal<S,E>
Modifier and Type | Interface and Description |
---|---|
static interface |
GraphTraversal.Admin<S,E> |
static class |
GraphTraversal.Symbols |
Traversal.Exceptions
Modifier and Type | Method and Description |
---|---|
default GraphTraversal<S,Edge> |
addE(Direction direction,
String firstVertexKeyOrEdgeLabel,
String edgeLabelOrSecondVertexKey,
Object... propertyKeyValues)
Deprecated.
As of release 3.1.0, replaced by
addE(String) |
default GraphTraversal<S,Edge> |
addE(String edgeLabel) |
default GraphTraversal<S,Edge> |
addInE(String firstVertexKeyOrEdgeLabel,
String edgeLabelOrSecondVertexKey,
Object... propertyKeyValues)
Deprecated.
As of release 3.1.0, replaced by
addE(String) |
default GraphTraversal<S,Edge> |
addOutE(String firstVertexKeyOrEdgeLabel,
String edgeLabelOrSecondVertexKey,
Object... propertyKeyValues)
Deprecated.
As of release 3.1.0, replaced by
addE(String) |
default GraphTraversal<S,Vertex> |
addV() |
default GraphTraversal<S,Vertex> |
addV(Object... propertyKeyValues)
Deprecated.
As of release 3.1.0, replaced by
addV() |
default GraphTraversal<S,Vertex> |
addV(String vertexLabel) |
default GraphTraversal<S,E> |
aggregate(String sideEffectKey) |
default GraphTraversal<S,E> |
and(Traversal<?,?>... andTraversals) |
default GraphTraversal<S,E> |
as(String stepLabel,
String... stepLabels) |
default GraphTraversal.Admin<S,E> |
asAdmin()
Get access to administrative methods of the traversal via its accompanying
Traversal.Admin . |
default GraphTraversal<S,E> |
barrier() |
default GraphTraversal<S,E> |
barrier(Consumer<TraverserSet<Object>> barrierConsumer) |
default GraphTraversal<S,E> |
barrier(int maxBarrierSize) |
default GraphTraversal<S,Vertex> |
both(String... edgeLabels)
Map the
Vertex to its adjacent vertices given the edge labels. |
default GraphTraversal<S,Edge> |
bothE(String... edgeLabels)
Map the
Vertex to its incident edges given the edge labels. |
default GraphTraversal<S,Vertex> |
bothV()
Map the
Edge to its incident vertices. |
default <M,E2> GraphTraversal<S,E2> |
branch(Function<Traverser<E>,M> function) |
default <M,E2> GraphTraversal<S,E2> |
branch(Traversal<?,M> branchTraversal) |
default GraphTraversal<S,E> |
by() |
default GraphTraversal<S,E> |
by(Comparator<E> comparator) |
default <U> GraphTraversal<S,E> |
by(Function<U,Object> function,
Comparator comparator) |
default <V> GraphTraversal<S,E> |
by(Function<V,Object> function) |
default GraphTraversal<S,E> |
by(Order order) |
default GraphTraversal<S,E> |
by(String key) |
default <V> GraphTraversal<S,E> |
by(String key,
Comparator<V> comparator) |
default GraphTraversal<S,E> |
by(T token) |
default GraphTraversal<S,E> |
by(Traversal<?,?> traversal) |
default <V> GraphTraversal<S,E> |
by(Traversal<?,?> traversal,
Comparator<V> comparator) |
default <E2> GraphTraversal<S,E2> |
cap(String sideEffectKey,
String... sideEffectKeys) |
default <M,E2> GraphTraversal<S,E2> |
choose(Function<E,M> choiceFunction) |
default <E2> GraphTraversal<S,E2> |
choose(Predicate<E> choosePredicate,
Traversal<?,E2> trueChoice) |
default <E2> GraphTraversal<S,E2> |
choose(Predicate<E> choosePredicate,
Traversal<?,E2> trueChoice,
Traversal<?,E2> falseChoice) |
default <E2> GraphTraversal<S,E2> |
choose(Traversal<?,?> traversalPredicate,
Traversal<?,E2> trueChoice) |
default <E2> GraphTraversal<S,E2> |
choose(Traversal<?,?> traversalPredicate,
Traversal<?,E2> trueChoice,
Traversal<?,E2> falseChoice) |
default <M,E2> GraphTraversal<S,E2> |
choose(Traversal<?,M> choiceTraversal) |
default <E2> GraphTraversal<S,E2> |
coalesce(Traversal<?,E2>... coalesceTraversals) |
default GraphTraversal<S,E> |
coin(double probability)
Filter the
E object given a biased coin toss. |
default <E2> GraphTraversal<S,E2> |
constant(E2 e)
Map any object to a fixed
E value. |
default GraphTraversal<S,Long> |
count()
Map the traversal stream to its reduction as a sum of the
Traverser.bulk() values (i.e. |
default GraphTraversal<S,Long> |
count(Scope scope) |
default GraphTraversal<S,E> |
cyclicPath()
|
default GraphTraversal<S,E> |
dedup(Scope scope,
String... dedupLabels)
Remove all duplicates in the traversal stream up to this point.
|
default GraphTraversal<S,E> |
dedup(String... dedupLabels)
Remove all duplicates in the traversal stream up to this point.
|
default GraphTraversal<S,E> |
drop() |
default GraphTraversal<S,E> |
emit() |
default GraphTraversal<S,E> |
emit(Predicate<Traverser<E>> emitPredicate) |
default GraphTraversal<S,E> |
emit(Traversal<?,?> emitTraversal) |
default GraphTraversal<S,E> |
filter(Predicate<Traverser<E>> predicate) |
default GraphTraversal<S,E> |
filter(Traversal<?,?> filterTraversal) |
default <E2> GraphTraversal<S,E2> |
flatMap(Function<Traverser<E>,Iterator<E2>> function)
|
default <E2> GraphTraversal<S,E2> |
flatMap(Traversal<?,E2> flatMapTraversal)
|
default GraphTraversal<S,List<E>> |
fold() |
default <E2> GraphTraversal<S,E2> |
fold(E2 seed,
BiFunction<E2,E,E2> foldFunction) |
default GraphTraversal<S,E> |
from(String fromStepLabel) |
default GraphTraversal<S,E> |
from(Traversal<E,Vertex> fromVertex) |
default <K,V> GraphTraversal<S,Map<K,V>> |
group() |
default GraphTraversal<S,E> |
group(String sideEffectKey) |
default <K> GraphTraversal<S,Map<K,Long>> |
groupCount() |
default GraphTraversal<S,E> |
groupCount(String sideEffectKey) |
default <K,V> GraphTraversal<S,Map<K,V>> |
groupV3d0()
Deprecated.
As of release 3.1.0, replaced by
group() |
default GraphTraversal<S,E> |
groupV3d0(String sideEffectKey)
Deprecated.
As of release 3.1.0, replaced by
group(String) . |
default GraphTraversal<S,E> |
has(String propertyKey) |
default GraphTraversal<S,E> |
has(String propertyKey,
Object value) |
default GraphTraversal<S,E> |
has(String propertyKey,
P<?> predicate) |
default GraphTraversal<S,E> |
has(String label,
String propertyKey,
Object value) |
default GraphTraversal<S,E> |
has(String label,
String propertyKey,
P<?> predicate) |
default GraphTraversal<S,E> |
has(String propertyKey,
Traversal<?,?> propertyTraversal) |
default GraphTraversal<S,E> |
has(T accessor,
Object value) |
default GraphTraversal<S,E> |
has(T accessor,
P<?> predicate) |
default GraphTraversal<S,E> |
has(T accessor,
Traversal<?,?> propertyTraversal) |
default GraphTraversal<S,E> |
hasId(Object id,
Object... otherIds) |
default GraphTraversal<S,E> |
hasId(P<Object> predicate) |
default GraphTraversal<S,E> |
hasKey(P<String> predicate) |
default GraphTraversal<S,E> |
hasKey(String label,
String... otherLabels) |
default GraphTraversal<S,E> |
hasLabel(P<String> predicate) |
default GraphTraversal<S,E> |
hasLabel(String label,
String... otherLabels) |
default GraphTraversal<S,E> |
hasNot(String propertyKey) |
default GraphTraversal<S,E> |
hasValue(Object value,
Object... otherValues) |
default GraphTraversal<S,E> |
hasValue(P<Object> predicate) |
default GraphTraversal<S,Object> |
id()
Map the
Element to its Element.id() . |
default GraphTraversal<S,E> |
identity()
Map the
E object to itself. |
default GraphTraversal<S,Vertex> |
in(String... edgeLabels)
Map the
Vertex to its incoming adjacent vertices given the edge labels. |
default GraphTraversal<S,Edge> |
inE(String... edgeLabels)
Map the
Vertex to its incoming incident edges given the edge labels. |
default GraphTraversal<S,E> |
inject(E... injections) |
default GraphTraversal<S,Vertex> |
inV()
|
default GraphTraversal<S,E> |
is(Object value)
Filter the
E object if it is not P.eq(V) to the provided value. |
default GraphTraversal<S,E> |
is(P<E> predicate) |
default GraphTraversal<S,E> |
iterate()
Iterate all the
Traverser instances in the traversal. |
default GraphTraversal<S,String> |
key()
Map the
Property to its Property.key() . |
default GraphTraversal<S,String> |
label()
Map the
Element to its Element.label() . |
default GraphTraversal<S,E> |
limit(long limit) |
default <E2> GraphTraversal<S,E2> |
limit(Scope scope,
long limit) |
default <E2> GraphTraversal<S,E2> |
local(Traversal<?,E2> localTraversal) |
default GraphTraversal<S,Integer> |
loops() |
default <E2> GraphTraversal<S,E2> |
map(Function<Traverser<E>,E2> function)
Map a traverser referencing an object of type
E to an object of type E2 . |
default <E2> GraphTraversal<S,E2> |
map(Traversal<?,E2> mapTraversal) |
default <E2> GraphTraversal<S,E2> |
mapKeys()
Deprecated.
As of release 3.1.0, replaced by
select(Column) |
default <E2> GraphTraversal<S,E2> |
mapValues()
Deprecated.
As of release 3.1.0, replaced by
select(Column) |
default <E2> GraphTraversal<S,Map<String,E2>> |
match(Traversal<?,?>... matchTraversals)
|
default <E2 extends Number> |
max() |
default <E2 extends Number> |
max(Scope scope) |
default <E2 extends Number> |
mean() |
default <E2 extends Number> |
mean(Scope scope) |
default <E2 extends Number> |
min() |
default <E2 extends Number> |
min(Scope scope) |
default GraphTraversal<S,E> |
not(Traversal<?,?> notTraversal) |
default <M,E2> GraphTraversal<S,E> |
option(M pickToken,
Traversal<E,E2> traversalOption) |
default <E2> GraphTraversal<S,E> |
option(Traversal<E,E2> traversalOption) |
default <E2> GraphTraversal<S,E2> |
optional(Traversal<?,E2> optionalTraversal) |
default GraphTraversal<S,E> |
or(Traversal<?,?>... orTraversals) |
default GraphTraversal<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 GraphTraversal<S,E> |
order(Scope scope)
Order either the
Scope.local object (e.g. |
default GraphTraversal<S,Vertex> |
otherV()
Map the
Edge to the incident vertex that was not just traversed from in the path history. |
default GraphTraversal<S,Vertex> |
out(String... edgeLabels)
Map the
Vertex to its outgoing adjacent vertices given the edge labels. |
default GraphTraversal<S,Edge> |
outE(String... edgeLabels)
Map the
Vertex to its outgoing incident edges given the edge labels. |
default GraphTraversal<S,Vertex> |
outV()
|
default GraphTraversal<S,E> |
pageRank() |
default GraphTraversal<S,E> |
pageRank(double alpha) |
default GraphTraversal<S,Path> |
path()
|
default GraphTraversal<S,E> |
peerPressure() |
default GraphTraversal<S,TraversalMetrics> |
profile()
Profile the traversal.
|
default GraphTraversal<S,E> |
profile(String sideEffectKey) |
default GraphTraversal<S,E> |
program(VertexProgram<?> vertexProgram) |
default <E2> GraphTraversal<S,Map<String,E2>> |
project(String projectKey,
String... otherProjectKeys) |
default <E2> GraphTraversal<S,? extends Property<E2>> |
properties(String... propertyKeys)
Map the
Element to its associated properties given the provide property keys. |
default GraphTraversal<S,E> |
property(Object key,
Object value,
Object... keyValues)
Sets the key and value of a
Property . |
default GraphTraversal<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> GraphTraversal<S,Map<String,E2>> |
propertyMap(String... propertyKeys)
|
default GraphTraversal<S,E> |
range(long low,
long high) |
default <E2> GraphTraversal<S,E2> |
range(Scope scope,
long low,
long high) |
default GraphTraversal<S,E> |
repeat(Traversal<?,E> repeatTraversal) |
default <E2> GraphTraversal<S,E2> |
sack()
Map the
Traverser to its Traverser.sack() value. |
default <V,U> GraphTraversal<S,E> |
sack(BiFunction<V,U,V> sackOperator) |
default <V,U> GraphTraversal<S,E> |
sack(BiFunction<V,U,V> sackOperator,
String elementPropertyKey)
Deprecated.
As of release 3.1.0, replaced by
sack(BiFunction) with by(String) . |
default GraphTraversal<S,E> |
sample(int amountToSample) |
default GraphTraversal<S,E> |
sample(Scope scope,
int amountToSample) |
default <E2> GraphTraversal<S,Collection<E2>> |
select(Column column) |
default <E2> GraphTraversal<S,E2> |
select(Pop pop,
String selectKey) |
default <E2> GraphTraversal<S,Map<String,E2>> |
select(Pop pop,
String selectKey1,
String selectKey2,
String... otherSelectKeys)
|
default <E2> GraphTraversal<S,E2> |
select(String selectKey) |
default <E2> GraphTraversal<S,Map<String,E2>> |
select(String selectKey1,
String selectKey2,
String... otherSelectKeys)
|
default GraphTraversal<S,E> |
sideEffect(Consumer<Traverser<E>> consumer) |
default GraphTraversal<S,E> |
sideEffect(Traversal<?,?> sideEffectTraversal) |
default GraphTraversal<S,E> |
simplePath()
|
default GraphTraversal<S,E> |
store(String sideEffectKey) |
default GraphTraversal<S,Edge> |
subgraph(String sideEffectKey) |
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) |
default GraphTraversal<S,E> |
tail() |
default GraphTraversal<S,E> |
tail(long limit) |
default <E2> GraphTraversal<S,E2> |
tail(Scope scope) |
default <E2> GraphTraversal<S,E2> |
tail(Scope scope,
long limit) |
default GraphTraversal<S,E> |
timeLimit(long timeLimit)
Once the first
Traverser hits this step, a count down is started. |
default GraphTraversal<S,E> |
times(int maxLoops) |
default GraphTraversal<S,Vertex> |
to(Direction direction,
String... edgeLabels)
Map the
Vertex to its adjacent vertices given a direction and edge labels. |
default GraphTraversal<S,E> |
to(String toStepLabel) |
default GraphTraversal<S,E> |
to(Traversal<E,Vertex> toVertex) |
default GraphTraversal<S,Edge> |
toE(Direction direction,
String... edgeLabels)
Map the
Vertex to its incident edges given the direction and edge labels. |
default GraphTraversal<S,Vertex> |
toV(Direction direction)
Map the
Edge to its incident vertices given the direction. |
default GraphTraversal<S,Tree> |
tree() |
default GraphTraversal<S,E> |
tree(String sideEffectKey) |
default <E2> GraphTraversal<S,E2> |
unfold() |
default <E2> GraphTraversal<S,E2> |
union(Traversal<?,E2>... unionTraversals) |
default GraphTraversal<S,E> |
until(Predicate<Traverser<E>> untilPredicate) |
default GraphTraversal<S,E> |
until(Traversal<?,?> untilTraversal) |
default GraphTraversal<S,Vertex> |
V(Object... vertexIdsOrElements) |
default <E2> GraphTraversal<S,E2> |
value()
Map the
Property to its Property.value() . |
default <E2> GraphTraversal<S,Map<String,E2>> |
valueMap(boolean includeTokens,
String... propertyKeys)
|
default <E2> GraphTraversal<S,Map<String,E2>> |
valueMap(String... propertyKeys)
|
default <E2> GraphTraversal<S,E2> |
values(String... propertyKeys)
Map the
Element to the values of the associated properties given the provide property keys. |
default GraphTraversal<S,E> |
where(P<String> predicate) |
default GraphTraversal<S,E> |
where(String startKey,
P<String> predicate) |
default GraphTraversal<S,E> |
where(Traversal<?,?> whereTraversal) |
default GraphTraversal.Admin<S,E> asAdmin()
Traversal
Traversal.Admin
.default <E2> GraphTraversal<S,E2> map(Function<Traverser<E>,E2> function)
E
to an object of type E2
.function
- the lambda expression that does the functional mappingLambdaMapStep
.default <E2> GraphTraversal<S,E2> map(Traversal<?,E2> mapTraversal)
default <E2> GraphTraversal<S,E2> flatMap(Function<Traverser<E>,Iterator<E2>> function)
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.E2
- the type of the returned iterator objectsfunction
- the lambda expression that does the functional mappingLambdaFlatMapStep
.default <E2> GraphTraversal<S,E2> flatMap(Traversal<?,E2> flatMapTraversal)
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.E2
- the end type of the internal traversalflatMapTraversal
- the traversal generating objects of type E2
TraversalFlatMapStep
.default GraphTraversal<S,Object> id()
Element
to its Element.id()
.IdStep
.default GraphTraversal<S,String> label()
Element
to its Element.label()
.LabelStep
.default GraphTraversal<S,E> identity()
E
object to itself. In other words, a "no op."IdentityStep
.default <E2> GraphTraversal<S,E2> constant(E2 e)
E
value.ConstantStep
.default GraphTraversal<S,Vertex> V(Object... vertexIdsOrElements)
default GraphTraversal<S,Vertex> to(Direction direction, String... edgeLabels)
Vertex
to its adjacent vertices given a direction and edge labels.direction
- the direction to traverse from the current vertexedgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Vertex> out(String... edgeLabels)
Vertex
to its outgoing adjacent vertices given the edge labels.edgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Vertex> in(String... edgeLabels)
Vertex
to its incoming adjacent vertices given the edge labels.edgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Vertex> both(String... edgeLabels)
Vertex
to its adjacent vertices given the edge labels.edgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Edge> toE(Direction direction, String... edgeLabels)
Vertex
to its incident edges given the direction and edge labels.direction
- the direction to traverse from the current vertexedgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Edge> outE(String... edgeLabels)
Vertex
to its outgoing incident edges given the edge labels.edgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Edge> inE(String... edgeLabels)
Vertex
to its incoming incident edges given the edge labels.edgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Edge> bothE(String... edgeLabels)
Vertex
to its incident edges given the edge labels.edgeLabels
- the edge labels to traverseVertexStep
.default GraphTraversal<S,Vertex> toV(Direction direction)
Edge
to its incident vertices given the direction.direction
- the direction to traverser from the current edgeEdgeVertexStep
.default GraphTraversal<S,Vertex> inV()
EdgeVertexStep
.default GraphTraversal<S,Vertex> outV()
EdgeVertexStep
.default GraphTraversal<S,Vertex> bothV()
Edge
to its incident vertices.EdgeVertexStep
.default GraphTraversal<S,Vertex> otherV()
Edge
to the incident vertex that was not just traversed from in the path history.EdgeOtherVertexStep
.default GraphTraversal<S,E> order()
OrderGlobalStep
.default GraphTraversal<S,E> order(Scope scope)
Scope.local
object (e.g. a list, map, etc.) or the entire Scope.global
traversal stream.scope
- whether the ordering is the current local object or the entire global stream.OrderGlobalStep
or OrderLocalStep
.default <E2> GraphTraversal<S,? extends Property<E2>> properties(String... propertyKeys)
Element
to its associated properties given the provide property keys.
If no property keys are provided, then all properties are emitted.E2
- the value type of the returned propertiespropertyKeys
- the properties to retrievePropertiesStep
.default <E2> GraphTraversal<S,E2> values(String... propertyKeys)
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.E2
- the value type of the propertiespropertyKeys
- the properties to retrieve their value fromPropertiesStep
.default <E2> GraphTraversal<S,Map<String,E2>> propertyMap(String... propertyKeys)
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.E2
- the value type of the returned propertiespropertyKeys
- the properties to retrievePropertyMapStep
.default <E2> GraphTraversal<S,Map<String,E2>> valueMap(String... propertyKeys)
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.E2
- the value type of the returned propertiespropertyKeys
- the properties to retrievePropertyMapStep
.default <E2> GraphTraversal<S,Map<String,E2>> valueMap(boolean includeTokens, String... propertyKeys)
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.E2
- the value type of the returned propertiesincludeTokens
- whether to include T
tokens in the emitted map.propertyKeys
- the properties to retrievePropertyMapStep
.default <E2> GraphTraversal<S,Collection<E2>> select(Column column)
@Deprecated default <E2> GraphTraversal<S,E2> mapValues()
select(Column)
@Deprecated default <E2> GraphTraversal<S,E2> mapKeys()
select(Column)
default GraphTraversal<S,String> key()
Property
to its Property.key()
.PropertyKeyStep
.default <E2> GraphTraversal<S,E2> value()
Property
to its Property.value()
.PropertyValueStep
.default GraphTraversal<S,Path> path()
PathStep
.default <E2> GraphTraversal<S,Map<String,E2>> match(Traversal<?,?>... matchTraversals)
E2
- the type of the obejcts bound in the variablesmatchTraversals
- the traversal that maintain variables which must hold for the life of the traverserMatchStep
.default <E2> GraphTraversal<S,E2> sack()
Traverser
to its Traverser.sack()
value.E2
- the sack value typeSackStep
.default GraphTraversal<S,Integer> loops()
default <E2> GraphTraversal<S,Map<String,E2>> project(String projectKey, String... otherProjectKeys)
default <E2> GraphTraversal<S,Map<String,E2>> select(Pop pop, String selectKey1, String selectKey2, String... otherSelectKeys)
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> GraphTraversal<S,Map<String,E2>> select(String selectKey1, String selectKey2, String... otherSelectKeys)
E2
- the type of the objects projectedselectKey1
- the first key to projectselectKey2
- the second key to projectotherSelectKeys
- the third+ keys to projectSelectStep
.default <E2> GraphTraversal<S,E2> select(Pop pop, String selectKey)
default <E2> GraphTraversal<S,E2> select(String selectKey)
default <E2> GraphTraversal<S,E2> unfold()
default GraphTraversal<S,List<E>> fold()
default <E2> GraphTraversal<S,E2> fold(E2 seed, BiFunction<E2,E,E2> foldFunction)
default GraphTraversal<S,Long> count()
Traverser.bulk()
values (i.e. count the number of traversers up to this point).CountGlobalStep
.default GraphTraversal<S,Long> count(Scope scope)
default <E2 extends Number> GraphTraversal<S,E2> sum()
Traverser.get()
values multiplied by their Traverser.bulk()
(i.e. sum the traverser values up to this point).SumGlobalStep
.default <E2 extends Number> GraphTraversal<S,E2> sum(Scope scope)
default <E2 extends Number> GraphTraversal<S,E2> max()
default <E2 extends Number> GraphTraversal<S,E2> max(Scope scope)
default <E2 extends Number> GraphTraversal<S,E2> min()
default <E2 extends Number> GraphTraversal<S,E2> min(Scope scope)
default <E2 extends Number> GraphTraversal<S,E2> mean()
default <E2 extends Number> GraphTraversal<S,E2> mean(Scope scope)
default <K,V> GraphTraversal<S,Map<K,V>> group()
@Deprecated default <K,V> GraphTraversal<S,Map<K,V>> groupV3d0()
group()
default <K> GraphTraversal<S,Map<K,Long>> groupCount()
default GraphTraversal<S,Tree> tree()
default GraphTraversal<S,Vertex> addV(String vertexLabel)
default GraphTraversal<S,Vertex> addV()
@Deprecated default GraphTraversal<S,Vertex> addV(Object... propertyKeyValues)
addV()
default GraphTraversal<S,Edge> addE(String edgeLabel)
default GraphTraversal<S,E> to(String toStepLabel)
default GraphTraversal<S,E> from(String fromStepLabel)
@Deprecated default GraphTraversal<S,Edge> addE(Direction direction, String firstVertexKeyOrEdgeLabel, String edgeLabelOrSecondVertexKey, Object... propertyKeyValues)
addE(String)
@Deprecated default GraphTraversal<S,Edge> addOutE(String firstVertexKeyOrEdgeLabel, String edgeLabelOrSecondVertexKey, Object... propertyKeyValues)
addE(String)
@Deprecated default GraphTraversal<S,Edge> addInE(String firstVertexKeyOrEdgeLabel, String edgeLabelOrSecondVertexKey, Object... propertyKeyValues)
addE(String)
default GraphTraversal<S,E> filter(Traversal<?,?> filterTraversal)
default GraphTraversal<S,E> or(Traversal<?,?>... orTraversals)
default GraphTraversal<S,E> and(Traversal<?,?>... andTraversals)
default GraphTraversal<S,E> inject(E... injections)
default GraphTraversal<S,E> dedup(Scope scope, String... dedupLabels)
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
.default GraphTraversal<S,E> dedup(String... dedupLabels)
dedupLabels
- if labels are provided, then the scoped object's labels determine de-duplication. No labels implies current object.DedupGlobalStep
.default GraphTraversal<S,E> where(P<String> predicate)
default GraphTraversal<S,E> where(Traversal<?,?> whereTraversal)
default GraphTraversal<S,E> has(String propertyKey, P<?> predicate)
default GraphTraversal<S,E> has(T accessor, P<?> predicate)
default GraphTraversal<S,E> has(String propertyKey, Object value)
default GraphTraversal<S,E> has(T accessor, Object value)
default GraphTraversal<S,E> has(T accessor, Traversal<?,?> propertyTraversal)
default GraphTraversal<S,E> has(String propertyKey, Traversal<?,?> propertyTraversal)
default GraphTraversal<S,E> has(String propertyKey)
default GraphTraversal<S,E> hasNot(String propertyKey)
default GraphTraversal<S,E> hasLabel(String label, String... otherLabels)
default GraphTraversal<S,E> hasLabel(P<String> predicate)
default GraphTraversal<S,E> hasId(Object id, Object... otherIds)
default GraphTraversal<S,E> hasId(P<Object> predicate)
default GraphTraversal<S,E> hasKey(String label, String... otherLabels)
default GraphTraversal<S,E> hasKey(P<String> predicate)
default GraphTraversal<S,E> hasValue(Object value, Object... otherValues)
default GraphTraversal<S,E> hasValue(P<Object> predicate)
default GraphTraversal<S,E> is(P<E> predicate)
default GraphTraversal<S,E> is(Object value)
E
object if it is not P.eq(V)
to the provided value.value
- the value that the object must equal.IsStep
.default GraphTraversal<S,E> not(Traversal<?,?> notTraversal)
default GraphTraversal<S,E> coin(double probability)
E
object given a biased coin toss.probability
- the probability that the object will pass throughCoinStep
.default GraphTraversal<S,E> range(long low, long high)
default <E2> GraphTraversal<S,E2> range(Scope scope, long low, long high)
default GraphTraversal<S,E> limit(long limit)
default <E2> GraphTraversal<S,E2> limit(Scope scope, long limit)
default GraphTraversal<S,E> tail()
default GraphTraversal<S,E> tail(long limit)
default <E2> GraphTraversal<S,E2> tail(Scope scope)
default <E2> GraphTraversal<S,E2> tail(Scope scope, long limit)
default GraphTraversal<S,E> timeLimit(long timeLimit)
Traverser
hits this step, a count down is started. Once the time limit is up, all remaining traversers are filtered out.timeLimit
- the count down timeTimeLimitStep
default GraphTraversal<S,E> simplePath()
SimplePathStep
.default GraphTraversal<S,E> cyclicPath()
CyclicPathStep
.default GraphTraversal<S,E> sample(int amountToSample)
default GraphTraversal<S,E> sample(Scope scope, int amountToSample)
default GraphTraversal<S,E> drop()
default GraphTraversal<S,E> sideEffect(Traversal<?,?> sideEffectTraversal)
default <E2> GraphTraversal<S,E2> cap(String sideEffectKey, String... sideEffectKeys)
default GraphTraversal<S,Edge> subgraph(String sideEffectKey)
default GraphTraversal<S,E> aggregate(String sideEffectKey)
default GraphTraversal<S,E> group(String sideEffectKey)
default GraphTraversal<S,E> groupV3d0(String sideEffectKey)
group(String)
.default GraphTraversal<S,E> groupCount(String sideEffectKey)
default GraphTraversal<S,E> tree(String sideEffectKey)
default <V,U> GraphTraversal<S,E> sack(BiFunction<V,U,V> sackOperator)
@Deprecated default <V,U> GraphTraversal<S,E> sack(BiFunction<V,U,V> sackOperator, String elementPropertyKey)
sack(BiFunction)
with by(String)
.default GraphTraversal<S,E> store(String sideEffectKey)
default GraphTraversal<S,E> profile(String sideEffectKey)
default GraphTraversal<S,TraversalMetrics> profile()
Traversal
profile
in interface Traversal<S,E>
ProfileSideEffectStep
.default GraphTraversal<S,E> property(VertexProperty.Cardinality cardinality, Object key, Object value, Object... keyValues)
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
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.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 propertykeyValues
- any meta properties to be assigned to this propertydefault GraphTraversal<S,E> property(Object key, Object value, Object... keyValues)
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.
This method is effectively calls
property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality, Object, Object, Object...)
as property(null, key, value, keyValues
.key
- the key for the propertyvalue
- the value for the propertykeyValues
- any meta properties to be assigned to this propertydefault <M,E2> GraphTraversal<S,E2> branch(Traversal<?,M> branchTraversal)
default <M,E2> GraphTraversal<S,E2> branch(Function<Traverser<E>,M> function)
default <M,E2> GraphTraversal<S,E2> choose(Traversal<?,M> choiceTraversal)
default <E2> GraphTraversal<S,E2> choose(Traversal<?,?> traversalPredicate, Traversal<?,E2> trueChoice, Traversal<?,E2> falseChoice)
default <E2> GraphTraversal<S,E2> choose(Traversal<?,?> traversalPredicate, Traversal<?,E2> trueChoice)
default <M,E2> GraphTraversal<S,E2> choose(Function<E,M> choiceFunction)
default <E2> GraphTraversal<S,E2> choose(Predicate<E> choosePredicate, Traversal<?,E2> trueChoice, Traversal<?,E2> falseChoice)
default <E2> GraphTraversal<S,E2> choose(Predicate<E> choosePredicate, Traversal<?,E2> trueChoice)
default <E2> GraphTraversal<S,E2> optional(Traversal<?,E2> optionalTraversal)
default <E2> GraphTraversal<S,E2> union(Traversal<?,E2>... unionTraversals)
default <E2> GraphTraversal<S,E2> coalesce(Traversal<?,E2>... coalesceTraversals)
default GraphTraversal<S,E> repeat(Traversal<?,E> repeatTraversal)
default GraphTraversal<S,E> emit(Traversal<?,?> emitTraversal)
default GraphTraversal<S,E> emit()
default GraphTraversal<S,E> until(Traversal<?,?> untilTraversal)
default GraphTraversal<S,E> times(int maxLoops)
default <E2> GraphTraversal<S,E2> local(Traversal<?,E2> localTraversal)
default GraphTraversal<S,E> pageRank()
default GraphTraversal<S,E> pageRank(double alpha)
default GraphTraversal<S,E> peerPressure()
default GraphTraversal<S,E> program(VertexProgram<?> vertexProgram)
default GraphTraversal<S,E> as(String stepLabel, String... stepLabels)
default GraphTraversal<S,E> barrier()
default GraphTraversal<S,E> barrier(int maxBarrierSize)
default GraphTraversal<S,E> barrier(Consumer<TraverserSet<Object>> barrierConsumer)
default GraphTraversal<S,E> by()
default GraphTraversal<S,E> by(Traversal<?,?> traversal)
default GraphTraversal<S,E> by(T token)
default GraphTraversal<S,E> by(String key)
default <V> GraphTraversal<S,E> by(Function<V,Object> function)
default <V> GraphTraversal<S,E> by(Traversal<?,?> traversal, Comparator<V> comparator)
default GraphTraversal<S,E> by(Comparator<E> comparator)
default GraphTraversal<S,E> by(Order order)
default <V> GraphTraversal<S,E> by(String key, Comparator<V> comparator)
default <U> GraphTraversal<S,E> by(Function<U,Object> function, Comparator comparator)
default <M,E2> GraphTraversal<S,E> option(M pickToken, Traversal<E,E2> traversalOption)
default <E2> GraphTraversal<S,E> option(Traversal<E,E2> traversalOption)
default GraphTraversal<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–2017 Apache Software Foundation. All rights reserved.