- 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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PopContaining
PopContaining.PopInstruction
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.Scoping
Scoping.KeyNotFoundException, Scoping.Variable
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectelementIdprotected Objectlabelprotected Map<Object,List<Object>>propertiesprotected Set<String>scopeKeysprotected ParameterswithConfiguration-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
-
Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.AddElementStepContract
CONCRETE_STEPS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, String label)protectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, GValue<String> label)protectedAbstractAddElementStepPlaceholder(Traversal.Admin traversal, Traversal.Admin<S,String> labelTraversal)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddProperty(Object key, Object value)protected voidaddTraversal(Traversal.Admin<?,?> traversal)AbstractAddElementStepPlaceholder<S,E,X>clone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.voidconfigure(Object... keyValues)Accept a configuration to theStep.protected voidconfigureConcreteStep(AddElementStepContract<S,E> step)booleanequals(Object o)protected abstract StringgetDefaultLabel()ObjectgetElementId()ObjectgetElementIdWithGValue()Collection<GValue<?>>getGValues()ObjectgetLabel()ObjectgetLabelWithGValue()List<Traversal.Admin<?,?>>getLocalChildren()Gets a list of all "local" child traversals for this step.CallbackRegistry<X>getMutatingCallbackRegistry()Gets the callback registry for events that the step raises.ParametersgetParameters()Gets the parameters on the step.Map<Object,List<Object>>getProperties()Map<Object,List<Object>>getPropertiesWithGValues()Set<TraverserRequirement>getRequirements()Provide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly.Set<String>getScopeKeys()Get the labels that this scoping step will access during the traversalinthashCode()booleanisParameterized()protected Emap(Traverser.Admin<S> traverser)booleanremoveElementId()booleanremoveProperty(Object k)voidsetElementId(Object elementId)voidsetLabel(Object label)voidsetTraversal(Traversal.Admin<?,?> parentTraversal)Set theTraversalthat this step is contained within.protected abstract booleansupportsMultiProperties()voidupdateVariable(String name, Object value)-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.ScalarMapStep
processNextStart
-
Methods 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, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.AddElementStepContract
getPopInstructions
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.GValueHolder
asConcreteStep, reduce
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.Scoping
getNullableScopeValue, getSafeScopeValue, getScopeValue
-
Methods 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, setPreviousStep
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
-
-
-
Constructor Detail
-
AbstractAddElementStepPlaceholder
protected AbstractAddElementStepPlaceholder(Traversal.Admin traversal, String label)
-
AbstractAddElementStepPlaceholder
protected AbstractAddElementStepPlaceholder(Traversal.Admin traversal, GValue<String> label)
-
AbstractAddElementStepPlaceholder
protected AbstractAddElementStepPlaceholder(Traversal.Admin traversal, Traversal.Admin<S,String> labelTraversal)
-
-
Method Detail
-
getDefaultLabel
protected abstract String getDefaultLabel()
-
getScopeKeys
public Set<String> 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
protected void addTraversal(Traversal.Admin<?,?> traversal)
-
getLocalChildren
public List<Traversal.Admin<?,?>> 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
public void setTraversal(Traversal.Admin<?,?> parentTraversal)
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
public Set<TraverserRequirement> 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
protected E map(Traverser.Admin<S> traverser)
- Specified by:
mapin classScalarMapStep<S,E extends Element>
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractStep<S,E extends Element>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractStep<S,E extends Element>
-
configureConcreteStep
protected void configureConcreteStep(AddElementStepContract<S,E> step)
-
isParameterized
public boolean isParameterized()
- Specified by:
isParameterizedin interfaceGValueHolder<S,E extends Element>
-
getLabel
public Object getLabel()
- Specified by:
getLabelin interfaceAddElementStepContract<S,E extends Element>
-
getLabelWithGValue
public Object getLabelWithGValue()
- Specified by:
getLabelWithGValuein interfaceAddElementStepContract<S,E extends Element>
-
setLabel
public void setLabel(Object label)
- Specified by:
setLabelin interfaceAddElementStepContract<S,E extends Element>
-
addProperty
public void addProperty(Object key, Object value)
- Specified by:
addPropertyin interfacePropertiesHolder
-
supportsMultiProperties
protected abstract boolean supportsMultiProperties()
-
getProperties
public Map<Object,List<Object>> getProperties()
- Specified by:
getPropertiesin interfacePropertiesHolder
-
getPropertiesWithGValues
public Map<Object,List<Object>> getPropertiesWithGValues()
- Specified by:
getPropertiesWithGValuesin interfacePropertiesHolder
-
removeProperty
public boolean removeProperty(Object k)
- Specified by:
removePropertyin interfacePropertiesHolder
-
getElementId
public Object getElementId()
- Specified by:
getElementIdin interfaceAddElementStepContract<S,E extends Element>
-
getElementIdWithGValue
public Object getElementIdWithGValue()
- Specified by:
getElementIdWithGValuein interfaceAddElementStepContract<S,E extends Element>
-
removeElementId
public boolean removeElementId()
- Specified by:
removeElementIdin interfaceAddElementStepContract<S,E extends Element>
-
setElementId
public void setElementId(Object elementId)
- Specified by:
setElementIdin interfaceAddElementStepContract<S,E extends Element>
-
updateVariable
public void updateVariable(String name, Object value)
- Specified by:
updateVariablein interfaceGValueHolder<S,E extends Element>
-
getGValues
public Collection<GValue<?>> getGValues()
- Specified by:
getGValuesin interfaceGValueHolder<S,E extends Element>
-
getMutatingCallbackRegistry
public CallbackRegistry<X> getMutatingCallbackRegistry()
Description copied from interface:MutatingGets the callback registry for events that the step raises.- Specified by:
getMutatingCallbackRegistryin interfaceMutating<S>
-
clone
public AbstractAddElementStepPlaceholder<S,E,X> 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
public Parameters getParameters()
Description copied from interface:ParameterizingGets the parameters on the step.- Specified by:
getParametersin interfaceParameterizing
-
configure
public void configure(Object... keyValues)
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
-
-