Package adams.core.gnuplot
Class MultiScriptlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.gnuplot.AbstractScriptlet
-
- adams.core.gnuplot.AbstractScriptletWithDataFile
-
- adams.core.gnuplot.MultiScriptlet
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.ErrorProvider
,adams.core.GlobalInfoSupporter
,adams.core.io.AbsolutePathSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,Serializable
public class MultiScriptlet extends AbstractScriptletWithDataFile
Allows the user to chain multiple scriplets together.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-data-file <adams.core.io.PlaceholderFile> (property: dataFile) The data file to use as basis for the plot. default: ${CWD}
-use-absolute-path <boolean> (property: useAbsolutePath) If enabled, the absolute path of the data file is used, otherwise just its name. default: true
-scriptlet <adams.core.gnuplot.AbstractScriptlet> [-scriptlet ...] (property: scriptlets) The scriplets to use for producing a single script. default:
-use-single-data-file <boolean> (property: useSingleDataFile) If enabled, all sub-scriptlets get automatically updated to use this scriptlets data file. default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractScriptlet[]
m_Scriptlets
the custom script code.protected boolean
m_UseSingleDataFile
whether to enforce all scriptlets to use the same data file.-
Fields inherited from class adams.core.gnuplot.AbstractScriptletWithDataFile
m_DataFile, m_UseAbsolutePath
-
Fields inherited from class adams.core.gnuplot.AbstractScriptlet
COMMENT, m_LastError, m_Owner
-
-
Constructor Summary
Constructors Constructor Description MultiScriptlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
check()
Hook method for performing checks.void
defineOptions()
Adds options to the internal list of options.protected String
doGenerate()
Generates the actual script code.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.AbstractScriptlet[]
getScriptlets()
Returns the scriptlets in use.boolean
getUseSingleDataFile()
Returns whether to use a single data file only.String
globalInfo()
Returns a string describing the object.String
scriptletsTipText()
Returns the tip text for this property.void
setOwner(adams.flow.core.Actor value)
Sets the owning actor.void
setScriptlets(AbstractScriptlet[] value)
Sets the scriptlets to use.void
setUseSingleDataFile(boolean value)
Sets whether to use a single data file only.String
useSingleDataFileTipText()
Returns the tip text for this property.-
Methods inherited from class adams.core.gnuplot.AbstractScriptletWithDataFile
dataFileTipText, getActualDataFile, getDataFile, getUseAbsolutePath, reset, setDataFile, setUseAbsolutePath, useAbsolutePathTipText
-
Methods inherited from class adams.core.gnuplot.AbstractScriptlet
generate, getLastError, getOwner, hasLastError
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Scriptlets
protected AbstractScriptlet[] m_Scriptlets
the custom script code.
-
m_UseSingleDataFile
protected boolean m_UseSingleDataFile
whether to enforce all scriptlets to use the same data file.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractScriptletWithDataFile
-
setOwner
public void setOwner(adams.flow.core.Actor value)
Sets the owning actor.- Overrides:
setOwner
in classAbstractScriptlet
- Parameters:
value
- the owner
-
setScriptlets
public void setScriptlets(AbstractScriptlet[] value)
Sets the scriptlets to use.- Parameters:
value
- the scriptlets
-
getScriptlets
public AbstractScriptlet[] getScriptlets()
Returns the scriptlets in use.- Returns:
- the scriptlets
-
scriptletsTipText
public String scriptletsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setUseSingleDataFile
public void setUseSingleDataFile(boolean value)
Sets whether to use a single data file only.- Parameters:
value
- if true only a single data file is used
-
getUseSingleDataFile
public boolean getUseSingleDataFile()
Returns whether to use a single data file only.- Returns:
- true if only a single data file is used
-
useSingleDataFileTipText
public String useSingleDataFileTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
check
public String check()
Hook method for performing checks.
Calls the check() methods of all scriptlets.- Overrides:
check
in classAbstractScriptletWithDataFile
- Returns:
- null if all checks passed, otherwise error message
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractScriptlet
- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate()
Generates the actual script code.- Specified by:
doGenerate
in classAbstractScriptlet
- Returns:
- the script code, null in case of an error
-
-