Class FtpArchiveFetcher

All Implemented Interfaces:
ArchiveFetcher, Fetcher
Direct Known Subclasses:
DataFileFetcher, NCBIGeneFileFetcher, RawDataFetcher, TaxonFetcher

public abstract class FtpArchiveFetcher extends FtpFetcher implements ArchiveFetcher
Fetcher that can fetch archives (e.g., tar.gz) and unpack them.
Author:
pavlidis
  • Field Details

    • expander

      public org.apache.tools.ant.taskdefs.Expand expander
    • doDelete

      protected boolean doDelete
  • Constructor Details

    • FtpArchiveFetcher

      public FtpArchiveFetcher()
  • Method Details

    • setDeleteAfterUnpack

      public void setDeleteAfterUnpack(boolean doDelete)
      Description copied from interface: ArchiveFetcher
      Should the downloaded archive be deleted after unpacking?
      Specified by:
      setDeleteAfterUnpack in interface ArchiveFetcher
      Parameters:
      doDelete - whether to delete
    • setExcludePattern

      public void setExcludePattern(String excludePattern)
      Parameters:
      excludePattern - the excludePattern to set
    • setForce

      public void setForce(boolean force)
      Description copied from class: AbstractFetcher
      Set to true if downloads should proceed even if the file already exists.
      Specified by:
      setForce in interface Fetcher
      Overrides:
      setForce in class AbstractFetcher
      Parameters:
      force - new force
    • cleanUp

      protected void cleanUp(File outputFile)
    • doTask

      protected Collection<File> doTask(Callable<Boolean> callable, long expectedSize, String seekFileName, String outputFileName)
      Overrides:
      doTask in class FtpFetcher
    • initArchiveHandler

      protected void initArchiveHandler(String methodName)
      Parameters:
      methodName - e.g., "gzip". If null, ignored
    • listFiles

      protected Collection<File> listFiles(String remoteFile, File newDir, Collection<File> result) throws IOException
      Throws:
      IOException
    • unPack

      protected void unPack(File toUnpack)