Package adams.data.outlier
Class AbstractOutlierDetector.DetectorJob<T extends DataContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.multiprocess.AbstractJob
-
- adams.data.outlier.AbstractOutlierDetector.DetectorJob<T>
-
- All Implemented Interfaces:
CleanUpHandler
,LoggingLevelHandler
,LoggingSupporter
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,Job
,Serializable
- Enclosing class:
- AbstractOutlierDetector<T extends DataContainer>
public static class AbstractOutlierDetector.DetectorJob<T extends DataContainer> extends AbstractJob
A job class specific to outlier detectors.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected T
m_Data
the data to push through the detector.protected AbstractOutlierDetector
m_Detector
the detector to use.protected List<String>
m_Result
the result.-
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 DetectorJob(AbstractOutlierDetector detector, T 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.protected String
getAdditionalErrorInformation()
Returns additional information to be added to the error message.T
getData()
The input data.AbstractOutlierDetector
getOutlierDetector()
Returns the detector being used.List<String>
getResult()
The result, if any.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.String
toString()
Returns a string representation of the job.-
Methods inherited from class adams.multiprocess.AbstractJob
execute, getExecutionError, getJobCompleteListener, getJobInfo, getProgressInfo, hasExecutionError, isComplete, isStopped, jobCompleted, setJobCompleteListener, setJobInfo, setProgressInfo, stopExecution
-
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
-
-
-
Field Detail
-
m_Detector
protected AbstractOutlierDetector m_Detector
the detector to use.
-
m_Data
protected T extends DataContainer m_Data
the data to push through the detector.
-
-
Constructor Detail
-
DetectorJob
public DetectorJob(AbstractOutlierDetector detector, T data)
Initializes the job.- Parameters:
detector
- the detector to usedata
- the data to pass through the detector
-
-
Method Detail
-
getOutlierDetector
public AbstractOutlierDetector getOutlierDetector()
Returns the detector being used.- Returns:
- the detector in use
-
getData
public T getData()
The input data.- Returns:
- the input data
-
getResult
public List<String> getResult()
The result, if any.- Returns:
- the result, or null if no outlier
-
preProcessCheck
protected String preProcessCheck()
Checks whether all pre-conditions have been met.- Specified by:
preProcessCheck
in classAbstractJob
- 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 classAbstractJob
- Throws:
Exception
- if fails to execute job
-
postProcessCheck
protected String postProcessCheck()
Checks whether all post-conditions have been met.- Specified by:
postProcessCheck
in classAbstractJob
- Returns:
- null if everything is OK, otherwise an error message
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory. Sets the input data to null.- Specified by:
cleanUp
in interfaceCleanUpHandler
- Specified by:
cleanUp
in interfaceJob
- Overrides:
cleanUp
in classAbstractJob
-
getAdditionalErrorInformation
protected String getAdditionalErrorInformation()
Returns additional information to be added to the error message.- Overrides:
getAdditionalErrorInformation
in classAbstractJob
- Returns:
- the additional information
-
toString
public String toString()
Returns a string representation of the job.- Specified by:
toString
in classAbstractJob
- Returns:
- a string representation
-
-