public abstract class AbstractFileLoader extends AbstractLoader implements FileSourcedConverter, EnvironmentHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.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
|
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
|
getDataSet, getNextInstance, getStructure, setRetrieval, setSource
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFileDescription, getFileExtension, getFileExtensions
getRevision
public static java.lang.String FILE_EXTENSION_COMPRESSED
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 filejava.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