I have an ontology which I run the jena reasoner with custom rules on. Now, I want to add new data (experimental results) to the model und delete some old data, if a the model gets to big (due to memory issues) with getting the infModel updated.
Adding data isn't much of a problem, since I can simply add it to my OntModel and the reasoning unit adds the conclusions to the infModel.
Removing a "result" is more of a problem for me. I have to delete them from the infModel. At the moment I simply remove all the statements which the "result" is part of. This approach is very slow. It seems that every removed statement triggers a reasoning for the possible changes in the InfModel. In my example removing a "result" which is part of a lot of statements can take up to 12 times the time of the initial reasoning.
If found a possible solution here: Toggle Jena Reasoner
My question is: is there a solution without creating a second model without a reasoner and rebind the changes to the infModel? Or is there another way to remove data from the infModel which only triggers the reasoning once?