Package adams.flow.rest.flow
Class AbstractCallableTransformer<T>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.rest.AbstractRESTPlugin
-
- adams.flow.rest.AbstractRESTPluginWithFlowContext
-
- adams.flow.rest.flow.AbstractCallableTransformer<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:
CallableJsonTransformer
,CallableTextTransformer
public abstract class AbstractCallableTransformer<T> extends AbstractRESTPluginWithFlowContext implements adams.flow.core.CallableActorUser
Ancestor for plugins that process the data with a callable transformer.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.flow.core.CallableActorHelper
m_Helper
the helper class.protected adams.flow.core.CallableActorReference
m_Transformer
the callable transformer to use for processing.protected adams.flow.core.Actor
m_TransformerActor
the actual actor.protected boolean
m_TransformerActorInitialized
whether the transformer actor has been set up.-
Fields inherited from class adams.flow.rest.AbstractRESTPluginWithFlowContext
m_FlowContext
-
-
Constructor Summary
Constructors Constructor Description AbstractCallableTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
checkCompatibility()
Hook method to add compatibility checks.void
defineOptions()
Adds options to the internal list of options.protected Object
doProcess(Object input, adams.core.MessageCollection errors)
Processes the incoming data.adams.flow.core.Actor
getCallableActor()
Returns the currently set callable actor.adams.flow.core.CallableActorReference
getTransformer()
Returns the name of the callable actor to use as transformer.protected String
globalInfoBase()
Returns a string describing the object.protected void
initialize()
Initializes the members.protected String
initTransformer()
Initializes the transformer.protected void
reset()
Resets the scheme.void
setTransformer(adams.flow.core.CallableActorReference value)
Sets the name of the callable actor to use as transformer.String
transformerTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.rest.AbstractRESTPluginWithFlowContext
getFlowContext, setFlowContext
-
Methods inherited from class adams.flow.rest.AbstractRESTPlugin
getAdditionalInformation
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Transformer
protected adams.flow.core.CallableActorReference m_Transformer
the callable transformer to use for processing.
-
m_TransformerActor
protected transient adams.flow.core.Actor m_TransformerActor
the actual actor.
-
m_TransformerActorInitialized
protected boolean m_TransformerActorInitialized
whether the transformer actor has been set up.
-
m_Helper
protected adams.flow.core.CallableActorHelper m_Helper
the helper class.
-
-
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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.core.option.AbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classadams.core.option.AbstractOptionHandler
-
setTransformer
public void setTransformer(adams.flow.core.CallableActorReference value)
Sets the name of the callable actor to use as transformer.- Parameters:
value
- the callable name
-
getTransformer
public adams.flow.core.CallableActorReference getTransformer()
Returns the name of the callable actor to use as transformer.- Returns:
- the callable name
-
transformerTipText
public String transformerTipText()
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 interfaceadams.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
-
initTransformer
protected String initTransformer()
Initializes the transformer.- Returns:
- null if successfully initialized
-
-