java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep<S,E>
org.apache.tinkerpop.gremlin.process.traversal.step.map.ScalarMapStep<S,E>
org.apache.tinkerpop.gremlin.process.traversal.step.map.AbstractAddElementStepPlaceholder<S,E,X>
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<E>>,Step<S,,E> Configuring,GValueHolder<S,,E> AddElementStepContract<S,,E> Mutating<X>,Parameterizing,PopContaining,PropertiesHolder,Scoping,TraversalParent,Writing<X>
- Direct Known Subclasses:
AbstractAddEdgeStepPlaceholder,AbstractAddVertexStepPlaceholder
public abstract class AbstractAddElementStepPlaceholder<S,E extends Element,X extends Event>
extends ScalarMapStep<S,E>
implements AddElementStepContract<S,E>, GValueHolder<S,E>, Writing<X>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PopContaining
PopContaining.PopInstructionNested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.Scoping
Scoping.KeyNotFoundException, Scoping.Variable -
Field Summary
FieldsFields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChildFields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.AddElementStepContract
CONCRETE_STEPS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, String label) protectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, Collection<Object> labels) Constructor for multiple labels, each of which may be aString, aGValue, or aTraversal.Adminthat resolves to a singleStringlabel at execution time.protectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, GValue<String> label) protectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, Traversal.Admin<S, ?> labelTraversal) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(Object key, Object value) protected voidaddTraversal(Traversal.Admin<?, ?> traversal) clone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.voidAccept a configuration to theStep.protected voidbooleanprotected abstract StringCollection<GValue<?>>getLabel()Gets the label(s) assigned to the element produced by this step.List<Traversal.Admin<?,?>> Gets a list of all "local" child traversals for this step.Gets the callback registry for events that the step raises.Gets the parameters on the step.Provide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly.Get the labels that this scoping step will access during the traversalinthashCode()booleanprotected Emap(Traverser.Admin<S> traverser) booleanbooleanvoidsetElementId(Object elementId) voidSets the label(s) to assign to the element produced by this step.voidsetTraversal(Traversal.Admin<?, ?> parentTraversal) Set theTraversalthat this step is contained within.protected abstract booleanvoidupdateVariable(String name, Object value) Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.ScalarMapStep
processNextStartMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, reset, setId, setNextStep, setPreviousStep, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.AddElementStepContract
getPopInstructionsMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.GValueHolder
asConcreteStep, reduceMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, removeMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.Scoping
getNullableScopeValue, getSafeScopeValue, getScopeValueMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Step
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hasStarts, removeLabel, reset, setId, setNextStep, setPreviousStepMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
Field Details
-
label
-
properties
-
elementId
-
scopeKeys
-
withConfiguration
-
-
Constructor Details
-
AbstractAddElementStepPlaceholder
-
AbstractAddElementStepPlaceholder
-
AbstractAddElementStepPlaceholder
protected AbstractAddElementStepPlaceholder(Traversal.Admin traversal, Traversal.Admin<S, ?> labelTraversal) -
AbstractAddElementStepPlaceholder
Constructor for multiple labels, each of which may be aString, aGValue, or aTraversal.Adminthat resolves to a singleStringlabel at execution time.- Parameters:
traversal- the parent traversallabels- the labels to add (must have 2+ elements;nullor empty results in the default label)
-
-
Method Details
-
getDefaultLabel
-
getScopeKeys
Description copied from interface:ScopingGet the labels that this scoping step will access during the traversal- Specified by:
getScopeKeysin interfaceScoping- Returns:
- the accessed labels of the scoping step
-
addTraversal
-
getLocalChildren
Description copied from interface:TraversalParentGets a list of all "local" child traversals for this step. A "local" traversal is one which is evaluated independently for each incoming traverser to the parent step. This is typically used in cases where the child is used to process or augment each traverser individually. SeeLocalSteporByModulatingas examples.- Specified by:
getLocalChildrenin interfaceTraversalParent
-
setTraversal
Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
setTraversalin interfaceStep<S,E extends Element> - Overrides:
setTraversalin classAbstractStep<S,E extends Element> - Parameters:
parentTraversal- the new traversal for this step
-
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.- Specified by:
getRequirementsin interfaceStep<S,E extends Element> - Returns:
- the set of requirements
-
map
- Specified by:
mapin classScalarMapStep<S,E extends Element>
-
equals
- Overrides:
equalsin classAbstractStep<S,E extends Element>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractStep<S,E extends Element>
-
configureConcreteStep
-
isParameterized
public boolean isParameterized()- Specified by:
isParameterizedin interfaceGValueHolder<S,E extends Element>
-
getLabel
Description copied from interface:AddElementStepContractGets the label(s) assigned to the element produced by this step. Returns a single value, or aSetwhen multiple labels were specified (e.g.addV("a", "b")). Each individual label value will either be aStringorTraversaldepending on how it was initially set. Callers should not assume the type isStringand should check withinstanceofbefore casting.- Specified by:
getLabelin interfaceAddElementStepContract<S,E extends Element> - Returns:
- a
String,Traversal, or aSetcontaining either
-
getLabelWithGValue
- Specified by:
getLabelWithGValuein interfaceAddElementStepContract<S,E extends Element>
-
setLabel
Description copied from interface:AddElementStepContractSets the label(s) to assign to the element produced by this step. Accepts a singleString,GValue<String>, orTraversalresolving to aString, or aCollection<Object>of two or more such values. Should behave identically to specifying the same value at construction time. Implementations may restrict calling this method more than once at their own discretion.- Specified by:
setLabelin interfaceAddElementStepContract<S,E extends Element> - Parameters:
label- aString,GValue<String>,Traversal, orCollection<Object>
-
addProperty
- Specified by:
addPropertyin interfacePropertiesHolder
-
supportsMultiProperties
protected abstract boolean supportsMultiProperties() -
getProperties
- Specified by:
getPropertiesin interfacePropertiesHolder
-
getPropertiesWithGValues
- Specified by:
getPropertiesWithGValuesin interfacePropertiesHolder
-
removeProperty
- Specified by:
removePropertyin interfacePropertiesHolder
-
getElementId
- Specified by:
getElementIdin interfaceAddElementStepContract<S,E extends Element>
-
getElementIdWithGValue
- Specified by:
getElementIdWithGValuein interfaceAddElementStepContract<S,E extends Element>
-
removeElementId
public boolean removeElementId()- Specified by:
removeElementIdin interfaceAddElementStepContract<S,E extends Element>
-
setElementId
- Specified by:
setElementIdin interfaceAddElementStepContract<S,E extends Element>
-
updateVariable
- Specified by:
updateVariablein interfaceGValueHolder<S,E extends Element>
-
getGValues
- Specified by:
getGValuesin interfaceGValueHolder<S,E extends Element>
-
getMutatingCallbackRegistry
Description copied from interface:MutatingGets the callback registry for events that the step raises.- Specified by:
getMutatingCallbackRegistryin interfaceMutating<S>
-
clone
Description copied from interface:StepCloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step whenStep.reset()is called. Moreover, the previous and next steps should be set toEmptyStep. -
getParameters
Description copied from interface:ParameterizingGets the parameters on the step.- Specified by:
getParametersin interfaceParameterizing
-
configure
Description copied from interface:ConfiguringAccept a configuration to theStep. Note that this interface extendsParameterizingand so there is an expectation that theStepimplementation will have aParametersinstance that will house any values passed to this method. Storing these configurations inParametersis not a requirement however, IF the configuration is an expected option for the step and can be stored on a member field that can be accessed on the step by more direct means (i.e. like a getter method).- Specified by:
configurein interfaceConfiguring
-