|
||||||||||
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 java.lang.String |
FILE_EXTENSION_COMPRESSED
the extension for compressed files |
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 |
java.io.File |
retrieveFile()
get the File specified as the source |
static void |
runFileLoader(AbstractFileLoader loader,
java.lang.String[] options)
runs the given loader with the provided options |
void |
setEnvironment(Environment env)
Set the environment variables to use. |
void |
setFile(java.io.File file)
sets the source File |
void |
setSource(java.io.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 |
java.lang.String |
useRelativePathTipText()
Tip text suitable for displaying int the GUI |
Methods inherited from class weka.core.converters.AbstractLoader |
---|
getDataSet, getNextInstance, getStructure, 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 java.lang.String FILE_EXTENSION_COMPRESSED
Constructor Detail |
---|
public AbstractFileLoader()
Method Detail |
---|
public java.io.File retrieveFile()
retrieveFile
in interface FileSourcedConverter
public void setFile(java.io.File file) throws java.io.IOException
setFile
in interface FileSourcedConverter
file
- the source file
java.io.IOException
- if an error occurspublic void setEnvironment(Environment env)
setEnvironment
in interface EnvironmentHandler
env
- the environment variables to usepublic void reset() throws java.io.IOException
reset
in interface Loader
reset
in class AbstractLoader
java.io.IOException
- if something goes wrongpublic void setSource(java.io.File file) throws java.io.IOException
setSource
in interface Loader
setSource
in class AbstractLoader
file
- the source file.
java.io.IOException
- if an error occurspublic java.lang.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, java.lang.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 |