-
Notifications
You must be signed in to change notification settings - Fork 8
Versioning with Neo4j
asaf edited this page Jan 16, 2013
·
9 revisions
Neo4j is a very known graph database implementation and production ready,
Using Antiquity in conjunction with Neo4j is very simple, The only thing required is to initialize a Neo4j blueprints graph instance as the base graph,
//Create a neo4j database instance
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase("target/database/location");
//Wrap it with blueprint API
Neo4jGraph baseGraph = new Neo4jGraph(graphDb);
//Wrap it with Antiquity version graph
TransactionalVersionedGraph<Neo4jGraph, Long> graph = new TransactionalVersionedGraph<Neo4jGraph, Long>(
baseGraph, new LongGraphIdentifierBehavior());
Simply work with the graph
instance.
For more information about Blueprints Neo4jGraph implementation see: https://github.com/tinkerpop/blueprints/wiki/Neo4j-Implementation