本文整理汇总了Java中org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep类的典型用法代码示例。如果您正苦于以下问题:Java DropStep类的具体用法?Java DropStep怎么用?Java DropStep使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DropStep类属于org.apache.tinkerpop.gremlin.process.traversal.step.filter包,在下文中一共展示了DropStep类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processTraversalFilterStep
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep; //导入依赖的package包/类
private static final boolean processTraversalFilterStep(final TraversalFilterStep<?> step, final Traversal.Admin<?, ?> traversal) {
final Traversal.Admin<?, ?> childTraversal = step.getLocalChildren().get(0);
if (TraversalHelper.hasAllStepsOfClass(childTraversal, FilterStep.class) &&
!TraversalHelper.hasStepOfClass(childTraversal,
DropStep.class,
RangeGlobalStep.class,
DedupGlobalStep.class,
LambdaHolder.class)) {
TraversalHelper.applySingleLevelStrategies(traversal, childTraversal, InlineFilterStrategy.class);
final Step<?, ?> finalStep = childTraversal.getEndStep();
TraversalHelper.insertTraversal((Step) step, childTraversal, traversal);
TraversalHelper.copyLabels(step, finalStep, false);
traversal.removeStep(step);
return true;
}
return false;
}
示例2: apply
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep; //导入依赖的package包/类
@Override
public void apply(Traversal.Admin traversal) {
if (!(traversal.getGraph().get() instanceof SqlgGraph)) {
return;
}
Optional<DropStep> dropStepOptional = TraversalHelper.getLastStepOfAssignableClass(DropStep.class, traversal);
if (dropStepOptional.isPresent()) {
DropStep<?> dropStep = dropStepOptional.get();
TraversalHelper.replaceStep(dropStep, new SqlgDropStepBarrier<>(traversal, dropStep.getMutatingCallbackRegistry()), traversal);
}
}
示例3: drop
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep; //导入依赖的package包/类
public default GraphTraversal<S, E> drop() {
return this.asAdmin().addStep(new DropStep<>(this.asAdmin()));
}
示例4: drop
import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep; //导入依赖的package包/类
/**
* Removes elements and properties from the graph. This step is not a terminating, in the sense that it does not
* automatically iterate the traversal. It is therefore necessary to do some form of iteration for the removal
* to actually take place. In most cases, iteration is best accomplished with {@code g.V().drop().iterate()}.
*
* @return the traversal with the {@link DropStep} added
* @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#drop-step" target="_blank">Reference Documentation - Drop Step</a>
* @since 3.0.0-incubating
*/
public default GraphTraversal<S, E> drop() {
this.asAdmin().getBytecode().addStep(Symbols.drop);
return this.asAdmin().addStep(new DropStep<>(this.asAdmin()));
}