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 aGraphTraversalby adding an edge with the specified label.CredentialTraversal<Edge,Edge>addE(Traversal edgeLabelTraversal)Spawns aGraphTraversalby adding a edge with a label as specified by the providedTraversal.CredentialTraversal<Vertex,Vertex>addV()Spawns aGraphTraversalby adding a vertex with the default label.CredentialTraversal<Vertex,Vertex>addV(String label)Spawns aGraphTraversalby adding a vertex with the specified label.CredentialTraversal<Vertex,Vertex>addV(Traversal vertexLabelTraversal)Spawns aGraphTraversalby adding a vertex with the label as determined by aTraversal.CredentialTraversalSourceclone()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 aGraphTraversalstarting 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 aGraphTraversalstarting 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 aGraphTraversalstarting with all vertices or some subset of vertices as specified by their unique identifier.CredentialTraversalSourcewith(String key)Provides a configuration to a traversal in the form of a key which is the same aswith(key, true).CredentialTraversalSourcewith(String key, Object value)Provides a configuration to a traversal in the form of a key value pair.CredentialTraversalSourcewithBulk(boolean useBulk)CredentialTraversalSourcewithComputer()Add the standardGraphComputerof the graph that will be used to execute the traversal.CredentialTraversalSourcewithComputer(Class<? extends GraphComputer> graphComputerClass)Add aGraphComputerclass used to execute the traversal.CredentialTraversalSourcewithComputer(Computer computer)Add aComputerthat will generate aGraphComputerfrom theGraphthat will be used to execute the traversal.CredentialTraversalSourcewithoutStrategies(Class<? extends TraversalStrategy>... traversalStrategyClasses)Remove an arbitrary collection ofTraversalStrategyclasses from the traversal source.CredentialTraversalSourcewithPath()<A> CredentialTraversalSourcewithSack(A initialValue)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(A initialValue, BinaryOperator<A> mergeOperator)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(A initialValue, UnaryOperator<A> splitOperator)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(A initialValue, UnaryOperator<A> splitOperator, BinaryOperator<A> mergeOperator)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(Supplier<A> initialValue)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(Supplier<A> initialValue, BinaryOperator<A> mergeOperator)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(Supplier<A> initialValue, UnaryOperator<A> splitOperator)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSack(Supplier<A> initialValue, UnaryOperator<A> splitOperator, BinaryOperator<A> mergeOperator)Add a sack to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSideEffect(String key, A initialValue)Add a sideEffect to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSideEffect(String key, A initialValue, BinaryOperator<A> reducer)Add a sideEffect to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSideEffect(String key, Supplier<A> initialValue)Add a sideEffect to be used throughout the life of a spawnedTraversal.<A> CredentialTraversalSourcewithSideEffect(String key, Supplier<A> initialValue, BinaryOperator<A> reducer)Add a sideEffect to be used throughout the life of a spawnedTraversal.CredentialTraversalSourcewithStrategies(TraversalStrategy... traversalStrategies)Add an arbitrary collection ofTraversalStrategyinstances 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:TraversalSourceThe 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:
clonein interfaceTraversalSource- Overrides:
clonein classGraphTraversalSource- Returns:
- the cloned traversal source
-
with
public CredentialTraversalSource with(String key)
Description copied from class:GraphTraversalSourceProvides 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:
within interfaceTraversalSource- Overrides:
within 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:GraphTraversalSourceProvides 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 anOptionsStrategymanually and then add withTraversalSource.withStrategies(TraversalStrategy[]).- Specified by:
within interfaceTraversalSource- Overrides:
within 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:GraphTraversalSourceAdd an arbitrary collection ofTraversalStrategyinstances to the traversal source.- Specified by:
withStrategiesin interfaceTraversalSource- Overrides:
withStrategiesin 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:GraphTraversalSourceRemove an arbitrary collection ofTraversalStrategyclasses from the traversal source.- Specified by:
withoutStrategiesin interfaceTraversalSource- Overrides:
withoutStrategiesin 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:GraphTraversalSourceAdd aComputerthat will generate aGraphComputerfrom theGraphthat will be used to execute the traversal. This adds aVertexProgramStrategyto the strategies.- Specified by:
withComputerin interfaceTraversalSource- Overrides:
withComputerin 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:GraphTraversalSourceAdd aGraphComputerclass used to execute the traversal. This adds aVertexProgramStrategyto the strategies.- Specified by:
withComputerin interfaceTraversalSource- Overrides:
withComputerin classGraphTraversalSource- Parameters:
graphComputerClass- the graph computer class- Returns:
- a new traversal source with updated strategies
-
withComputer
public CredentialTraversalSource withComputer()
Description copied from class:GraphTraversalSourceAdd the standardGraphComputerof the graph that will be used to execute the traversal. This adds aVertexProgramStrategyto the strategies.- Specified by:
withComputerin interfaceTraversalSource- Overrides:
withComputerin 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:GraphTraversalSourceAdd a sideEffect to be used throughout the life of a spawnedTraversal. This adds aSideEffectStrategyto the strategies.- Specified by:
withSideEffectin interfaceTraversalSource- Overrides:
withSideEffectin 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:GraphTraversalSourceAdd a sideEffect to be used throughout the life of a spawnedTraversal. This adds aSideEffectStrategyto the strategies.- Specified by:
withSideEffectin interfaceTraversalSource- Overrides:
withSideEffectin 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:GraphTraversalSourceAdd a sideEffect to be used throughout the life of a spawnedTraversal. This adds aSideEffectStrategyto the strategies.- Specified by:
withSideEffectin interfaceTraversalSource- Overrides:
withSideEffectin 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:GraphTraversalSourceAdd a sideEffect to be used throughout the life of a spawnedTraversal. This adds aSideEffectStrategyto the strategies.- Specified by:
withSideEffectin interfaceTraversalSource- Overrides:
withSideEffectin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:GraphTraversalSourceAdd a sack to be used throughout the life of a spawnedTraversal. This adds aSackStrategyto the strategies.- Specified by:
withSackin interfaceTraversalSource- Overrides:
withSackin 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:
withBulkin classGraphTraversalSource
-
withPath
public CredentialTraversalSource withPath()
- Overrides:
withPathin classGraphTraversalSource
-
users
public CredentialTraversal<Vertex,Vertex> users()
Description copied from class:CredentialTraversalSourceDslFinds all users.- Overrides:
usersin classCredentialTraversalSourceDsl
-
users
public CredentialTraversal<Vertex,Vertex> users(String username, String... more)
Description copied from class:CredentialTraversalSourceDslFinds users by name.- Overrides:
usersin classCredentialTraversalSourceDsl
-
user
public CredentialTraversal<Vertex,Vertex> user(String username, String password)
Description copied from class:CredentialTraversalSourceDslCreates or updates a user.- Overrides:
userin classCredentialTraversalSourceDsl
-
addV
public CredentialTraversal<Vertex,Vertex> addV()
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalby adding a vertex with the default label.- Overrides:
addVin classGraphTraversalSource
-
addV
public CredentialTraversal<Vertex,Vertex> addV(String label)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalby adding a vertex with the specified label. If thelabelisnullthen it will default toVertex.DEFAULT_LABEL.- Overrides:
addVin classGraphTraversalSource
-
addV
public CredentialTraversal<Vertex,Vertex> addV(Traversal vertexLabelTraversal)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalby adding a vertex with the label as determined by aTraversal. If thevertexLabelTraversalisnullthen it will default toVertex.DEFAULT_LABEL.- Overrides:
addVin classGraphTraversalSource
-
addE
public CredentialTraversal<Edge,Edge> addE(String label)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalby adding an edge with the specified label.- Overrides:
addEin classGraphTraversalSource
-
addE
public CredentialTraversal<Edge,Edge> addE(Traversal edgeLabelTraversal)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalby adding a edge with a label as specified by the providedTraversal.- Overrides:
addEin classGraphTraversalSource
-
V
public CredentialTraversal<Vertex,Vertex> V(Object... vertexIds)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalstarting with all vertices or some subset of vertices as specified by their unique identifier.- Overrides:
Vin classGraphTraversalSource
-
E
public CredentialTraversal<Edge,Edge> E(Object... edgeIds)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalstarting with all edges or some subset of edges as specified by their unique identifier.- Overrides:
Ein classGraphTraversalSource
-
inject
public <S> CredentialTraversal<S,S> inject(S... starts)
Description copied from class:GraphTraversalSourceSpawns aGraphTraversalstarting it with arbitrary values.- Overrides:
injectin classGraphTraversalSource
-
getAnonymousTraversalClass
public Optional<Class<?>> getAnonymousTraversalClass()
- Specified by:
getAnonymousTraversalClassin interfaceTraversalSource- Overrides:
getAnonymousTraversalClassin classGraphTraversalSource
-
-