Class CredentialTraversalSource
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource
-
- org.apache.tinkerpop.gremlin.groovy.jsr223.dsl.credential.CredentialTraversalSourceDsl
-
- org.apache.tinkerpop.gremlin.groovy.jsr223.dsl.credential.CredentialTraversalSource
-
- All Implemented Interfaces:
AutoCloseable
,Cloneable
,TraversalSource
public class CredentialTraversalSource extends CredentialTraversalSourceDsl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource
GraphTraversalSource.Symbols
-
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource
bytecode, connection, graph, strategies
-
-
Constructor Summary
Constructors Constructor Description CredentialTraversalSource(RemoteConnection connection)
CredentialTraversalSource(Graph graph)
CredentialTraversalSource(Graph graph, TraversalStrategies strategies)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialTraversal<Edge,Edge>
addE(String label)
Spawns aGraphTraversal
by adding an edge with the specified label.CredentialTraversal<Edge,Edge>
addE(Traversal edgeLabelTraversal)
Spawns aGraphTraversal
by adding a edge with a label as specified by the providedTraversal
.CredentialTraversal<Vertex,Vertex>
addV()
Spawns aGraphTraversal
by adding a vertex with the default label.CredentialTraversal<Vertex,Vertex>
addV(String label)
Spawns aGraphTraversal
by adding a vertex with the specified label.CredentialTraversal<Vertex,Vertex>
addV(Traversal vertexLabelTraversal)
Spawns aGraphTraversal
by adding a vertex with the label as determined by aTraversal
.CredentialTraversalSource
clone()
The clone-method should be used to create immutable traversal sources with each call to a configuration "withXXX"-method.CredentialTraversal<Edge,Edge>
E(Object... edgeIds)
Spawns aGraphTraversal
starting with all edges or some subset of edges as specified by their unique identifier.Optional<Class<?>>
getAnonymousTraversalClass()
<S> CredentialTraversal<S,S>
inject(S... starts)
Spawns aGraphTraversal
starting it with arbitrary values.CredentialTraversal<Vertex,Vertex>
user(String username, String password)
Creates or updates a user.CredentialTraversal<Vertex,Vertex>
users()
Finds all users.CredentialTraversal<Vertex,Vertex>
users(String username, String... more)
Finds users by name.CredentialTraversal<Vertex,Vertex>
V(Object... vertexIds)
Spawns aGraphTraversal
starting with all vertices or some subset of vertices as specified by their unique identifier.CredentialTraversalSource
with(String key)
Provides a configuration to a traversal in the form of a key which is the same aswith(key, true)
.CredentialTraversalSource
with(String key, Object value)
Provides a configuration to a traversal in the form of a key value pair.CredentialTraversalSource
withBulk(boolean useBulk)
CredentialTraversalSource
withComputer()
Add the standardGraphComputer
of the graph that will be used to execute the traversal.CredentialTraversalSource
withComputer(Class<? extends GraphComputer> graphComputerClass)
Add aGraphComputer
class used to execute the traversal.CredentialTraversalSource
withComputer(Computer computer)
Add aComputer
that will generate aGraphComputer
from theGraph
that will be used to execute the traversal.CredentialTraversalSource
withoutStrategies(Class<? extends TraversalStrategy>... traversalStrategyClasses)
Remove an arbitrary collection ofTraversalStrategy
classes from the traversal source.CredentialTraversalSource
withPath()
<A> CredentialTraversalSource
withSack(A initialValue)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(A initialValue, BinaryOperator<A> mergeOperator)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(A initialValue, UnaryOperator<A> splitOperator)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(A initialValue, UnaryOperator<A> splitOperator, BinaryOperator<A> mergeOperator)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(Supplier<A> initialValue)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(Supplier<A> initialValue, BinaryOperator<A> mergeOperator)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(Supplier<A> initialValue, UnaryOperator<A> splitOperator)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSack(Supplier<A> initialValue, UnaryOperator<A> splitOperator, BinaryOperator<A> mergeOperator)
Add a sack to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSideEffect(String key, A initialValue)
Add a sideEffect to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSideEffect(String key, A initialValue, BinaryOperator<A> reducer)
Add a sideEffect to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSideEffect(String key, Supplier<A> initialValue)
Add a sideEffect to be used throughout the life of a spawnedTraversal
.<A> CredentialTraversalSource
withSideEffect(String key, Supplier<A> initialValue, BinaryOperator<A> reducer)
Add a sideEffect to be used throughout the life of a spawnedTraversal
.CredentialTraversalSource
withStrategies(TraversalStrategy... traversalStrategies)
Add an arbitrary collection ofTraversalStrategy
instances to the traversal source.
-
-
-
Constructor Detail
-
CredentialTraversalSource
public CredentialTraversalSource(Graph graph)
-
CredentialTraversalSource
public CredentialTraversalSource(Graph graph, TraversalStrategies strategies)
-
CredentialTraversalSource
public CredentialTraversalSource(RemoteConnection connection)
-
-
Method Detail
-
clone
public CredentialTraversalSource clone()
Description copied from interface:TraversalSource
The clone-method should be used to create immutable traversal sources with each call to a configuration "withXXX"-method. The clone-method should clone theBytecode
,TraversalStrategies
, mutate the cloned strategies accordingly, and then return the cloned traversal source leaving the original unaltered.- Specified by:
clone
in interfaceTraversalSource
- Overrides:
clone
in classGraphTraversalSource
- Returns:
- the cloned traversal source
-
with
public CredentialTraversalSource with(String key)
Description copied from class:GraphTraversalSource
Provides a configuration to a traversal in the form of a key which is the same aswith(key, true)
. The key of the configuration must be graph provider specific and therefore a configuration could be supplied that is not known to be valid until execution.- Specified by:
with
in interfaceTraversalSource
- Overrides:
with
in classGraphTraversalSource
- Parameters:
key
- the key of the configuration to apply to a traversal- Returns:
- a new traversal source with the included configuration
-
with
public CredentialTraversalSource with(String key, Object value)
Description copied from class:GraphTraversalSource
Provides a configuration to a traversal in the form of a key value pair. The key of the configuration must be graph provider specific and therefore a configuration could be supplied that is not known to be valid until execution. This is a handy shortcut for building anOptionsStrategy
manually and then add withTraversalSource.withStrategies(TraversalStrategy[])
.- Specified by:
with
in interfaceTraversalSource
- Overrides:
with
in classGraphTraversalSource
- Parameters:
key
- the key of the configuration to apply to a traversalvalue
- the value of the configuration to apply to a traversal- Returns:
- a new traversal source with the included configuration
-
withStrategies
public CredentialTraversalSource withStrategies(TraversalStrategy... traversalStrategies)
Description copied from class:GraphTraversalSource
Add an arbitrary collection ofTraversalStrategy
instances to the traversal source.- Specified by:
withStrategies
in interfaceTraversalSource
- Overrides:
withStrategies
in classGraphTraversalSource
- Parameters:
traversalStrategies
- a collection of traversal strategies to add- Returns:
- a new traversal source with updated strategies
-
withoutStrategies
public CredentialTraversalSource withoutStrategies(Class<? extends TraversalStrategy>... traversalStrategyClasses)
Description copied from class:GraphTraversalSource
Remove an arbitrary collection ofTraversalStrategy
classes from the traversal source.- Specified by:
withoutStrategies
in interfaceTraversalSource
- Overrides:
withoutStrategies
in classGraphTraversalSource
- Parameters:
traversalStrategyClasses
- a collection of traversal strategy classes to remove- Returns:
- a new traversal source with updated strategies
-
withComputer
public CredentialTraversalSource withComputer(Computer computer)
Description copied from class:GraphTraversalSource
Add aComputer
that will generate aGraphComputer
from theGraph
that will be used to execute the traversal. This adds aVertexProgramStrategy
to the strategies.- Specified by:
withComputer
in interfaceTraversalSource
- Overrides:
withComputer
in classGraphTraversalSource
- Parameters:
computer
- a builder to generate a graph computer from the graph- Returns:
- a new traversal source with updated strategies
-
withComputer
public CredentialTraversalSource withComputer(Class<? extends GraphComputer> graphComputerClass)
Description copied from class:GraphTraversalSource
Add aGraphComputer
class used to execute the traversal. This adds aVertexProgramStrategy
to the strategies.- Specified by:
withComputer
in interfaceTraversalSource
- Overrides:
withComputer
in classGraphTraversalSource
- Parameters:
graphComputerClass
- the graph computer class- Returns:
- a new traversal source with updated strategies
-
withComputer
public CredentialTraversalSource withComputer()
Description copied from class:GraphTraversalSource
Add the standardGraphComputer
of the graph that will be used to execute the traversal. This adds aVertexProgramStrategy
to the strategies.- Specified by:
withComputer
in interfaceTraversalSource
- Overrides:
withComputer
in classGraphTraversalSource
- Returns:
- a new traversal source with updated strategies
-
withSideEffect
public <A> CredentialTraversalSource withSideEffect(String key, Supplier<A> initialValue, BinaryOperator<A> reducer)
Description copied from class:GraphTraversalSource
Add a sideEffect to be used throughout the life of a spawnedTraversal
. This adds aSideEffectStrategy
to the strategies.- Specified by:
withSideEffect
in interfaceTraversalSource
- Overrides:
withSideEffect
in classGraphTraversalSource
- Parameters:
key
- the key of the sideEffectinitialValue
- a supplier that produces the initial value of the sideEffectreducer
- a reducer to merge sideEffect mutations into a single result- Returns:
- a new traversal source with updated strategies
-
withSideEffect
public <A> CredentialTraversalSource withSideEffect(String key, A initialValue, BinaryOperator<A> reducer)
Description copied from class:GraphTraversalSource
Add a sideEffect to be used throughout the life of a spawnedTraversal
. This adds aSideEffectStrategy
to the strategies.- Specified by:
withSideEffect
in interfaceTraversalSource
- Overrides:
withSideEffect
in classGraphTraversalSource
- Parameters:
key
- the key of the sideEffectinitialValue
- the initial value of the sideEffectreducer
- a reducer to merge sideEffect mutations into a single result- Returns:
- a new traversal source with updated strategies
-
withSideEffect
public <A> CredentialTraversalSource withSideEffect(String key, A initialValue)
Description copied from class:GraphTraversalSource
Add a sideEffect to be used throughout the life of a spawnedTraversal
. This adds aSideEffectStrategy
to the strategies.- Specified by:
withSideEffect
in interfaceTraversalSource
- Overrides:
withSideEffect
in classGraphTraversalSource
- Parameters:
key
- the key of the sideEffectinitialValue
- the initial value of the sideEffect- Returns:
- a new traversal source with updated strategies
-
withSideEffect
public <A> CredentialTraversalSource withSideEffect(String key, Supplier<A> initialValue)
Description copied from class:GraphTraversalSource
Add a sideEffect to be used throughout the life of a spawnedTraversal
. This adds aSideEffectStrategy
to the strategies.- Specified by:
withSideEffect
in interfaceTraversalSource
- Overrides:
withSideEffect
in classGraphTraversalSource
- Parameters:
key
- the key of the sideEffectinitialValue
- a supplier that produces the initial value of the sideEffect- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(Supplier<A> initialValue, UnaryOperator<A> splitOperator, BinaryOperator<A> mergeOperator)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- a supplier that produces the initial value of the sideEffectsplitOperator
- the sack split operatormergeOperator
- the sack merge operator- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(A initialValue, UnaryOperator<A> splitOperator, BinaryOperator<A> mergeOperator)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- the initial value of the sideEffectsplitOperator
- the sack split operatormergeOperator
- the sack merge operator- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(A initialValue)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- the initial value of the sideEffect- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(Supplier<A> initialValue)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- a supplier that produces the initial value of the sideEffect- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(Supplier<A> initialValue, UnaryOperator<A> splitOperator)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- a supplier that produces the initial value of the sideEffectsplitOperator
- the sack split operator- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(A initialValue, UnaryOperator<A> splitOperator)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- the initial value of the sideEffectsplitOperator
- the sack split operator- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(Supplier<A> initialValue, BinaryOperator<A> mergeOperator)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- a supplier that produces the initial value of the sideEffectmergeOperator
- the sack merge operator- Returns:
- a new traversal source with updated strategies
-
withSack
public <A> CredentialTraversalSource withSack(A initialValue, BinaryOperator<A> mergeOperator)
Description copied from class:GraphTraversalSource
Add a sack to be used throughout the life of a spawnedTraversal
. This adds aSackStrategy
to the strategies.- Specified by:
withSack
in interfaceTraversalSource
- Overrides:
withSack
in classGraphTraversalSource
- Parameters:
initialValue
- the initial value of the sideEffectmergeOperator
- the sack merge operator- Returns:
- a new traversal source with updated strategies
-
withBulk
public CredentialTraversalSource withBulk(boolean useBulk)
- Overrides:
withBulk
in classGraphTraversalSource
-
withPath
public CredentialTraversalSource withPath()
- Overrides:
withPath
in classGraphTraversalSource
-
users
public CredentialTraversal<Vertex,Vertex> users()
Description copied from class:CredentialTraversalSourceDsl
Finds all users.- Overrides:
users
in classCredentialTraversalSourceDsl
-
users
public CredentialTraversal<Vertex,Vertex> users(String username, String... more)
Description copied from class:CredentialTraversalSourceDsl
Finds users by name.- Overrides:
users
in classCredentialTraversalSourceDsl
-
user
public CredentialTraversal<Vertex,Vertex> user(String username, String password)
Description copied from class:CredentialTraversalSourceDsl
Creates or updates a user.- Overrides:
user
in classCredentialTraversalSourceDsl
-
addV
public CredentialTraversal<Vertex,Vertex> addV()
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
by adding a vertex with the default label.- Overrides:
addV
in classGraphTraversalSource
-
addV
public CredentialTraversal<Vertex,Vertex> addV(String label)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
by adding a vertex with the specified label. If thelabel
isnull
then it will default toVertex.DEFAULT_LABEL
.- Overrides:
addV
in classGraphTraversalSource
-
addV
public CredentialTraversal<Vertex,Vertex> addV(Traversal vertexLabelTraversal)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
by adding a vertex with the label as determined by aTraversal
. If thevertexLabelTraversal
isnull
then it will default toVertex.DEFAULT_LABEL
.- Overrides:
addV
in classGraphTraversalSource
-
addE
public CredentialTraversal<Edge,Edge> addE(String label)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
by adding an edge with the specified label.- Overrides:
addE
in classGraphTraversalSource
-
addE
public CredentialTraversal<Edge,Edge> addE(Traversal edgeLabelTraversal)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
by adding a edge with a label as specified by the providedTraversal
.- Overrides:
addE
in classGraphTraversalSource
-
V
public CredentialTraversal<Vertex,Vertex> V(Object... vertexIds)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
starting with all vertices or some subset of vertices as specified by their unique identifier.- Overrides:
V
in classGraphTraversalSource
-
E
public CredentialTraversal<Edge,Edge> E(Object... edgeIds)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
starting with all edges or some subset of edges as specified by their unique identifier.- Overrides:
E
in classGraphTraversalSource
-
inject
public <S> CredentialTraversal<S,S> inject(S... starts)
Description copied from class:GraphTraversalSource
Spawns aGraphTraversal
starting it with arbitrary values.- Overrides:
inject
in classGraphTraversalSource
-
getAnonymousTraversalClass
public Optional<Class<?>> getAnonymousTraversalClass()
- Specified by:
getAnonymousTraversalClass
in interfaceTraversalSource
- Overrides:
getAnonymousTraversalClass
in classGraphTraversalSource
-
-