java driver for metagraph
<dependency>
<groupId>io.openmg</groupId>
<artifactId>metagraph-driver-java</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Metagraph
是一个重量级对象,用户在使用时,只需构建一个对象即可。
Metagraph metagraph = new Metagraph("http://localhost:8080", "username", "password");
Graph graph = metagraph.open("graphId");
String graphResponse = graph.gremlin("g.V()", "tp");
Metagraph metagraph = new Metagraph("http://localhost:8080", "username", "password");
Graph graph = metagraph.create("testGraph1");
Metagraph metagraph = new Metagraph(new URL("http://localhost:8080"), "username", "password");
GraphsResponse graphs = metagraph.graphs();
Metagraph metagraph = new Metagraph("http://localhost:8080", "username", "password");
Graph graph = metagraph.open("graphId");
String graphResponse = graph.gremlin("g.V()", "tp");