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

      • m_UseSingleDataFile

        protected boolean m_UseSingleDataFile
        whether to enforce all scriptlets to use the same data file.
    • Constructor Detail

      • MultiScriptlet

        public MultiScriptlet()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.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 interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractScriptletWithDataFile
      • setOwner

        public void setOwner​(adams.flow.core.Actor value)
        Sets the owning actor.
        Overrides:
        setOwner in class AbstractScriptlet
        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 class AbstractScriptletWithDataFile
        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 interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractScriptlet
        Returns:
        null if no info available, otherwise short string
      • doGenerate

        protected String doGenerate()
        Generates the actual script code.
        Specified by:
        doGenerate in class AbstractScriptlet
        Returns:
        the script code, null in case of an error