Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mhgrove
Last active December 27, 2015 00:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhgrove/7237122 to your computer and use it in GitHub Desktop.
Save mhgrove/7237122 to your computer and use it in GitHub Desktop.
// this is where we'll store our constraints
Sail aConstraints = new MemoryStore();
aConstraints.initialize();
// more specifically, we'll store them in a particular named graph
URI aConstraintGraph = Values.iri("urn:icv");
// and here is our database. note this can be *any* type of Repository
Repository aRepo = new SailRepository(new MemoryStore());
// and now we want to layer Stardog ICV on top of that repo
ICVRepository aICRepo = SesameICV.builder()
.constraints(aConstraints)
.context(aConstraintGraph)
.build(aRepo);
// now obtain a connection to the database
ICVRepositoryConnection aConn = aICRepo.getConnection();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment