|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.converters.AbstractLoader
weka.core.converters.AbstractFileLoader
public abstract class AbstractFileLoader
Abstract superclass for all file loaders.
Field Summary | |
---|---|
static String |
FILE_EXTENSION_COMPRESSED
the extension for compressed files |
Fields inherited from interface weka.core.converters.Loader |
---|
BATCH, INCREMENTAL, NONE |
Constructor Summary | |
---|---|
AbstractFileLoader()
|
Method Summary | |
---|---|
boolean |
getUseRelativePath()
Gets whether relative paths are to be used |
void |
reset()
Resets the loader ready to read a new data set |
File |
retrieveFile()
get the File specified as the source |
static void |
runFileLoader(AbstractFileLoader loader,
String[] options)
runs the given loader with the provided options |
void |
setEnvironment(Environment env)
Set the environment variables to use. |
void |
setFile(File file)
sets the source File |
void |
setSource(File file)
Resets the Loader object and sets the source of the data set to be the supplied File object. |
void |
setUseRelativePath(boolean rp)
Set whether to use relative rather than absolute paths |
String |
useRelativePathTipText()
Tip text suitable for displaying int the GUI |
Methods inherited from class weka.core.converters.AbstractLoader |
---|
getDataSet, getNextInstance, getStructure, setRetrieval, setSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface weka.core.converters.FileSourcedConverter |
---|
getFileDescription, getFileExtension, getFileExtensions |
Methods inherited from interface weka.core.RevisionHandler |
---|
getRevision |
Field Detail |
---|
public static String FILE_EXTENSION_COMPRESSED
Constructor Detail |
---|
public AbstractFileLoader()
Method Detail |
---|
public File retrieveFile()
retrieveFile
in interface FileSourcedConverter
public void setFile(File file) throws IOException
setFile
in interface FileSourcedConverter
file
- the source file
IOException
- if an error occurspublic void setEnvironment(Environment env)
setEnvironment
in interface EnvironmentHandler
env
- the environment variables to usepublic void reset() throws IOException
reset
in interface Loader
reset
in class AbstractLoader
IOException
- if something goes wrongpublic void setSource(File file) throws IOException
setSource
in interface Loader
setSource
in class AbstractLoader
file
- the source file.
IOException
- if an error occurspublic String useRelativePathTipText()
public void setUseRelativePath(boolean rp)
setUseRelativePath
in interface FileSourcedConverter
rp
- true if relative paths are to be usedpublic boolean getUseRelativePath()
getUseRelativePath
in interface FileSourcedConverter
public static void runFileLoader(AbstractFileLoader loader, String[] options)
loader
- the loader to runoptions
- the commandline options, first argument must be the
file to load
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |