Class ScriptedConfigurationGenerator

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.scripting.FileBasedScripting, adams.core.scripting.FileBasedScriptingWithOptions, adams.core.SizeOfHandler, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, Serializable

    public class ScriptedConfigurationGenerator
    extends AbstractScriptedJOOQConfigurationGenerator
    A configuration generator that uses any scripting handler for generating the configuration with a script located in the specified file.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -output <adams.core.io.PlaceholderFile> (property: output)
        The file to store the XML configuration in.
        default: ${CWD}
     
    -provider <adams.data.jooq.AbstractJOOQCodeGeneratorProvider> (property: provider)
        The provider for the jOOQ code generator to use.
        default: adams.data.jooq.JavaCodeGeneratorProvider
     
    -script <adams.core.io.PlaceholderFile> (property: scriptFile)
        The script file to load and execute.
        default: ${CWD}
     
    -options <java.lang.String> (property: scriptOptions)
        The options for the script; must consist of 'key=value' pairs separated 
        by blanks; the value of 'key' can be accessed via the 'getAdditionalOptions
        ().getXYZ("key")' method in the script actor.
        default: 
     
    -handler <adams.core.scripting.AbstractScriptingHandler> (property: handler)
        The handler to use for scripting.
        default: adams.core.scripting.Dummy
     
    Version:
    $Revision: 8704 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Handler

        protected adams.core.scripting.AbstractScriptingHandler m_Handler
        the scripting handler to use.
    • Constructor Detail

      • ScriptedConfigurationGenerator

        public ScriptedConfigurationGenerator()
    • 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
      • scriptOptionsTipText

        public String scriptOptionsTipText()
        Returns the tip text for this property.
        Specified by:
        scriptOptionsTipText in interface adams.core.scripting.FileBasedScriptingWithOptions
        Overrides:
        scriptOptionsTipText in class AbstractScriptedJOOQConfigurationGenerator
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • setHandler

        public void setHandler​(adams.core.scripting.AbstractScriptingHandler value)
        Sets the handler to use for scripting.
        Parameters:
        value - the handler
      • getHandler

        public adams.core.scripting.AbstractScriptingHandler getHandler()
        Gets the handler to use for scripting.
        Returns:
        the handler
      • handlerTipText

        public String handlerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • generate

        public adams.core.io.PlaceholderFile generate()
        Generates the XML configuration.
        Overrides:
        generate in class AbstractJOOQConfigurationGenerator
        Returns:
        the generated XML file or null in case of an error