1

I have an ontology that I need to save on file if and only if some changes occured and the reasoner (pellet in my case) is consistent with these changes. So i write:

 reasoner.flush(); //sync reasoner
 if(reasoner.isConsistent())
 manager.saveOntology(ontos[1], new RDFXMLDocumentFormat(), IRI.create((new   File(file)).toURI())); 

I would synchronize Pellet only if the ontology has been modified, than if it is consistent synchronize it and apply changes. Any idea how to proceed? Thank you

(Edit: I use manager.applyChange method in order to modify the ontology).

4

1 回答 1

1

最后,我使用 reasoner.getPendingChanges().isEmpty() 来检查带有缓冲推理器的新更改(非缓冲更改会自动应用)。

于 2015-07-11T17:28:44.280 回答