On 25/01/13 21:38, Emanuel Santos wrote:
Hi,

Thanks for the reply.

I'm using

OntModel omodel =
ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
OntModel bmodel =ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM)

to create the ontologies models that I want.

In this case I need to do this

omodel.read("file:/..ontology A");
bmodel.read("file:/..ontology A");

right ? Or can I get the basic model from "omodel" without creating the
"bmodel" ?

Sure:

  OntModel bmodel
       = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM,
                      omodel.getRawModel());

At least if your ontologies aren't doing any imports. It's a little more complex if there are imports but still possible.

Dave

Reply via email to