Package adams.core.gnuplot
Class AbstractScriptletWithDataFile
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.gnuplot.AbstractScriptlet
-
- adams.core.gnuplot.AbstractScriptletWithDataFile
-
- 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
- Direct Known Subclasses:
AbstractPlotScriptlet,MultiScriptlet
public abstract class AbstractScriptletWithDataFile extends AbstractScriptlet implements adams.core.io.AbsolutePathSupporter
Ancestor for scriplets that generate Gnuplot scripts (or parts of it). Specifies the data file.- 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.PlaceholderFilem_DataFilethe data file to use.protected booleanm_UseAbsolutePathwhether to use absolute path for data file.-
Fields inherited from class adams.core.gnuplot.AbstractScriptlet
COMMENT, m_LastError, m_Owner
-
-
Constructor Summary
Constructors Constructor Description AbstractScriptletWithDataFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcheck()Hook method for performing checks.StringdataFileTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringgetActualDataFile()Returns the actual data file to use in the scripts.adams.core.io.PlaceholderFilegetDataFile()Returns the data file in use.booleangetUseAbsolutePath()Returns whether to use the data file's absolute path.protected voidreset()Resets the scriptlet.voidsetDataFile(adams.core.io.PlaceholderFile value)Sets the data file to use.voidsetUseAbsolutePath(boolean value)Sets whether to use the data file's absolute path.StringuseAbsolutePathTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.gnuplot.AbstractScriptlet
doGenerate, generate, getLastError, getOwner, getQuickInfo, hasLastError, setOwner
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, 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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
reset
protected void reset()
Resets the scriptlet.- Overrides:
resetin classAbstractScriptlet
-
setDataFile
public void setDataFile(adams.core.io.PlaceholderFile value)
Sets the data file to use.- Parameters:
value- the data file
-
getDataFile
public adams.core.io.PlaceholderFile getDataFile()
Returns the data file in use.- Returns:
- the data file
-
dataFileTipText
public String dataFileTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setUseAbsolutePath
public void setUseAbsolutePath(boolean value)
Sets whether to use the data file's absolute path.- Specified by:
setUseAbsolutePathin interfaceadams.core.io.AbsolutePathSupporter- Parameters:
value- true if to use absolute path
-
getUseAbsolutePath
public boolean getUseAbsolutePath()
Returns whether to use the data file's absolute path.- Specified by:
getUseAbsolutePathin interfaceadams.core.io.AbsolutePathSupporter- Returns:
- true if to use absolute path
-
useAbsolutePathTipText
public String useAbsolutePathTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getActualDataFile
public String getActualDataFile()
Returns the actual data file to use in the scripts.- Returns:
- the actual filename
-
check
public String check()
Hook method for performing checks.
Default implementation only checks whether the data file is available.- Overrides:
checkin classAbstractScriptlet- Returns:
- null if all checks passed, otherwise error message
-
-