-
-
Notifications
You must be signed in to change notification settings - Fork 16
Home
Achim Brandt edited this page May 24, 2015
·
31 revisions
blueprints-arangodb-graph is an implementation of the Blueprints API for ArangoDB.
String graphName = "MyFirstGraph";
String vertices = "MyVerticesCollection";
String edges = "MyEdgesCollection";
// create a connection configuration
ArangoDBConfiguration configuration = new ArangoDBConfiguration("localhost", 8529);
// use the default database or configure a different database
// by: configuration.setDb("myTestDB");
// create a ArangoDB graph
ArangoDBGraph graph = new ArangoDBGraph(configuration, 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();