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).