[Pellet-users] reasoner refresh and ontology changes

Daniel M. Herzig herzig at stanford.edu
Thu Jul 17 00:21:31 UTC 2008


> On Thu, 2008-06-26 at 11:47 +0200, robocop wrote:
>
> >/ I want to know if Pellet (with OWLAPI) "knows" the changes made onto the
> />/ ontology, i.e. if I create a class complement of a class description,
> />/ and I add this new class to the ontology, then the reasoner
> />/ automatically can do inference on that new class or I have to
> />/ refresh/reload the ontology loaded by the reasoner?
> /
> Pellet (as an owlapi OWLReasoner) will "know" about the changes only if
> it is added to the OWLOntologyManager as an OntologyChangeListener,
> otherwise a call to refresh is necessary.
>
> The IncrementalConsistencyExample example in the distribution has code
> that demonstrates adding the reasoner as a change listener.

How can I call such a refresh?
I don't want to add the reasoner as a listener, 
since I perform many changes and don't want to trigger the classification after each step, 
just once after all changes are complete.
All refresh() methods I found are private.
Just calling reasoner.classify() is not enough, because the reasoner doesn't take the changes into account sometimes.

I instantiate the reasoner like this in an Protege4/owlapi environment:

OWLReasonerManager reasonmanager = owlmodelmanager.getOWLReasonerManager();
OWLReasoner reasoner = reasonmanager.getCurrentReasoner();
...
//Ontology manipulations
...
reasoner.classify();

Thank you!
Daniel



More information about the Pellet-users mailing list