Hi guys:

I am having really a hard time with TDB, I was planning to post everything
here but I googled first and found a post on the stachoverflow that has the
same issue, but with no answer.

http://stackoverflow.com/questions/21115009/how-could-i-store-multiple-ontologies-in-tdb/24277697#24277697
.

Here is my code too:

System.out.println("creting infeer dataset ");

 Dataset dataset = TDBFactory.createDataset(data.getInferredResultsPath());

 System.out.println("creting OntModel ");

 OntModel Infmodel =

  ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC,

   dataset.getNamedModel(this.URL));

 System.out.println("adding schema (OWL) to OntModel");

 Infmodel.add(this.owl);

 System.out.println("adding data (RDF) to OntModel ");

 Infmodel.add(data.tdb);

 System.out.println("creting ModelExtractor ");

 ModelExtractor ext = new ModelExtractor(Infmodel);

System.out.println("replacing OntModel by the Extracted Model");

 dataset.replaceNamedModel(this.URL, ext.extractModel());

System.out.println("saving infead model");

 Infmodel.close();

 System.out.println("closing infeed dataset");

 dataset.close();


Please guys let me know what I should do. a couple of thing to say:

I am using apache-jena-2.10.0
also, when I run the reasoner on a small tab, it works perfectly.



-- 
Adeeb Noor
Ph.D. Candidate
Dept of Computer Science
University of Colorado at Boulder
Cell: 571-484-3303
Email: [email protected]

Reply via email to