本文整理汇总了Java中org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep.getDirection方法的典型用法代码示例。如果您正苦于以下问题:Java VertexStep.getDirection方法的具体用法?Java VertexStep.getDirection怎么用?Java VertexStep.getDirection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep
的用法示例。
在下文中一共展示了VertexStep.getDirection方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: UniGraphVertexStep
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
public UniGraphVertexStep(VertexStep<E> vertexStep, UniGraph graph, ControllerManager controllerManager) {
super(vertexStep.getTraversal(), graph);
vertexStep.getLabels().forEach(this::addLabel);
this.direction = vertexStep.getDirection();
this.returnClass = vertexStep.getReturnClass();
this.returnsVertex = vertexStep.returnsVertex();
if (vertexStep.getEdgeLabels().length > 0) {
this.edgeLabels = vertexStep.getEdgeLabels();
HasContainer labelsPredicate = new HasContainer(T.label.getAccessor(), P.within(vertexStep.getEdgeLabels()));
this.predicates = PredicatesHolderFactory.predicate(labelsPredicate);
} else this.predicates = PredicatesHolderFactory.empty();
this.controllers = controllerManager.getControllers(SearchVertexQuery.SearchVertexController.class);
this.deferredVertexControllers = controllerManager.getControllers(DeferredVertexQuery.DeferredVertexController.class);
this.stepDescriptor = new StepDescriptor(this);
limit = -1;
}
示例2: optimizeSteps
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
/**
* Optimizes the given edge-emitting step and the vertex-emitting step by replacing them with a single
* vertex-emitting step.
*
* @param traversal the traversal that holds the given steps
* @param step1 the edge-emitting step to replace
* @param step2 the vertex-emitting step to replace
*/
private static void optimizeSteps(final Traversal.Admin traversal, final VertexStep step1, final Step step2) {
final Step newStep = new VertexStep(traversal, Vertex.class, step1.getDirection(), step1.getEdgeLabels());
for (final String label : (Iterable<String>) step2.getLabels()) {
newStep.addLabel(label);
}
TraversalHelper.replaceStep(step1, newStep, traversal);
traversal.removeStep(step2);
}
示例3: getDirection
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
private static Direction getDirection(final Traversal.Admin<Vertex, Edge> incidentTraversal) {
final VertexStep step = TraversalHelper.getLastStepOfAssignableClass(VertexStep.class, incidentTraversal).get();
return step.getDirection();
}
示例4: HBaseVertexStep
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public HBaseVertexStep(final VertexStep<E> originalVertexStep) {
super(originalVertexStep.getTraversal(), originalVertexStep.getReturnClass(), originalVertexStep.getDirection(), originalVertexStep.getEdgeLabels());
originalVertexStep.getLabels().forEach(this::addLabel);
}
示例5: TitanVertexStep
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
public TitanVertexStep(VertexStep<E> originalStep) {
super(originalStep.getTraversal(), originalStep.getReturnClass(), originalStep.getDirection(), originalStep.getEdgeLabels());
originalStep.getLabels().forEach(this::addLabel);
this.hasContainers = new ArrayList<>();
this.limit = Query.NO_LIMIT;
}
示例6: getDirection
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
private static Direction getDirection(Traversal.Admin<Vertex, Edge> incidentTraversal) {
VertexStep<?> step = TraversalHelper.getLastStepOfAssignableClass(VertexStep.class, incidentTraversal).get();
return step.getDirection();
}
示例7: TorcVertexStep
import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexStep; //导入方法依赖的package包/类
public TorcVertexStep(final VertexStep<E> originalVertexStep) {
this(originalVertexStep.getTraversal(),
originalVertexStep.getReturnClass(),
originalVertexStep.getDirection(),
originalVertexStep.getEdgeLabels());
}