Skip to content

Non Entailment View

maphih edited this page Sep 5, 2025 · 1 revision

General

The class NonEntailmentViewComponent constitutes the main UI of the non-entailment plugin. The view consists of three parts: In the top, the Explanation Service can be selected from a drop-down menu and basic warning and information messages are shown. On the left, the Missing Entailment and Vocabulary can be specified in two separate tabs. On the right, the Result of the computation is shown. How the specific layout of this Result looks is determined by the explanation service itself. For example, the Counterexample Services of Evee show a graph that depicts a counterexample for the non-entailment, while the Abduction Services show sets of axioms that can be added to the ontology.

Logic

The NonEntailmentViewComponent extends the Protégé class AbstractOWLViewComponent, which is necessary to provide a view that can be displayed in Protégé. The following interfaces are implemented by the NonEntailmentViewComponent:

  1. ActionListener, which listens for actions from the buttons used to generate an explanation, add/delete/reset the missing entailment and load/save the missing entailment.
  2. IPreferencesChangeListener (found in evee-protege-core), which is used to receive a notification when the layout of the view should be changed (options being Standard and Alternative) or if a simplified view should be displayed (which hides buttons to load/save the missing entailment and the selected signature and a button to forbid the signature of the current missing entailment). Currently, the view listens for the events LAYOUT_CHANGE and SIMPLE_MODE_CHANGE.
  3. IExplanationLoadingScreenEventListener (found in evee-protege-core), which is used to handle the cancellation event created when the computation is cancelled by the user. The event that is listened for is of the type EXPLANATION_GENERATION_CANCELLED.
  4. ISignatureModificationEventListener (found in evee-protege-core), which is used to handle a SignatureModificationEvent created by a specific non-entailment explanation service. This event doesn't come with specific event types and simply provides a Set of OWLEntities that will be added to the forbidden signature. Currently, this feature is only used by the Abduction services in order to allow the user to quickly forbid the whole signature of a specific result.
  5. IExplanatioNGenerationListener (found in evee-protege-core), which is used to handle various events created by the explanation service. Currently, the view listens for the events COMPUTATION_COMPLETE, ERROR, WARNING, RESULT_RESET, SHOW_LOADING_SCREEN and IGNORE_ONTOLOGY_CHANGE.

The event of type RESULT_RESET is used to reset the result screen to an empty panel. The event of type IGNORE_ONTOLOGY_CHANGE is used to inform the view that the next OWLOntologyChange event is to be ignored. For more information see the section [Handling ontology change events](Non-Entailment-Explanation-Services/Handling ontology change events).

User interface

The input into the text field in the tab Missing Entailment is checked via the private class OWLLogicalAxiomChecker which is contained in the file NonEntailmentViewComponent.java. The axiom checker implements the interface OWLExpressionChecker and uses an object of the class ManchesterOWLSyntaxParser to parse the input string to an axiom. Only logical axioms are accepted as input.

The methods that define the functionality of the buttons in the tab Missing Entailment are defined in the class NonEntailmentViewComponent, while the methods that define the functionality of the buttons in the tab Vocabulary are defined in the class NonEntailmentVocabularySelectionUI. The vocabulary selection UI internally has two separate UIs, one for the standard layout and one for the alternative layout. Only one of these is shown to the user, depending on the currently selected option in the preferences.

Loading and saving the missing entailments is done via ontologies, i.e. saving a missing entailment saves an ontology that contains only the axioms of the missing entailment and loading a missing entailment takes as input an ontology, the logical axioms of which are added to the list of missing entailments. Loading and saving a vocabulary is done via the class SignatureFileHandler (found in evee-protege-core). This class reads and writes simple text files with specific delimiters, which are defined in SignatureEnum. The file handler is used by both, the non-entailment explanation view and by the proof signature selection UI.

Once the computation of a non-entailment explanation is completed and the result is added to the relevant component in the view, the method ignoresPartsOfOntology of the interface IFilterable is called to determine if the service ignored some of the axioms of the ontology. The interface IFilterable is part of the interface IOWLNonEntailmentExplainer, which in turn is part of INonEntailmentExplanationService. When the explanation service ignored part of the ontology, the view will display a short warning message as a pop-up and additionally on top of the view. The pop-up can be disabled via the preferences.

Note that the view has a vertical divider that separates the Missing Entailment and the Vocabulary components on the left from the Result on the right. The split pane used to creae this divider listens for events of the type DIVIDER_LOCATION_PROPERTY of the java class JSplitPane. When an event is detected, the currently selected explanation service is asked to redraw the currently displayed result via the method repaintResultComponent of the interface INonEntailmentExplanationService. This way, multi-layerd result components can re-create the result in such a way that it perfectly fits on screen without the need for horizontal scroll bars to be used. Currently, this feature is only used by the abduction solver non-entailment services.

Clone this wiki locally