Hi all,
I'm having difficulties with my Jena/Pellet environment, as the reasoning after individual removals
is very slow and my SWRL rules are not evaluated.
This is my setup. I'm using an inferencing model atop a non-inferencing model:
OntModel baseModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
baseModel.addSubModel(onto1.owl);
baseModel.addSubModel(onto2.owl);
baseModel.addSubModel(onto3.owl);
OntModel infModel =
ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC, baseModel);
infModel.prepare();
// ...add/remove individuals to/from baseModel...
infModel.rebind();
// ...query infModel...
I use the baseModel for adding/removing individuals including their properties and the infModel for
queries. Here I found out that if I want the reasoner to find inconsistencies, I need a
infModel.rebind() after each modification to the baseModel (add/remove some individuals). However,
the rebind() call is fast after adding individuals (it's done almost instantly) and *very* slow
after individuals have been removed (in my case, sometimes more than 1min), even after only a few
statements are (bulk) removed. Is there a way to increase the reasoner update speed? Do I really
have to rebind after each modification (before the next query)?
Maybe a related problem is that the SWRL rules contained in my ontologies are not evaluated at
runtime (at least I can't query them, nor do i see them in the serialized models). If I serialize my
runtime ontologies (both baseModel.write() or infModel.write()), I can load either into Protege, run
Pellet and get the expected results from the rules. Do you know what I'm doing wrong?
Thanks for your help!
Jan