- changed status to resolved
Exposing the snapshot capabilities
I'm looking for a reasoner that enables to load a previous state in order not to have to reclassify the ontology from scratch every single time I start my application (currently, I'm working on an ontology viewer, but there are more applications where I could use this indeed).
I've seen that through the OWLAPI implementation there are three methods, namely: checkSaveLoadContext, set, clear; but it is not clear how to use them to load a particular state in time (e.g., to rollback after asserting something inconsistent). I've been digging on the cpp code and I've seen that there are some methods to do so, but they are not exported via JNI (at least, I've not seen how to reach them). Is there any way to save and restore the reasoner's status to a particular state from Java? If not, could you give some pointers to include such functionality (if it could be possible)?
Cheers, C
Comments (1)
-
reporter - Log in to comment
Just in case someone finds it useful, I'll answer myself: the functionality is there, but it's a bit tricky. The setSaveContext method does both the save (when a new reasoning task is performed) and the load (when the reasoner is not ready yet, it checks whether it can load the previous state from the given file). Not too much control on the workflow (I've figured it out after digging into the code and playing with a little bit as a black box), but useful indeed.