Class MergeEdgeStep<S>
- java.lang.Object
 - 
- org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
 - 
- org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep<S,E>
 - 
- org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep<S,Edge,Object>
 - 
- org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeEdgeStep<S>
 
 
 
 
 
- 
- All Implemented Interfaces:
 Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<Edge>>,Step<S,Edge>,Configuring,Deleting<Event>,Mutating<Event>,Parameterizing,TraversalOptionParent<Merge,S,Object>,TraversalParent,Writing<Event>
public class MergeEdgeStep<S> extends MergeStep<S,Edge,Object>
Implementation for themergeE()step covering both the start step version and the one used mid-traversal.- See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep
MergeStep.GuardRailStep<S,E> 
 - 
 
- 
Field Summary
- 
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep
callbackRegistry, first, isStart, mergeTraversal, onCreateTraversal, onMatchTraversal, usesPartitionStrategy 
- 
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild 
 - 
 
- 
Constructor Summary
Constructors Constructor Description MergeEdgeStep(Traversal.Admin traversal, boolean isStart)MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Map merge)MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S,Map> mergeTraversal) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildOption(Merge token, Traversal.Admin<S,Object> traversalOption)MergeEdgeStep<S>clone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.protected Iterator<Edge>flatMap(Traverser.Admin<S> traverser)protected SetgetAllowedTokens()Traversal.Admin<S,Object>getInVTraversal()Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.IN vertex during merge.<S,C>
List<Traversal.Admin<S,C>>getLocalChildren()Traversal.Admin<S,Object>getOutVTraversal()Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.OUT vertex during merge.inthashCode()protected MaponCreateMap(Traverser.Admin<S> traverser, Map unresolvedMergeMap, Map mergeMap)voidreset()Reset the state of the step such that it has no incoming starts.protected VertexresolveVertex(Object arg)protected voidresolveVertex(Merge token, Direction direction, Map map, Traverser.Admin<S> traverser, Traversal.Admin<S,Object> traversal)protected VertexresolveVertex(Traverser.Admin<S> traverser, Traversal.Admin<S,Object> traversal)protected Map<?,?>resolveVertices(Map map, Traverser.Admin<S> traverser)protected CloseableIterator<Edge>searchEdges(Map search)Translate the Map into search criteria.voidsetTraversal(Traversal.Admin<?,?> parentTraversal)Set theTraversalthat this step is contained within.StringtoString()protected VertextryAttachVertex(Vertex v)static voidvalidateMapInput(Map map, boolean ignoreTokens)- 
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep
configure, getCallbackRegistry, getGraph, getMergeTraversal, getMutatingCallbackRegistry, getOnCreateTraversal, getOnMatchTraversal, getParameters, getRequirements, isFirst, isStart, isUsingPartitionStrategy, materializeMap, processNextStart, searchVertices, searchVerticesLabelConstraint, searchVerticesPropertyConstraints, searchVerticesTraversal, validate, validate, validateNoOverrides 
- 
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep
closeIterator 
- 
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep 
- 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface java.util.Iterator
forEachRemaining, remove 
- 
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
MergeEdgeStep
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart)
 
- 
MergeEdgeStep
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Map merge)
 
- 
MergeEdgeStep
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S,Map> mergeTraversal)
 
 - 
 
- 
Method Detail
- 
validateMapInput
public static void validateMapInput(Map map, boolean ignoreTokens)
 
- 
getOutVTraversal
public Traversal.Admin<S,Object> getOutVTraversal()
Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.OUT vertex during merge. 
- 
getInVTraversal
public Traversal.Admin<S,Object> getInVTraversal()
Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.IN vertex during merge. 
- 
addChildOption
public void addChildOption(Merge token, Traversal.Admin<S,Object> traversalOption)
Description copied from interface:TraversalOptionParentThe child as defined by the token it takes, likePickorMerge. This traversal may be of local or global scope depending on the step implementation that works withoption().- Specified by:
 addChildOptionin interfaceTraversalOptionParent<Merge,S,Object>- Overrides:
 addChildOptionin classMergeStep<S,Edge,Object>
 
- 
getLocalChildren
public <S,C> List<Traversal.Admin<S,C>> getLocalChildren()
- Specified by:
 getLocalChildrenin interfaceTraversalParent- Overrides:
 getLocalChildrenin classMergeStep<S,Edge,Object>
 
- 
reset
public void reset()
Description copied from interface:StepReset the state of the step such that it has no incoming starts. Internal states are to be reset, but any sideEffect data structures are not to be recreated. 
- 
setTraversal
public void setTraversal(Traversal.Admin<?,?> parentTraversal)
Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
 setTraversalin interfaceStep<S,Edge>- Overrides:
 setTraversalin classMergeStep<S,Edge,Object>- Parameters:
 parentTraversal- the new traversal for this step
 
- 
clone
public MergeEdgeStep<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. 
- 
getAllowedTokens
protected Set getAllowedTokens()
- Specified by:
 getAllowedTokensin classMergeStep<S,Edge,Object>
 
- 
searchEdges
protected CloseableIterator<Edge> searchEdges(Map search)
Translate the Map into search criteria. Default implementation is to translate the Map into a g.E() or g.V().out/inE() traversal. Graph providers will presumably optimize this traversal to use whatever indices are present and appropriate for efficiency. Callers are responsible for closing this iterator when finished. 
- 
resolveVertices
protected Map<?,?> resolveVertices(Map map, Traverser.Admin<S> traverser)
 
- 
resolveVertex
protected void resolveVertex(Merge token, Direction direction, Map map, Traverser.Admin<S> traverser, Traversal.Admin<S,Object> traversal)
 
- 
flatMap
protected Iterator<Edge> flatMap(Traverser.Admin<S> traverser)
 
- 
onCreateMap
protected Map onCreateMap(Traverser.Admin<S> traverser, Map unresolvedMergeMap, Map mergeMap)
 
- 
resolveVertex
protected Vertex resolveVertex(Traverser.Admin<S> traverser, Traversal.Admin<S,Object> traversal)
 
 - 
 
 -