-
Notifications
You must be signed in to change notification settings - Fork 1
Handling Ontology Change Events
Through the Protégé interface OWLOntologyChangeListener, classes can receive events that are triggered when the active ontology is edited in Protégé. Various classes related to non-entailment explanations need to listen for these events:
- The java file of the class
NonEntailmentVocabularySelectionUIcontains a private class listening for these events to ensure that the currently displayedVocabulary UI elementscontain exactly those classes, object properties and individuals that are defined in the active ontology. Furthermore, the view will reset the displayed result component to an empty panel unless it received anExplanationEventof the typeIGNORE_ONTOLOGY_CHANGE(see below). - The java file of the class
NonEntailmentViewComponentcontains a private class listening for these events to ensure that the currently displayedMissing Entailment UI elementscontain exactly those classes, object properties and individuals that are defined in the active ontology. - The java file
AbductionSolverResultManagercontains a private class listening for these events to ensure that the displayed result component will be reset correctly if the active ontology is edited.
The non-entailment explanation services using abduction have the functionality to explain why a produced result leads to the missing entailment being entailed. This is done by utilizing the Explanation Window of Protégé. The computed result for the missing entailment is added to the active ontology and then the explanation window is displayed, just as if the user had clicked on the ?-button next to an axiom in the entities tab. The added axioms are removed when the window is closed again. Both adding and removing the axioms leads to OWLOntologyChange-events being created. In order for the view to be able to ignore these particular events, the abduction solvers trigger an ExplanationEvent of the type IGNORE_ONTOLOGY_CHANGE right before changing the ontology. The view then listens for this event and will ignore the next ontology change. In case an OWLOntologyChange-event is registered without an ExplanationEvent of type IGNORE_ONTOLOGY_CHANGE occurring, the view will reset the displayed result to an empty panel.