public class GenericExtraFileImporter extends java.lang.Object implements ExtraFileImporter
Modifier and Type | Field and Description |
---|---|
private DbControl |
dc |
private Directory |
dir |
private boolean |
overwrite |
Constructor and Description |
---|
GenericExtraFileImporter(DbControl dc,
Directory dir,
boolean overwrite)
Create a new extra file importer.
|
Modifier and Type | Method and Description |
---|---|
File |
importExtraFile(java.lang.String filename,
InputStreamLocator locator)
Import the file data into a file in the BASE file system.
|
private final DbControl dc
private final Directory dir
private final boolean overwrite
public GenericExtraFileImporter(DbControl dc, Directory dir, boolean overwrite)
dc
- A DbControl to use for database accessdir
- The directory in the BASE file system where the imported files
should be placedoverwrite
- TRUE to force overwriting existing files, FALSE to only
overwrite files that have been marked for removalpublic File importExtraFile(java.lang.String filename, InputStreamLocator locator) throws java.io.IOException
ExtraFileImporter
BfsImporter
will call this method once for each extra
file (entries starting with 'x-') in the metadata file.
The implementation is supposed to create a file in the BASE file
system or link to an existing file. The returned file will be
automatically linked with the child bioassay set.importExtraFile
in interface ExtraFileImporter
filename
- The filename of the file that is being importedlocator
- A locator implementation that should be used to
find the file data if neededjava.io.IOException
- If there is a problem reading the file data