Closed shadialian closed 4 years ago
You're trying to remove the rules by emptying an internal map in the reasoner, but I suspect that map is filled again when preparing the reasoner. I'd remove the rules from the root ontology and then flush the reasoner; that should be enough.
Do you mean query the rules and delete them from the ontology. I was trying to clone the way rules are added.
Hello Shadialian, I can confirm Ignazio affirmation, the only good way to add/del rules is to use the OWLOntology interface. You can look at example in the tests of the owlapi-module search for TestBasic.java .
In normal usages, you should only use interfaces from the owlapi. The KnowledgeBase.java may never be use.
Doing so will improve portability with other reasonner
Hi all, I am trying to build a custom rule editor for a research project. I am using OWLApi with openllet reasoner. I have the rule in a seprate ontology as follows. The question is after I deleted a rule I couldn't get the reseanor to redo the reasoning without the rule. the code as follows and the ontologies are attached.
Thanks
owlapi.zip