if (engine.equals(TraversalEngine.STANDARD))
return;
final StartStep<Element> startStep = (StartStep) TraversalHelper.getStart(traversal);
if (startStep.startAssignableTo(Vertex.class, Edge.class)) {
final GiraphElement element = ((StartStep<?>) startStep).getStart();
final String label = TraversalHelper.getStart(traversal).getLabel();
TraversalHelper.removeStep(TraversalHelper.getStart(traversal), traversal);
if (TraversalHelper.isLabeled(label)) {
final Step identityStep = new IdentityStep(traversal);
identityStep.setLabel(label);
TraversalHelper.insertStep(identityStep, 0, traversal);
}
TraversalHelper.insertStep(new HasStep(traversal, new HasContainer(T.id, Compare.eq, element.id())), 0, traversal);
TraversalHelper.insertStep(new GiraphGraphStep<>(traversal, element.getClass(), (GiraphGraph) element.graph()), 0, traversal);
}
}