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).
最后,我使用了reasoner.getPendingChanges()。isEmpty()来通过缓冲推理器检查新的更改(对于非缓冲的更改将自动应用)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.