public class LegacyFlowLoader extends java.lang.Object implements FlowLoader
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTENSION
File extension for the format handled by this flow loader
|
protected java.util.Vector<java.lang.Object> |
m_beans
Legacy beans loaded
|
protected java.util.Vector<BeanConnection> |
m_connections
Legacy bean connections loaded
|
protected LogManager |
m_log
Log to use
|
protected static java.lang.String |
STEP_LIST_PROPS
Path to the steps.props file
|
| Constructor and Description |
|---|
LegacyFlowLoader()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configurePluginStep(java.lang.Object legacy,
Step current)
Handles configuration of settings in the case of plugin steps
|
protected void |
copySettingsNonWrapper(java.lang.Object legacy,
Step current)
Copy the settings from a legacy non-algorithm wrapper bean to the new step
equivalent
|
protected void |
copySettingsWrapper(WekaWrapper legacy,
WekaAlgorithmWrapper current)
Copy settings from a legacy
WekaWrapper bean to the new
WekaAlgorithmWrapper equivalent |
protected Step |
findStepMatch(java.lang.String legacyFullyQualified)
Attempts to find a matching
Step implementation for a supplied
legacy class name |
java.lang.String |
getFlowFileExtension()
Get the flow file extension of the file format handled by this flow loader
|
java.lang.String |
getFlowFileExtensionDescription()
Get the description of the file format handled by this flow loader
|
protected void |
handleConnection(Flow flow,
BeanConnection conn)
Handles a legacy
|
protected StepManagerImpl |
handleStep(BeanInstance bean)
Handles a legacy step component
|
protected void |
loadLegacy(java.io.Reader r)
Load the legacy flow using the supplied reader
|
protected Flow |
makeFlow(java.lang.String name)
Makes a new
Flow by translating the legacy beans and connections to
the new Step implementations |
Flow |
readFlow(java.io.File flowFile)
Deserialize a legacy flow from the supplied file
|
Flow |
readFlow(java.io.InputStream is)
Deserialize a legacy flow from the supplied input stream
|
Flow |
readFlow(java.io.Reader r)
Deserialize a legacy flow from the supplied reader
|
void |
setLog(Logger log)
Set the log to use
|
protected void |
transferSetting(java.lang.Object legacy,
Step current,
java.lang.String propName,
java.lang.Class propType)
Transfer a single setting
|
public static final java.lang.String EXTENSION
protected static final java.lang.String STEP_LIST_PROPS
protected java.util.Vector<java.lang.Object> m_beans
protected java.util.Vector<BeanConnection> m_connections
protected LogManager m_log
public void setLog(Logger log)
setLog in interface FlowLoaderlog - log to usepublic java.lang.String getFlowFileExtension()
getFlowFileExtension in interface FlowLoaderpublic java.lang.String getFlowFileExtensionDescription()
getFlowFileExtensionDescription in interface FlowLoaderpublic Flow readFlow(java.io.File flowFile) throws WekaException
readFlow in interface FlowLoaderflowFile - the file to load fromFlow objectWekaException - if a problem occurspublic Flow readFlow(java.io.InputStream is) throws WekaException
readFlow in interface FlowLoaderis - the input stream to load fromFlow objectWekaException - if a problem occurspublic Flow readFlow(java.io.Reader r) throws WekaException
readFlow in interface FlowLoaderr - the reader to load fromFlow objectWekaException - if a problem occursprotected Flow makeFlow(java.lang.String name) throws WekaException
Flow by translating the legacy beans and connections to
the new Step implementationsname - the name to use for the flowFlow objectWekaException - if a problem occursprotected void handleConnection(Flow flow, BeanConnection conn)
flow - the new Flow to add the translated connection toconn - the legacy bean connection to processprotected StepManagerImpl handleStep(BeanInstance bean) throws WekaException
bean - the bean instance to processStepManagerImpl that is the equivalent of the
legacy beanWekaException - if a problem occursprotected void copySettingsWrapper(WekaWrapper legacy, WekaAlgorithmWrapper current) throws WekaException
WekaWrapper bean to the new
WekaAlgorithmWrapper equivalentlegacy - the legacy wrappercurrent - the new step equivalentWekaException - if a problem occursprotected void copySettingsNonWrapper(java.lang.Object legacy,
Step current)
throws WekaException
legacy - the legacy bean to copy settings fromcurrent - the new Step to copy toWekaException - if a problem occursprotected void transferSetting(java.lang.Object legacy,
Step current,
java.lang.String propName,
java.lang.Class propType)
throws WekaException
legacy - the legacy bean to transfer fromcurrent - the new step to transfer topropName - the property name of the settingpropType - the type of the settingWekaException - if a problem occursprotected void configurePluginStep(java.lang.Object legacy,
Step current)
throws WekaException
legacy - the legacy bean to copy settings fromcurrent - the plugin step to copy toWekaException - if a problem occursprotected Step findStepMatch(java.lang.String legacyFullyQualified) throws WekaException
Step implementation for a supplied
legacy class namelegacyFullyQualified - the fully qualified class name of the legacy
bean to find a match forStep that is equivalent to the legacy oneWekaException - if a match can't be foundprotected void loadLegacy(java.io.Reader r)
throws WekaException
r - the reader to load fromWekaException - if a problem occurs