Reputation: 1359
I'm using Java to connect to JanusGraph 1.0. I'm having trouble understanding why JanusGraph would ever return a Vertex.
JanusGraph graph = JanusGraphFactory.open('configfile');
JanusGraphVertex jgv = graph.addVertex('city');
Vertex gv = graph.traversal().V().hasLabel('city').next();
I'm wondering if I'm missing something that will lead to mixing things up or really suboptimal solutions. Is the intent for the JanusGraph library to be for writing with transactions while reading uses the Gremlin classes?
Editing to try and clarify:
JanusGraph object has a traversal method it inherits from Graph with no modifications. AFAIK there isn’t another way to traverse a graph using the JanusGraph library classes. For example, I don’t see a way to run g.V().next() and get a JanusGraphVertex. Am I overlooking something? Is there another way to traverse the graph? Or are you supposed to just work with two different Vertex classes?
I think my question might boil down to why isn’t there a JanusGraphTraversal class?
Upvotes: 0
Views: 47