Class MultiScriptlet

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.ErrorProvider, adams.core.GlobalInfoSupporter,, 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 <> (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 
        default: true
    -scriptlet <adams.core.gnuplot.AbstractScriptlet> [-scriptlet ...] (property: scriptlets)
        The scriplets to use for producing a single script.
    -use-single-data-file <boolean> (property: useSingleDataFile)
        If enabled, all sub-scriptlets get automatically updated to use this scriptlets 
        data file.
        default: false
    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
        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
        defineOptions in class AbstractScriptletWithDataFile
      • setOwner

        public void setOwner​(adams.flow.core.Actor value)
        Sets the owning actor.
        setOwner in class AbstractScriptlet
        value - the owner
      • setScriptlets

        public void setScriptlets​(AbstractScriptlet[] value)
        Sets the scriptlets to use.
        value - the scriptlets
      • getScriptlets

        public AbstractScriptlet[] getScriptlets()
        Returns the scriptlets in use.
        the scriptlets
      • scriptletsTipText

        public String scriptletsTipText()
        Returns the tip text for this property.
        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.
        value - if true only a single data file is used
      • getUseSingleDataFile

        public boolean getUseSingleDataFile()
        Returns whether to use a single data file only.
        true if only a single data file is used
      • useSingleDataFileTipText

        public String useSingleDataFileTipText()
        Returns the tip text for this property.
        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.
        check in class AbstractScriptletWithDataFile
        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
        getQuickInfo in class AbstractScriptlet
        null if no info available, otherwise short string
      • doGenerate

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