Hi there,

I have been trying to persist my ontology (a .owl file that I defined on my
own) and some models I created based on the it. However, I could't seem to
read what I have previously written.

The way I wrote to TDB is as follows:

Dataset dataset = TDBFactory.createDataset(dir);
OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );
dataset.addNamedModel(graph_name, m);
FileManager.get().readModel(m, "ontology/test.owl");

... add triples to model m.

TDB.sync(dataset);

Did I do anything wrong here? I was trying to find some examples on jena
documentation. However there's on link on
http://jena.apache.org/documentation/ontology/ that points to
http://jena.apache.org/documentation/examples/persistent-ont-model/index.html
which
is broken...Please help...

Thanks.

Reply via email to