Package adams.data.heatmapfeatures
Class AbstractScriptedFeatureGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.heatmapfeatures.AbstractHeatmapFeatureGenerator
-
- adams.data.heatmapfeatures.AbstractScriptedFeatureGenerator
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.scripting.FileBasedScripting
,adams.core.scripting.FileBasedScriptingWithOptions
,adams.core.ShallowCopySupporter<AbstractHeatmapFeatureGenerator>
,adams.core.SizeOfHandler
,Serializable
,Comparable
- Direct Known Subclasses:
Scripted
public abstract class AbstractScriptedFeatureGenerator extends AbstractHeatmapFeatureGenerator implements adams.core.scripting.FileBasedScriptingWithOptions
Abstract ancestor for flatteners that execute external scripts.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.io.PlaceholderFile
m_ScriptFile
the script.protected Object
m_ScriptObject
the loaded script object.protected String
m_ScriptOptions
the options for the script.-
Fields inherited from class adams.data.heatmapfeatures.AbstractHeatmapFeatureGenerator
m_Converter, m_Fields, m_Notes
-
-
Constructor Summary
Constructors Constructor Description AbstractScriptedFeatureGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
checkData(Heatmap map)
Optional checks of the heatmap.protected abstract String
checkScriptObject()
Checks the script object.void
defineOptions()
Adds options to the internal list of options.void
destroy()
Frees up memory in a "destructive" non-reversible way.adams.core.io.PlaceholderFile
getScriptFile()
Gets the script file.adams.core.base.BaseText
getScriptOptions()
Gets the script options.protected String
initScriptObject()
Tries to initialize the scripts object, sets its options and performs some checks.protected abstract String
loadScriptObject()
Loads the scripts object and sets its options.void
reset()
Resets the conversion.String
scriptFileTipText()
Returns the tip text for this property.String
scriptOptionsTipText()
Returns the tip text for this property.void
setScriptFile(adams.core.io.PlaceholderFile value)
Sets the script file.void
setScriptOptions(adams.core.base.BaseText value)
Sets the script options.-
Methods inherited from class adams.data.heatmapfeatures.AbstractHeatmapFeatureGenerator
cleanUp, compareTo, converterTipText, createHeader, equals, fieldsTipText, generate, generateRows, getConverter, getDatasetFormat, getFields, getNotes, getQuickInfo, getRowFormat, notesTipText, postProcessHeader, postProcessRow, postProcessRows, setConverter, setFields, setNotes, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractHeatmapFeatureGenerator
-
reset
public void reset()
Resets the conversion.- Overrides:
reset
in classAbstractHeatmapFeatureGenerator
-
setScriptFile
public void setScriptFile(adams.core.io.PlaceholderFile value)
Sets the script file.- Specified by:
setScriptFile
in interfaceadams.core.scripting.FileBasedScripting
- Parameters:
value
- the script
-
getScriptFile
public adams.core.io.PlaceholderFile getScriptFile()
Gets the script file.- Specified by:
getScriptFile
in interfaceadams.core.scripting.FileBasedScripting
- Returns:
- the script
-
scriptFileTipText
public String scriptFileTipText()
Returns the tip text for this property.- Specified by:
scriptFileTipText
in interfaceadams.core.scripting.FileBasedScripting
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setScriptOptions
public void setScriptOptions(adams.core.base.BaseText value)
Sets the script options.- Specified by:
setScriptOptions
in interfaceadams.core.scripting.FileBasedScriptingWithOptions
- Parameters:
value
- the options
-
getScriptOptions
public adams.core.base.BaseText getScriptOptions()
Gets the script options.- Specified by:
getScriptOptions
in interfaceadams.core.scripting.FileBasedScriptingWithOptions
- Returns:
- the options
-
scriptOptionsTipText
public String scriptOptionsTipText()
Returns the tip text for this property.- Specified by:
scriptOptionsTipText
in interfaceadams.core.scripting.FileBasedScriptingWithOptions
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
loadScriptObject
protected abstract String loadScriptObject()
Loads the scripts object and sets its options.- Returns:
- null if OK, otherwise the error message
-
checkScriptObject
protected abstract String checkScriptObject()
Checks the script object.- Returns:
- null if OK, otherwise the error message
-
initScriptObject
protected String initScriptObject()
Tries to initialize the scripts object, sets its options and performs some checks.- Returns:
- null if OK, otherwise the error message
-
checkData
protected void checkData(Heatmap map)
Optional checks of the heatmap.- Overrides:
checkData
in classAbstractHeatmapFeatureGenerator
- Parameters:
map
- the Heatmap to check
-
destroy
public void destroy()
Frees up memory in a "destructive" non-reversible way.- Specified by:
destroy
in interfaceadams.core.Destroyable
- Overrides:
destroy
in classAbstractHeatmapFeatureGenerator
-
-