GraphIt implements the Blueprints interfaces via the wrapper class BlueprintsGraph, and you can therefor use Gremlin to traverse the graph.
Below is an example using this graph getting the name of all unique users that listened to the same tracks that John bought:
Graph graph = new BlueprintsGraph(musicStoreGraph); GremlinPipeline<Vertex, Vertex> pipe = new GremlinPipeline<Vertex, Vertex>(); NodeId john = new NodeId(USER, "john.doe"); return pipe.start(graph.getVertex(john)) .out(BOUGHT.name()) .in(LISTENED_TO.name()) .dedup() .property("Name") .toList();
A few more examples can be found here. For more information, please see the Gremlin wiki and javadoc.
There was an error while loading. Please reload this page.
Home When To Use GraphIt Limitations Basic Examples Optional Persistance Pluggable Repositories Save RAM With EnumMapProperties Tinkerpop Blueprints Traversing With Gremlin Last.FM Test Graph In The Backlog Acknowledgments