Skip to content
Achim Brandt edited this page May 24, 2015 · 31 revisions

ArangoDB-Logo

blueprints-arangodb-graph is an implementation of the Blueprints API for ArangoDB.

Example ArangoDBGraph

  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();

More

Clone this wiki locally