Search in sources :

Example 1 with ReferenceEdge

use of org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdge in project janusgraph by JanusGraph.

the class FulgoraMemory method attachReferenceElements.

private static void attachReferenceElements(TraverserSet<Object> toProcessTraversers, Graph graph) {
    toProcessTraversers.forEach(traverser -> {
        Object value = traverser.get();
        if (value instanceof ReferenceVertex) {
            Vertex vertex = ((ReferenceVertex) value).attach(Attachable.Method.get(graph));
            traverser.set(vertex);
        } else if (value instanceof ReferenceEdge) {
            Edge edge = ((ReferenceEdge) value).attach(Attachable.Method.get(graph));
            traverser.set(edge);
        }
    });
}
Also used : ReferenceVertex(org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex) Vertex(org.apache.tinkerpop.gremlin.structure.Vertex) ReferenceVertex(org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex) ReferenceEdge(org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdge) ReferenceEdge(org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdge) Edge(org.apache.tinkerpop.gremlin.structure.Edge)

Aggregations

Edge (org.apache.tinkerpop.gremlin.structure.Edge)1 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)1 ReferenceEdge (org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdge)1 ReferenceVertex (org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex)1