Java Code Examples for org.apache.tinkerpop.gremlin.process.traversal.Step#getTraversal()

The following examples show how to use org.apache.tinkerpop.gremlin.process.traversal.Step#getTraversal() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TraversalHelper.java    From tinkerpop with Apache License 2.0 5 votes vote down vote up
public static <S, E> void removeToTraversal(final Step<S, ?> startStep, final Step<?, E> endStep, final Traversal.Admin<S, E> newTraversal) {
    final Traversal.Admin<?, ?> originalTraversal = startStep.getTraversal();
    Step<?, ?> currentStep = startStep;
    while (currentStep != endStep && !(currentStep instanceof EmptyStep)) {
        final Step<?, ?> temp = currentStep.getNextStep();
        originalTraversal.removeStep(currentStep);
        newTraversal.addStep(currentStep);
        currentStep = temp;
    }
}
 
Example 2
Source File: JanusGraphMultiQueryStep.java    From grakn with GNU Affero General Public License v3.0 4 votes vote down vote up
public JanusGraphMultiQueryStep(Step<Vertex,?> originalStep) {
    super(originalStep.getTraversal());
    this.forStep = originalStep.getClass().getSimpleName();
}