On 10/12/10 13:02, Benson Margulies wrote:
On to TDB.

How are named graphs mapped into the Jena API?

Does creating a named Ontology model (OntModel m =
ModelFactory.createOntologyModel(spec, maker, baseModel);) do the job?

THis page (http://openjena.org/wiki/TDB/Datasets) comes close but does
quite answer the question.

In TDB, you don't need to create a graph as such - you just need to get a handle to a model:

 Model m = dataset.getNamedModel("http://example/graph157";) ;

You can wrap that in an OntModel

 OntModel ontModel = ModelFactory.createOntologyModel(spec, base) ;

If you update with SPARQL Update, you can just

INSERT DATA { GRAPH <http://example/graph157> { ...triples... } }

        Andy

Reply via email to