Class AbstractCallablePipeline<T>

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.flow.core.CallableActorUser, adams.flow.core.FlowContextHandler, RESTPlugin, Serializable
    Direct Known Subclasses:
    CallableJsonPipeline, CallableTextPipeline

    public abstract class AbstractCallablePipeline<T>
    extends AbstractRESTPluginWithFlowContext
    implements adams.flow.core.CallableActorUser
    Ancestor for pipeline that process data with a callable pipeline template.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Pipeline

        protected adams.flow.core.CallableActorReference m_Pipeline
        the callable transformer to use as processing pipeline.
      • m_PipelineActor

        protected transient adams.flow.core.Actor m_PipelineActor
        the actual actor.
      • m_PipelineActorInitialized

        protected boolean m_PipelineActorInitialized
        whether the pipeline actor has been set up.
      • m_ScopeHandlingVariables

        protected adams.flow.control.ScopeHandler.ScopeHandling m_ScopeHandlingVariables
        how to handle the variables.
      • m_ScopeHandlingStorage

        protected adams.flow.control.ScopeHandler.ScopeHandling m_ScopeHandlingStorage
        how to handle the storage.
      • m_Helper

        protected adams.flow.core.CallableActorHelper m_Helper
        the helper class.
    • Constructor Detail

      • AbstractCallablePipeline

        public AbstractCallablePipeline()
    • Method Detail

      • globalInfoBase

        protected String globalInfoBase()
        Returns a string describing the object.
        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 adams.core.option.AbstractOptionHandler
      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.core.option.AbstractOptionHandler
      • reset

        protected void reset()
        Resets the scheme.
        Overrides:
        reset in class adams.core.option.AbstractOptionHandler
      • setPipeline

        public void setPipeline​(adams.flow.core.CallableActorReference value)
        Sets the name of the callable actor to use as pipeline.
        Parameters:
        value - the callable name
      • getPipeline

        public adams.flow.core.CallableActorReference getPipeline()
        Returns the name of the callable actor to use as pipeline.
        Returns:
        the callable name
      • pipelineTipText

        public String pipelineTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setScopeHandlingVariables

        public void setScopeHandlingVariables​(adams.flow.control.ScopeHandler.ScopeHandling value)
        Sets how to handle variables into the local scope.
        Parameters:
        value - the scope handling
      • getScopeHandlingVariables

        public adams.flow.control.ScopeHandler.ScopeHandling getScopeHandlingVariables()
        Returns how variables are handled in the local scope.
        Returns:
        the scope handling
      • scopeHandlingVariablesTipText

        public String scopeHandlingVariablesTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setScopeHandlingStorage

        public void setScopeHandlingStorage​(adams.flow.control.ScopeHandler.ScopeHandling value)
        Sets how to handle storage in the local scope.
        Parameters:
        value - the scope handling
      • getScopeHandlingStorage

        public adams.flow.control.ScopeHandler.ScopeHandling getScopeHandlingStorage()
        Returns how storage is handled in the local scope.
        Returns:
        the scope handling
      • scopeHandlingStorageTipText

        public String scopeHandlingStorageTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getCallableActor

        public adams.flow.core.Actor getCallableActor()
        Returns the currently set callable actor.
        Specified by:
        getCallableActor in interface adams.flow.core.CallableActorUser
        Returns:
        the actor, can be null
      • checkCompatibility

        protected String checkCompatibility()
        Hook method to add compatibility checks.
        Default implementation does nothing.
        Returns:
        null if compatible, otherwise error message
      • initPipeline

        protected String initPipeline()
        Initializes the pipeline.
        Returns:
        null if successfully initialized
      • doProcess

        protected Object doProcess​(Object input,
                                   adams.core.MessageCollection errors)
        Processes the incoming data.
        Parameters:
        input - the input data
        errors - for collecting errors
        Returns:
        the generated output, null if none generated