Class AbstractIndexedSplitsRunsGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.indexedsplitsrunsgenerator.AbstractIndexedSplitsRunsGenerator
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,FlowContextHandler
,IndexedSplitsRunsGenerator
,Serializable
- Direct Known Subclasses:
AbstractInstancesIndexedSplitsRunsGenerator
,AbstractSpreadSheetIndexedSplitsRunsGenerator
,ManualSplitGenerator
,MultiRunGenerator
public abstract class AbstractIndexedSplitsRunsGenerator extends AbstractOptionHandler implements IndexedSplitsRunsGenerator
Ancestor for schemes that generate indexed splits runs.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actor
m_FlowContext
the flow context.protected BaseKeyValuePair[]
m_MetaData
the meta-data to add.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexedSplitsRunsGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Class[]
accepts()
Returns the type of classes that are accepted as input.protected String
check(Object data)
Checks whether the data can be processed.void
defineOptions()
Adds options to the internal list of options.protected abstract IndexedSplitsRuns
doGenerate(Object data, MessageCollection errors)
Generates the indexed splits.IndexedSplitsRuns
generate(Object data, MessageCollection errors)
Generates the indexed splits.Actor
getFlowContext()
Returns the flow context, if any.BaseKeyValuePair[]
getMetaData()
Returns the meta-data to attach.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.String
metaDataTipText()
Returns the tip text for this property.protected IndexedSplitsRuns
postGenerate(Object data, IndexedSplitsRuns runs, MessageCollection errors)
For post-processing successfully generated splits.void
setFlowContext(Actor value)
Sets the flow context.void
setMetaData(BaseKeyValuePair[] value)
Sets the meta-data to attach.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_MetaData
protected BaseKeyValuePair[] m_MetaData
the meta-data to add.
-
m_FlowContext
protected Actor m_FlowContext
the flow context.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setMetaData
public void setMetaData(BaseKeyValuePair[] value)
Sets the meta-data to attach. Variables in 'value' parts get automatically expanded.- Parameters:
value
- the meta-data
-
getMetaData
public BaseKeyValuePair[] getMetaData()
Returns the meta-data to attach. Variables in 'value' parts get automatically expanded.- Returns:
- the meta-data
-
metaDataTipText
public String metaDataTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFlowContext
public void setFlowContext(Actor value)
Sets the flow context.- Specified by:
setFlowContext
in interfaceFlowContextHandler
- Parameters:
value
- the actor
-
getFlowContext
public Actor getFlowContext()
Returns the flow context, if any.- Specified by:
getFlowContext
in interfaceFlowContextHandler
- Returns:
- the actor, null if none available
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
accepts
public abstract Class[] accepts()
Returns the type of classes that are accepted as input.- Specified by:
accepts
in interfaceIndexedSplitsRunsGenerator
- Returns:
- the classes
-
check
protected String check(Object data)
Checks whether the data can be processed.- Parameters:
data
- the data to check- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected abstract IndexedSplitsRuns doGenerate(Object data, MessageCollection errors)
Generates the indexed splits.- Parameters:
data
- the data to use for generating the splitserrors
- for storing any errors occurring during processing- Returns:
- the splits or null in case of error
-
postGenerate
protected IndexedSplitsRuns postGenerate(Object data, IndexedSplitsRuns runs, MessageCollection errors)
For post-processing successfully generated splits.- Parameters:
data
- the input dataruns
- the generated runserrors
- for storing errors- Returns:
- the runs, null if failed to post-process
-
generate
public IndexedSplitsRuns generate(Object data, MessageCollection errors)
Generates the indexed splits.- Specified by:
generate
in interfaceIndexedSplitsRunsGenerator
- Parameters:
data
- the data to use for generating the splitserrors
- for storing any errors occurring during processing- Returns:
- the splits or null in case of error
-
-