-
Notifications
You must be signed in to change notification settings - Fork 1
Result manager and result display
The result of the abduction computation is displayed to the user as a series of objects shown on a JScrollPane. Each element in this series is an object of the class SingleResultPanel. Each result panel contains three buttons. The button Explain opens a dialog similar to the Explanation Window of Protégé that is opened when clicking the grey ? next to an axiom (see below). The button Forbid vocabulary adds the vocabulary of this hypothesis to the forbidden vocabulary. The button Add to ontology adds all axioms of this hypothesis to the active ontology.
The class AbductionSolverResultManager is responsible for creating and keeping track of the individual result panels and for providing the general UI components that the panels are put into. Furthermore, the result manager listens for changes of the active ontology and edits to the ontology.
The AbductionSolverResultManager implements the following interfaces:
-
IAbductionSolverResultPanelEventListener(found inevee-protege-core), which is used to receive events generated by the single result panels. The result manager listens for the events of the typeEXPLAIN,ADDandEXPLANATION_DIALOG_CLOSED. -
ISignatureModificationEventListenerandISignatureModificationEventGeneratorin order to handle events about changes to the forbidden signature. These events are forwarded from the single result panels to the non-entailment view component without being altered. -
IAbductionSolverOntologyChangeEventGeneratorin order to forward information to theAbstractAbductionSolverwhen changes and edits are made to the active ontology.
The class SingleResultPanel is responsible for creating the UI of a single result and implementing the functionality of the three buttons mentioned above.
The SingleResultPanel implements the following interfaces:
-
ISignatureModificationEventListenerandISignatureModificationEventGenerator, in order to forward events from a private class handling the functionality of the buttonForbid vocabularyto the abduction solver result manager. -
IAbductionSolverSingleResultPanelEventGeneratorin order to sendAbductionSolverSingleResultPanelEventsof the typesADD,EXPLAIN, andEXPLANATION_DIALOG_CLOSED, as well asSignatureModificationEventsto the result manager.
Sending events from the AbductionSolverResultManager to the AbstractAbductionSolver (which is registered with the result manager as an AbductionSolverOntologyChangeEventListener) is done in several different cases:
- When the result manager receives
AbductionSolverSingleResultPanelEventof the typeEXPLAINorEXPLANATION_DIALOG_CLOSEDfrom the single result panel, anAbductionSolverOntologyChangeEventof the typeVIEW_COMPONENT_IGNORE_CHANGEis send to theAbstractAbductionSolver. The abstract abduction solver, in turn, will then send anExplanationEventof the typeIGNORE_ONTOLOGY_CHANGEto the non-entailment view component. - When the result manager receives an
AbductionSolverSingleResultPanelEventof the typeADDfrom the single result panel, anAbductonSolverOntologyChangeEventof the typeONTOLOGY_EDITED_INTERNALLYis send to theAbstractAbductionSolver. - When the result manager receives an
OWLModelManagerChangeEvent, or anOWLOntologyChangeevent, from Protégé, it sends anAbductionSolverOntologyChangeEventof the typeACTIVE_ONTOLOGY_CHANGED, orONTOLOGY_EDITED_EXTERNALLY, to the abstract abduction solver. Note that the latter event is not sent if the change was done because the user clicked on the buttonsExplainorAdd to Ontologyin the single result panel, or if the explanation dialog opened after clicking on theExplain-button was closed by the user.