Package com.tinkerpop.gremlin.process.graph.step.map

Examples of com.tinkerpop.gremlin.process.graph.step.map.VertexStep


            while (!previousStep.equals(EmptyStep.instance()) && !(previousStep instanceof PropertiesStep) && !(previousStep instanceof VertexStep)) {
                previousStep = previousStep.getPreviousStep();
                // TODO: check for not filtering/sideEffect steps and throw an exception?
            }
            if (previousStep instanceof VertexStep) {
                VertexStep vertexStep = (VertexStep) previousStep;
                if (vertexStep.getReturnClass().equals(Edge.class)) {
                    localRangeStep.setDirection(vertexStep.getDirection());
                } else {
                    throw new IllegalStateException("LocalRangeStep must follow a VertexStep that produces edges, not vertices");
                }
            } else if (previousStep instanceof PropertiesStep) {
                // do nothing, all is good
View Full Code Here


            return (T) traversal;
        }

        public <T extends Traversal<Vertex, Vertex>> T vertices(final Vertex vertex) {
            final Traversal traversal = this.incidentTraversal.get();
            final VertexStep step = TraversalHelper.getLastStep(traversal, VertexStep.class).get();
            TraversalHelper.insertStep(new EdgeVertexStep(traversal, step.getDirection().opposite()), traversal.getSteps().size(), traversal);
            TraversalHelper.insertStep(new StartStep<>(traversal, vertex), 0, traversal);
            return (T) traversal;
        }
View Full Code Here

            return (T) traversal;
        }

        public Direction getDirection() {
            final Traversal traversal = this.incidentTraversal.get();
            final VertexStep step = TraversalHelper.getLastStep(traversal, VertexStep.class).get();
            return step.getDirection();
        }
View Full Code Here

TOP

Related Classes of com.tinkerpop.gremlin.process.graph.step.map.VertexStep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.