Class 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 Detail

      • m_DataFile

        protected adams.core.io.PlaceholderFile m_DataFile
        the data file to use.
      • m_UseAbsolutePath

        protected boolean m_UseAbsolutePath
        whether to use absolute path for data file.
    • Constructor Detail

      • AbstractScriptletWithDataFile

        public AbstractScriptletWithDataFile()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • 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:
        setUseAbsolutePath in interface adams.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:
        getUseAbsolutePath in interface adams.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:
        check in class AbstractScriptlet
        Returns:
        null if all checks passed, otherwise error message