Class GzipFileProcessor

  • All Implemented Interfaces:
    FileProcessor

    @Component
    public class GzipFileProcessor
    extends java.lang.Object
    implements FileProcessor
    Handle gzip-ed files (if necessary). This class partially assumes that gzip compressed files have the extension ".gz" (not for determining whether or not the file is compressed, but rather for naming the decompressed file). If the compressed file does not end with ".gz", then it will be renamed as such so that the decompressed file name will not conflict with the compressed file name.
    • Constructor Detail

      • GzipFileProcessor

        public GzipFileProcessor​(SequenceFileRepository sequenceFileRepository,
                                 java.lang.Boolean removeCompressedFiles)
    • Method Detail

      • setRemoveCompressedFiles

        public void setRemoveCompressedFiles​(boolean removeCompressedFile)
        Decide whether or not to delete the original compressed files that are uploaded once they're unzipped. If false they will be kept in their revision directories.
        Parameters:
        removeCompressedFile - Whether or not to delete original compressed files.
      • setDisableFileProcessor

        public void setDisableFileProcessor​(boolean disableFileProcessor)
        Disables this file processor from processing files.
        Parameters:
        disableFileProcessor - True if this processor should be disabled, false otherwise.
      • shouldProcessFile

        public boolean shouldProcessFile​(SequencingObject sequencingObject)
        Description copied from interface: FileProcessor
        This method asks the file processor whether it should act on this file. The processor may have some settings that would not run on certain files.
        Specified by:
        shouldProcessFile in interface FileProcessor
        Parameters:
        sequencingObject - the SequencingObject to check
        Returns:
        true if the processor should act on the file