Class UploadModule
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.modules.AbstractModule
-
- fr.ens.biologie.genomique.eoulsan.modules.mgmt.upload.UploadModule
-
- All Implemented Interfaces:
Module
- Direct Known Subclasses:
HadoopUploadModule
,LocalUploadModule
public abstract class UploadModule extends AbstractModule
This class define a abstract module class for files uploading.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description UploadModule(DataFile destination)
Public constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
copy(Map<DataFile,DataFile> files)
Copy files to destinations.TaskResult
execute(TaskContext context, TaskStatus status)
Execute a task step.protected DataFile
getDest()
String
getName()
Get the name of the module.protected abstract DataFile
getUploadedDataFile(DataFile file)
Generate the DataFile Object for the uploaded DataFileprotected abstract DataFile
getUploadedDataFile(DataFile file, Step step, Sample sample, String portName, DataFormat format, int fileIndex)
Generate the DataFile Object for the uploaded DataFilefr.ens.biologie.genomique.kenetre.util.Version
getVersion()
Get version of the Module.-
Methods inherited from class fr.ens.biologie.genomique.eoulsan.modules.AbstractModule
configure, getChecker, getDescription, getInputPorts, getOutputPorts, getParallelizationMode, getRequiredEoulsanVersion, getRequirements
-
-
-
-
Constructor Detail
-
UploadModule
public UploadModule(DataFile destination)
Public constructor.- Parameters:
destination
- destination of the uploaded files
-
-
Method Detail
-
getDest
protected DataFile getDest()
-
execute
public TaskResult execute(TaskContext context, TaskStatus status)
Description copied from interface:Module
Execute a task step.- Parameters:
context
- Execution contextstatus
- of the task
-
getName
public String getName()
Description copied from interface:Module
Get the name of the module.- Returns:
- the name of the module
-
getVersion
public fr.ens.biologie.genomique.kenetre.util.Version getVersion()
Description copied from interface:Module
Get version of the Module.- Returns:
- a Version object with the version of the Module
-
getUploadedDataFile
protected abstract DataFile getUploadedDataFile(DataFile file) throws IOException
Generate the DataFile Object for the uploaded DataFile- Parameters:
file
- DataFile to upload- Returns:
- a new DataFile object with the path to the upload DataFile
- Throws:
IOException
- if an error occurs while creating the result DataFile
-
getUploadedDataFile
protected abstract DataFile getUploadedDataFile(DataFile file, Step step, Sample sample, String portName, DataFormat format, int fileIndex) throws IOException
Generate the DataFile Object for the uploaded DataFile- Parameters:
file
- DataFile to uploadportName
- the port nameformat
- the format of the file to uploadsample
- the sample for the sourcefileIndex
- file index for multifile data- Returns:
- a new DataFile object with the path to the upload DataFile
- Throws:
IOException
- if an error occurs while creating the result DataFile
-
copy
protected abstract void copy(Map<DataFile,DataFile> files) throws IOException
Copy files to destinations.- Parameters:
files
- map with source and destination for each file- Throws:
IOException
- if an error occurs while copying files
-
-