Class Cleaner.CleanJob

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, adams.multiprocess.Job, Serializable
    Enclosing class:
    Cleaner

    public static class Cleaner.CleanJob
    extends adams.multiprocess.AbstractJob
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected weka.core.Instances m_Cleaned
      the cleaned data.
      protected AbstractCleaner m_Cleaner
      the cleaner to apply.
      protected weka.core.Instances m_Data
      the data to clean.
      • Fields inherited from class adams.multiprocess.AbstractJob

        m_Complete, m_ExecutionError, m_JobCompleteListener, m_JobInfo, m_ProgressInfo, m_Stopped
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      CleanJob​(AbstractCleaner cleaner, weka.core.Instances data)
      Initializes the job.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanUp()
      Cleans up data structures, frees up memory.
      weka.core.Instances getCleaned()
      Returns the cleaned data.
      protected String postProcessCheck()
      Checks whether all post-conditions have been met.
      protected String preProcessCheck()
      Checks whether all pre-conditions have been met.
      protected void process()
      Does the actual execution of the job.
      void stopExecution()
      Stops the execution.
      String toString()
      Returns a string representation of this job.
      • Methods inherited from class adams.multiprocess.AbstractJob

        execute, getAdditionalErrorInformation, getExecutionError, getJobCompleteListener, getJobInfo, getProgressInfo, hasExecutionError, isComplete, isStopped, jobCompleted, setJobCompleteListener, setJobInfo, setProgressInfo
      • Methods inherited from class adams.core.logging.CustomLoggingLevelObject

        setLoggingLevel
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
      • Methods inherited from interface adams.core.logging.LoggingSupporter

        getLogger, isLoggingEnabled
    • Field Detail

      • m_Data

        protected weka.core.Instances m_Data
        the data to clean.
      • m_Cleaned

        protected weka.core.Instances m_Cleaned
        the cleaned data.
    • Constructor Detail

      • CleanJob

        public CleanJob​(AbstractCleaner cleaner,
                        weka.core.Instances data)
        Initializes the job.
        Parameters:
        cleaner - the cleaner to apply
        data - the data to clean
    • Method Detail

      • getCleaned

        public weka.core.Instances getCleaned()
        Returns the cleaned data.
        Returns:
        the cleaned data, null if not available
      • preProcessCheck

        protected String preProcessCheck()
        Checks whether all pre-conditions have been met.
        Specified by:
        preProcessCheck in class adams.multiprocess.AbstractJob
        Returns:
        null if everything is OK, otherwise an error message
      • process

        protected void process()
                        throws Exception
        Does the actual execution of the job.
        Specified by:
        process in class adams.multiprocess.AbstractJob
        Throws:
        Exception - if fails to execute job
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface adams.core.Stoppable
        Overrides:
        stopExecution in class adams.multiprocess.AbstractJob
      • postProcessCheck

        protected String postProcessCheck()
        Checks whether all post-conditions have been met.
        Specified by:
        postProcessCheck in class adams.multiprocess.AbstractJob
        Returns:
        null if everything is OK, otherwise an error message
      • toString

        public String toString()
        Returns a string representation of this job.
        Specified by:
        toString in class adams.multiprocess.AbstractJob
        Returns:
        the job as string
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory. Removes dependencies and job parameters.
        Specified by:
        cleanUp in interface adams.core.CleanUpHandler
        Specified by:
        cleanUp in interface adams.multiprocess.Job
        Overrides:
        cleanUp in class adams.multiprocess.AbstractJob