public abstract class AbstractFileLoader extends AbstractLoader implements FileSourcedConverter, EnvironmentHandler
Loader.StructureNotReadyException| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_EXTENSION_COMPRESSED
the extension for compressed files
|
BATCH, INCREMENTAL, NONE| Constructor and Description |
|---|
AbstractFileLoader() |
| Modifier and Type | Method and Description |
|---|---|
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
|
getDataSet, getNextInstance, getStructure, setRetrieval, setSourceequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileDescription, getFileExtension, getFileExtensionsgetRevisionpublic static String FILE_EXTENSION_COMPRESSED
public File retrieveFile()
retrieveFile in interface FileSourcedConverterpublic void setFile(File file) throws IOException
setFile in interface FileSourcedConverterfile - the source fileIOException - if an error occurspublic void setEnvironment(Environment env)
setEnvironment in interface EnvironmentHandlerenv - the environment variables to usepublic void reset()
throws IOException
reset in interface Loaderreset in class AbstractLoaderIOException - if something goes wrongpublic void setSource(File file) throws IOException
setSource in interface LoadersetSource in class AbstractLoaderfile - the source file.IOException - if an error occurspublic String useRelativePathTipText()
public void setUseRelativePath(boolean rp)
setUseRelativePath in interface FileSourcedConverterrp - true if relative paths are to be usedpublic boolean getUseRelativePath()
getUseRelativePath in interface FileSourcedConverterpublic static void runFileLoader(AbstractFileLoader loader, String[] options)
loader - the loader to runoptions - the commandline options, first argument must be the
file to loadCopyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.