Class UploadModule

    • 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 context
        status - 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 upload
        portName - the port name
        format - the format of the file to upload
        sample - the sample for the source
        fileIndex - 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