Skip to content

Instantly share code, notes, and snippets.

@datablend
Created July 8, 2011 13:24
Show Gist options
  • Save datablend/1071821 to your computer and use it in GitHub Desktop.
Save datablend/1071821 to your computer and use it in GitHub Desktop.
Create graphdb connection
// Create the sail graph database
graphDb = new EmbeddedGraphDatabase("var/flights");
indexService = new LuceneIndexService(graphDb);
fulltextIndex = new SimpleFulltextIndex(graphDb, new File("var/flights/lucene-fulltext"));
rdfStore = new VerboseQuadStore(graphDb, indexService, null, fulltextIndex);
sail = new GraphDatabaseSail(graphDb, rdfStore);
// Initialize the sail store
sail.initialize();
// Get the sail repository connection
connection = new SailRepository(sail).getConnection();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment