Skip to content

Instantly share code, notes, and snippets.

@kendall
Created May 7, 2010 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kendall/393549 to your computer and use it in GitHub Desktop.
Save kendall/393549 to your computer and use it in GitHub Desktop.
Graph aGraph = new GraphImpl();
URI aBook = aGraph.getValueFactory().createURI("urn:x-domain:oreilly.com:product:9780596514129.IP");
aGraph.add(aBook,
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/publisher"),
aGraph.getValueFactory().createLiteral("O'Reilly Media / Pogue Press"));
aGraph.add(aBook,
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/title"),
aGraph.getValueFactory().createLiteral(
"Switching to the Mac: The Missing Manual, Leopard Edition"));
// ... setting the additional properties here ...
aGraph.add(aBook,
RDF.TYPE,
aGraph.getValueFactory().createURI("http://vocab.org/frbr/core#Expression"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment