Class ReasoningProcess

  • All Implemented Interfaces:
    java.lang.Runnable

    public class ReasoningProcess
    extends java.lang.Object
    implements java.lang.Runnable
    Delegate for starting a reasoning. This class can be run as a thread or be used inside a thread, e.g. as an Eclipse WorkspaceJob.
    Author:
    El-Sharkawy
    • Constructor Detail

      • ReasoningProcess

        public ReasoningProcess​(ReasoningOperation desiredOperation,
                                Configuration config,
                                ReasonerConfiguration reasonerConfig,
                                IReasonerListener listener,
                                ProgressObserver observer)
        Sole constructor for this class.
        Parameters:
        desiredOperation - Specifies which reasoning operation should be performed.
        config - The configuration, which should be used for reasoning.
        reasonerConfig - the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)
        listener - A listener which will be called after the reasoning has been finished. Can be null, if no action shall be executed after the reasoning is finished.
        observer - a progress observer indicating the progress, use ProgressObserver.NO_OBSERVER if no progress shall be indicated
      • ReasoningProcess

        public ReasoningProcess​(Project project,
                                ReasonerConfiguration reasonerConfig,
                                IReasonerListener listener,
                                ProgressObserver observer)
        Constructor for checking the consistency (satisfiability) of a project, without having a configuration.
        Parameters:
        project - The origin project which should be used for reasoning
        reasonerConfig - the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)
        listener - A listener which will be called after the reasoning has been finished. Can be null, if no action shall be executed after the reasoning is finished.
        observer - a progress observer indicating the progress, use ProgressObserver.NO_OBSERVER if no progress shall be indicated
    • Method Detail

      • run

        public void run()
        Executes the reasoning.
        Specified by:
        run in interface java.lang.Runnable
      • logResult

        private void logResult()
        Performs the result logging as it was previously integrated into the reasoner but removed for performance reasons.
      • getReasoningResult

        public ReasoningResult getReasoningResult()
        Returns the result of the reasoning, i.e. the result of the run() method. This method should be used, if no ReasoningResult was used.
        Returns:
        The result of the reasoning.
      • setErrorResult

        private void setErrorResult​(java.lang.String errorMsg)
        Sets a ReasoningResult denoting that an error occurred during reasoning.
        Parameters:
        errorMsg - A description what kind of error occurred.