Class DeclarativeMatchStep<S>
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,Map<String,Object>>
org.apache.tinkerpop.gremlin.process.traversal.step.map.DeclarativeMatchStep<S>
- All Implemented Interfaces:
Serializable,Cloneable,Iterator<Traverser.Admin<Map<String,,Object>>> Step<S,,Map<String, Object>> Configuring,Parameterizing
- Direct Known Subclasses:
GqlMatchStep
public class DeclarativeMatchStep<S>
extends AbstractStep<S,Map<String,Object>>
implements Configuring
A placeholder step that represents a declarative pattern-matching query.
This step is not directly executable; a graph provider must register an execution strategy
that replaces it with a concrete implementation.
The query language is intentionally unset (null) by default. Graph providers
accept or reject the query language they receive: a null value means the user did
not specify a language and the provider should use its native query language; a non-null
value is an explicit hint that the provider may accept or reject. Use the
.with("queryLanguage", value) modulator to specify a language explicitly.
- Since:
- 4.0.0
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild -
Constructor Summary
ConstructorsConstructorDescriptionDeclarativeMatchStep(Traversal.Admin traversal, String matchQuery, Map<String, Object> params) Constructs aDeclarativeMatchStepas a mid-traversal step with the given query and optional parameters.DeclarativeMatchStep(Traversal.Admin traversal, String matchQuery, Map<String, Object> params, String queryLanguage, boolean isStart) Constructs aDeclarativeMatchStepwith the given query, optional parameters, query language, and start-step flag. -
Method Summary
Modifier and TypeMethodDescriptionvoidAccepts configuration via thewith()step modulator.Returns the declarative query string passed to this step.Gets the parameters on the step.Returns the query parameters, ornullif none were provided.Returns the query language identifier in use for this step.Provide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly.booleanisStart()Returnstrueif this step is the first step in the traversal (spawned from aGraphTraversalSource).protected Traverser.Admin<Map<String,Object>> Always throwsUnsupportedOperationException.toString()Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, clone, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, reset, setId, setNextStep, setPreviousStep, setTraversalMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
parameters
-
-
Constructor Details
-
DeclarativeMatchStep
public DeclarativeMatchStep(Traversal.Admin traversal, String matchQuery, Map<String, Object> params) Constructs aDeclarativeMatchStepas a mid-traversal step with the given query and optional parameters. The query language is left unset (null); graph providers treatnullas "use your native language."- Parameters:
traversal- the parent traversalmatchQuery- the declarative query stringparams- optional query parameters (may benull)
-
DeclarativeMatchStep
public DeclarativeMatchStep(Traversal.Admin traversal, String matchQuery, Map<String, Object> params, String queryLanguage, boolean isStart) Constructs aDeclarativeMatchStepwith the given query, optional parameters, query language, and start-step flag.- Parameters:
traversal- the parent traversalmatchQuery- the declarative query stringparams- optional query parameters (may benull)queryLanguage- the query language identifier, ornullif not specifiedisStart-truewhen this step is the first step in the traversal (spawned from aGraphTraversalSource); the step will self-seed rather than pulling from upstream starts
-
-
Method Details
-
processNextStart
Always throwsUnsupportedOperationException. A provider strategy must replace this step before the traversal is executed.- Specified by:
processNextStartin classAbstractStep<S,Map<String, Object>>
-
configure
Accepts configuration via thewith()step modulator. Recognises theWithOptions.queryLanguagekey to override the query language; all other key/value pairs are stored in the step'sParameters.- Specified by:
configurein interfaceConfiguring
-
getParameters
Description copied from interface:ParameterizingGets the parameters on the step.- Specified by:
getParametersin interfaceParameterizing
-
getRequirements
Description copied from interface:StepProvide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set. -
getMatchQuery
Returns the declarative query string passed to this step. -
getParams
Returns the query parameters, ornullif none were provided. -
getQueryLanguage
Returns the query language identifier in use for this step. -
isStart
public boolean isStart()Returnstrueif this step is the first step in the traversal (spawned from aGraphTraversalSource). -
toString
-