-
-
Notifications
You must be signed in to change notification settings - Fork 16
Home
a-brandt edited this page Feb 7, 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());
}
Install Apache Maven (example for OpenSUSE)
user:/tmp> zypper install ...
...
user:/tmp> mvn --version
/usr/lib64/jvm/java
Apache Maven X.Y.Z (rNON-CANONICAL_2012-01-26_16-52_abuild; 2012-01-26 17:52:20+0100)
Java version: 1.X.Y
...
user:/tmp> git clone https://github.com/triAGENS/blueprints-arangodb-graph.git
Cloning into 'blueprints-arangodb-graph'...
remote: Counting objects: 210, done.
remote: Compressing objects: 100% (118/118), done.
remote: Total 210 (delta 74), reused 178 (delta 43)
Receiving objects: 100% (210/210), 74.94 KiB, done.
Resolving deltas: 100% (74/74), done.
user:/tmp> cd blueprints-arangodb-graph/
user:/tmp/blueprints-arangodb-graph>