|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.transformer.AbstractTransformer
adams.flow.transformer.WekaFileReader
public class WekaFileReader
Reads any file format that Weka's converters can handle and returns the full dataset or single weka.core.Instance objects. This actor takes the file or URL to read as input. In case of URLs, the associated loader must implement weka.core.converters.URLSourcedLoader.
Input/output:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: WekaFileReader
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-use-custom (property: useCustomLoader) If set to true, then the custom loader will be used for loading the data.
-loader <weka.core.converters.AbstractFileLoader> (property: customLoader) The custom loader to use if enabled. default: weka.core.converters.ArffLoader
-output-type <DATASET|HEADER|INCREMENTAL> (property: outputType) Defines how the data is output, e.g., as complete dataset or row-by-row. default: DATASET
| Nested Class Summary | |
|---|---|
static class |
WekaFileReader.OutputType
Defines how to output the data. |
| Field Summary | |
|---|---|
static String |
BACKUP_SOURCE
the key for storing the current source in the backup. |
static String |
BACKUP_STRUCTURE
the key for storing the current structure in the backup. |
protected weka.core.converters.AbstractFileLoader |
m_CustomLoader
the custom loader. |
protected WekaFileReader.OutputType |
m_OutputType
how to output the data. |
protected weka.core.converters.ConverterUtils.DataSource |
m_Source
the actual loader for loading the data. |
protected weka.core.Instances |
m_Structure
the structure. |
protected boolean |
m_UseCustomLoader
whether to use a custom converter. |
| Fields inherited from class adams.flow.transformer.AbstractTransformer |
|---|
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaFileReader()
|
|
| Method Summary | |
|---|---|
Class[] |
accepts()
Returns the class that the consumer accepts. |
protected Hashtable<String,Object> |
backupState()
Backs up the current state of the actor before update the variables. |
String |
customLoaderTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Executes the flow item. |
Class[] |
generates()
Returns the class of objects that it generates. |
weka.core.converters.AbstractFileLoader |
getCustomLoader()
Returns the custom loader in use. |
WekaFileReader.OutputType |
getOutputType()
Returns how to output the data. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
boolean |
getUseCustomLoader()
Returns whether a custom loader is used or not. |
String |
globalInfo()
Returns a string describing the object. |
boolean |
hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item. |
Token |
output()
Returns the generated token. |
String |
outputTypeTipText()
Returns the tip text for this property. |
protected void |
pruneBackup()
Removes entries from the backup. |
protected void |
reset()
Resets the scheme. |
protected void |
restoreState(Hashtable<String,Object> state)
Restores the state of the actor before the variables got updated. |
void |
setCustomLoader(weka.core.converters.AbstractFileLoader value)
Sets the custom loader to use. |
void |
setOutputType(WekaFileReader.OutputType value)
Sets how to output the data. |
void |
setUseCustomLoader(boolean value)
Sets whether to use a custom loader or not. |
void |
updateProvenance(ProvenanceContainer cont)
Updates the provenance information in the provided container. |
String |
useCustomLoaderTipText()
Returns the tip text for this property. |
void |
wrapUp()
Cleans up after the execution has finished. |
| Methods inherited from class adams.flow.transformer.AbstractTransformer |
|---|
execute, input, postExecute |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String BACKUP_STRUCTURE
public static final String BACKUP_SOURCE
protected boolean m_UseCustomLoader
protected weka.core.converters.AbstractFileLoader m_CustomLoader
protected WekaFileReader.OutputType m_OutputType
protected weka.core.Instances m_Structure
protected weka.core.converters.ConverterUtils.DataSource m_Source
| Constructor Detail |
|---|
public WekaFileReader()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in class AbstractActorpublic Class[] accepts()
accepts in interface InputConsumerpublic Class[] generates()
generates in interface OutputProducerpublic void setUseCustomLoader(boolean value)
value - if true then the custom loader will be usedpublic boolean getUseCustomLoader()
public String useCustomLoaderTipText()
public void setCustomLoader(weka.core.converters.AbstractFileLoader value)
value - the custom loaderpublic weka.core.converters.AbstractFileLoader getCustomLoader()
public String customLoaderTipText()
public void setOutputType(WekaFileReader.OutputType value)
value - the output typepublic WekaFileReader.OutputType getOutputType()
public String outputTypeTipText()
protected void pruneBackup()
pruneBackup in class AbstractActorprotected Hashtable<String,Object> backupState()
backupState in class AbstractTransformerprotected void restoreState(Hashtable<String,Object> state)
restoreState in class AbstractTransformerstate - the backup of the state to restore fromprotected void reset()
reset in class AbstractTransformerprotected String doExecute()
doExecute in class AbstractActorpublic Token output()
output in interface OutputProduceroutput in class AbstractTransformerpublic void updateProvenance(ProvenanceContainer cont)
updateProvenance in interface ProvenanceSupportercont - the provenance container to updatepublic boolean hasPendingOutput()
hasPendingOutput in interface OutputProducerhasPendingOutput in class AbstractTransformerpublic void wrapUp()
wrapUp in class AbstractTransformer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||