Package weka.knowledgeflow
Class JSONFlowLoader
- java.lang.Object
-
- weka.knowledgeflow.JSONFlowLoader
-
- All Implemented Interfaces:
FlowLoader
public class JSONFlowLoader extends java.lang.Object implements FlowLoader
Flow loader that wraps the routines in JSONFlowUtils- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXTENSIONThe file exetension for JSON-based flows
-
Constructor Summary
Constructors Constructor Description JSONFlowLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFlowFileExtension()Get the file extension handled by this loaderjava.lang.StringgetFlowFileExtensionDescription()Get the description of the file format handled by this loaderFlowreadFlow(java.io.File flowFile)Read the flow from the supplied fileFlowreadFlow(java.io.InputStream is)Read the flow from the supplied input streamFlowreadFlow(java.io.Reader r)Read the flow from the supplied readervoidsetLog(Logger log)Set a log to use
-
-
-
Field Detail
-
EXTENSION
public static final java.lang.String EXTENSION
The file exetension for JSON-based flows- See Also:
- Constant Field Values
-
-
Method Detail
-
setLog
public void setLog(Logger log)
Set a log to use- Specified by:
setLogin interfaceFlowLoader- Parameters:
log- log to use
-
getFlowFileExtension
public java.lang.String getFlowFileExtension()
Get the file extension handled by this loader- Specified by:
getFlowFileExtensionin interfaceFlowLoader- Returns:
- the file extension
-
getFlowFileExtensionDescription
public java.lang.String getFlowFileExtensionDescription()
Get the description of the file format handled by this loader- Specified by:
getFlowFileExtensionDescriptionin interfaceFlowLoader- Returns:
- the description of the file format handled
-
readFlow
public Flow readFlow(java.io.File flowFile) throws WekaException
Read the flow from the supplied file- Specified by:
readFlowin interfaceFlowLoader- Parameters:
flowFile- the file to load from- Returns:
- the Flow read
- Throws:
WekaException- if a problem occurs
-
readFlow
public Flow readFlow(java.io.InputStream is) throws WekaException
Read the flow from the supplied input stream- Specified by:
readFlowin interfaceFlowLoader- Parameters:
is- the input stream to load from- Returns:
- the Flow read
- Throws:
WekaException
-
readFlow
public Flow readFlow(java.io.Reader r) throws WekaException
Read the flow from the supplied reader- Specified by:
readFlowin interfaceFlowLoader- Parameters:
r- the reader to load from- Returns:
- the Flow read
- Throws:
WekaException- if a problem occurs
-
-