-
-
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());
}
Download Apache Maven if not installed and unpack the package:
user:/tmp> unzip apache-maven-3.0.4-bin.zip
Archive: apache-maven-3.0.4-bin.zip
creating: apache-maven-3.0.4/
...
Add the maven binary path to $PATH:
user:/tmp> export PATH=/tmp/apache-maven-3.0.4/bin/:$PATH
Run "mvn --version" to verify that it is correctly installed.
user:/tmp> mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /tmp/apache-maven-3.0.4
Java version: ...
Make a local clone of the blueprints-arangodb-graph repository:
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.
Go into the created directory and build with mvn clean install
user:/tmp> cd blueprints-arangodb-graph/
user:/tmp/blueprints-arangodb-graph> mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Blueprints-ArangoDB-Graph 1.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------