Class FtpFetcher

java.lang.Object
ubic.gemma.core.loader.util.fetcher.AbstractFetcher
ubic.gemma.core.loader.util.fetcher.FtpFetcher
All Implemented Interfaces:
Fetcher
Direct Known Subclasses:
FtpArchiveFetcher, GeoFetcher, HomologeneFetcher, SDRFFetcher

public abstract class FtpFetcher extends AbstractFetcher
Download files by FTP.
Author:
paul
  • Field Details

    • ftpClient

      protected org.apache.commons.net.ftp.FTPClient ftpClient
    • netDataSourceUtil

      protected NetDatasourceUtil netDataSourceUtil
    • avoidDownload

      protected boolean avoidDownload
  • Constructor Details

    • FtpFetcher

      public FtpFetcher()
  • Method Details

    • fetch

      public Collection<File> fetch(String identifier)
      Description copied from interface: Fetcher
      Fetch files according to the identifier provided.
      Parameters:
      identifier - identifier
      Returns:
      local files
    • getNetDataSourceUtil

      public NetDatasourceUtil getNetDataSourceUtil()
      Returns:
      the netDataSourceUtil
    • setAvoidDownload

      public void setAvoidDownload(boolean avoidDownload)
      Parameters:
      avoidDownload - Set to true to avoid download if possible and simply use existing files if they are available. This skips the usual checks for the correct file size compared to the remote one. Not all fetchers support setting this to 'true'.
    • setNetDataSourceUtil

      public abstract void setNetDataSourceUtil()
    • defineTask

      protected Callable<Boolean> defineTask(String outputFileName, String seekFile)
    • doTask

      protected Collection<File> doTask(Callable<Boolean> callable, long expectedSize, String seekFileName, String outputFileName)
    • fetch

      protected Collection<File> fetch(String identifier, String seekFile)
    • getExpectedSize

      protected long getExpectedSize(String seekFile) throws IOException
      Throws:
      IOException