Skip to content

Result manager and result display

maphih edited this page Sep 5, 2025 · 1 revision

General

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:

  1. IAbductionSolverResultPanelEventListener (found in evee-protege-core), which is used to receive events generated by the single result panels. The result manager listens for the events of the type EXPLAIN, ADD and EXPLANATION_DIALOG_CLOSED.
  2. ISignatureModificationEventListener and ISignatureModificationEventGenerator in 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.
  3. IAbductionSolverOntologyChangeEventGenerator in order to forward information to the AbstractAbductionSolver when changes and edits are made to the active ontology.

Single result panels

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:

  1. ISignatureModificationEventListener and ISignatureModificationEventGenerator, in order to forward events from a private class handling the functionality of the button Forbid vocabulary to the abduction solver result manager.
  2. IAbductionSolverSingleResultPanelEventGenerator in order to send AbductionSolverSingleResultPanelEvents of the types ADD, EXPLAIN, and EXPLANATION_DIALOG_CLOSED, as well as SignatureModificationEvents to the result manager.

Information flow from the result manager to the abstract abduction solver

Sending events from the AbductionSolverResultManager to the AbstractAbductionSolver (which is registered with the result manager as an AbductionSolverOntologyChangeEventListener) is done in several different cases:

  1. When the result manager receives AbductionSolverSingleResultPanelEvent of the type EXPLAIN or EXPLANATION_DIALOG_CLOSED from the single result panel, an AbductionSolverOntologyChangeEvent of the type VIEW_COMPONENT_IGNORE_CHANGE is send to the AbstractAbductionSolver. The abstract abduction solver, in turn, will then send an ExplanationEvent of the type IGNORE_ONTOLOGY_CHANGE to the non-entailment view component.
  2. When the result manager receives an AbductionSolverSingleResultPanelEvent of the type ADD from the single result panel, an AbductonSolverOntologyChangeEvent of the type ONTOLOGY_EDITED_INTERNALLY is send to the AbstractAbductionSolver.
  3. When the result manager receives an OWLModelManagerChangeEvent, or an OWLOntologyChange event, from Protégé, it sends an AbductionSolverOntologyChangeEvent of the type ACTIVE_ONTOLOGY_CHANGED, or ONTOLOGY_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 buttons Explain or Add to Ontology in the single result panel, or if the explanation dialog opened after clicking on the Explain-button was closed by the user.

Clone this wiki locally