-
-
Notifications
You must be signed in to change notification settings - Fork 16
Home
a-brandt edited this page Apr 8, 2013
·
31 revisions
blueprints-arangodb-graph is an implementation of the Blueprints API for ArangoDB.
try {
String graphName = "MyFirstGraph";
String vertices = "MyVerticesCollection";
String edges = "MyEdgesCollection";
// cleate a ArangoDB graph
ArangoDBGraph graph = new ArangoDBGraph("localhost", 8529, graphName, vertices, edges);
// create two vertices
Vertex v1 = graph.addVertex("v1");
Vertex v2 = graph.addVertex("v2");
// create edge
Edge e1 = graph.addEdge("e1", v1, v2, "knows");
// close the graph
graph.shutdown();
} catch (ArangoDBGraphException e) {
e.printStackTrace();
fail(e.getMessage());
}