Interface ITask
-
- All Known Implementing Classes:
EntityTask
public interface ITaskInterface for object which stores an individual detector used in a detection job, including the parameter mapping for the specific task.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<? extends IDetector>getDetector()Fetches the detector for this taskIJobgetJob()Get the job this task is a child ofjava.util.Map<java.lang.String,java.lang.Float>getParameterMapping()Gets the mapping of the adjustable parameters for this detector runlonggetPersistentId()Returns the unique id for this taskjava.util.List<AbstractModelTaskRawResult>getRawResults()Returns the raw results object produced by the tasks detectorWorkStatusgetStatus()Returns the status of the taskbooleanhasResults()Does the task have raw results saved?booleanresetParameter(AdjustableParameterObj paramObj)Sets the passed adjustable parameter to its default valuevoidsetComplete()Used to set task complete if no results are foundbooleansetParameter(AdjustableParameterObj paramObj, float value)Sets the passed adjustable parameter to the passed value
Will return false if the AdjustableParameter is invalidvoidsetRawResults(java.util.List<AbstractModelTaskRawResult> rawResults)Sets the raw results to be stored and processed
-
-
-
Method Detail
-
getDetector
java.lang.Class<? extends IDetector> getDetector()
Fetches the detector for this task- Returns:
- detector class
-
getJob
IJob getJob()
Get the job this task is a child of- Returns:
- job instance
-
getParameterMapping
java.util.Map<java.lang.String,java.lang.Float> getParameterMapping()
Gets the mapping of the adjustable parameters for this detector run- Returns:
- mapping of reference string to value
-
getPersistentId
long getPersistentId()
Returns the unique id for this task- Returns:
- id
-
getRawResults
java.util.List<AbstractModelTaskRawResult> getRawResults()
Returns the raw results object produced by the tasks detector- Returns:
- list of the raw results
-
setRawResults
void setRawResults(java.util.List<AbstractModelTaskRawResult> rawResults)
Sets the raw results to be stored and processed- Parameters:
rawResults- raw results list
-
getStatus
WorkStatus getStatus()
Returns the status of the task- Returns:
- the stored status
-
hasResults
boolean hasResults()
Does the task have raw results saved?- Returns:
- has results
-
resetParameter
boolean resetParameter(AdjustableParameterObj paramObj)
Sets the passed adjustable parameter to its default value- Parameters:
paramObj- The parameter object to reset- Returns:
- true if successfully reset
-
setComplete
void setComplete()
Used to set task complete if no results are found
-
setParameter
boolean setParameter(AdjustableParameterObj paramObj, float value)
Sets the passed adjustable parameter to the passed value
Will return false if the AdjustableParameter is invalid- Parameters:
paramObj- The parameter object to setvalue- new value of the object, if it should be an integer then this will be checked- Returns:
- true if successfully set
-
-