Package weka.knowledgeflow

# Class LegacyFlowLoader

java.lang.Object
weka.knowledgeflow.LegacyFlowLoader

All Implemented Interfaces:
  `FlowLoader`

public class LegacyFlowLoader extends Object implements FlowLoader
Flow loader that reads legacy .kfml files and translates them to the new implementation.

Version:
  $Revision: $
Author:
  Mark Hall (mhall{[at]}pentaho{[dot]}com)

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `EXTENSION`
  File extension for the format handled by this flow loader

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LegacyFlowLoader()`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getFlowFileExtension()`
  Get the flow file extension of the file format handled by this flow loader
  `String`
  `getFlowFileExtensionDescription()`
  Get the description of the file format handled by this flow loader
  `Flow`
  `readFlow(File flowFile)`
  Deserialize a legacy flow from the supplied file
  `Flow`
  `readFlow(InputStream is)`
  Deserialize a legacy flow from the supplied input stream
  `Flow`
  `readFlow(Reader r)`
  Deserialize a legacy flow from the supplied reader
  `void`
  `setLog(Logger log)`
  Set the log to use

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### EXTENSION

    public static final String EXTENSION
    File extension for the format handled by this flow loader
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### LegacyFlowLoader

    public LegacyFlowLoader()
    Constructor

- ## Method Details

  - ### setLog

    public void setLog(Logger log)
    Set the log to use
    Specified by:
      `setLog` in interface `FlowLoader`
    Parameters:
      `log` - log to use

  - ### getFlowFileExtension

    public String getFlowFileExtension()
    Get the flow file extension of the file format handled by this flow loader
    Specified by:
      `getFlowFileExtension` in interface `FlowLoader`
    Returns:
      the file extension

  - ### getFlowFileExtensionDescription

    public String getFlowFileExtensionDescription()
    Get the description of the file format handled by this flow loader
    Specified by:
      `getFlowFileExtensionDescription` in interface `FlowLoader`
    Returns:
      the description of the file format

  - ### readFlow

    public Flow readFlow(File flowFile) throws WekaException
    Deserialize a legacy flow from the supplied file
    Specified by:
      `readFlow` in interface `FlowLoader`
    Parameters:
      `flowFile` - the file to load from
    Returns:
      the legacy flow translated to a new `Flow` object
    Throws:
      `WekaException` - if a problem occurs

  - ### readFlow

    public Flow readFlow(InputStream is) throws WekaException
    Deserialize a legacy flow from the supplied input stream
    Specified by:
      `readFlow` in interface `FlowLoader`
    Parameters:
      `is` - the input stream to load from
    Returns:
      the legacy flow translated to a new `Flow` object
    Throws:
      `WekaException` - if a problem occurs

  - ### readFlow

    public Flow readFlow(Reader r) throws WekaException
    Deserialize a legacy flow from the supplied reader
    Specified by:
      `readFlow` in interface `FlowLoader`
    Parameters:
      `r` - the reader to load from
    Returns:
      the legacy flow translated to a new `Flow` object
    Throws:
      `WekaException` - if a problem occurs