Class AbstractSingleCellDetector

java.lang.Object
ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
All Implemented Interfaces:
SingleCellDetector
Direct Known Subclasses:
AbstractSingleFileInSeriesSingleCellDetector, MexDetector

public abstract class AbstractSingleCellDetector extends Object implements SingleCellDetector
  • Field Details

    • log

      protected final org.apache.commons.logging.Log log
  • Constructor Details

    • AbstractSingleCellDetector

      public AbstractSingleCellDetector()
  • Method Details

    • setFTPClientFactory

      public void setFTPClientFactory(FTPClientFactory ftpClientFactory)
      Set the FTP client factory to use for downloading data over FTP.
    • getDownloadDirectory

      public Path getDownloadDirectory()
    • setDownloadDirectory

      public void setDownloadDirectory(Path downloadDirectory)
      Set the download directory to use for storing single-cell data.

      It may be left unset if downloading is not intended or needed.

      Specified by:
      setDownloadDirectory in interface SingleCellDetector
    • setRetryPolicy

      public void setRetryPolicy(SimpleRetryPolicy retryPolicy)
      Description copied from interface: SingleCellDetector
      Set the retry policy to use when downloading single-cell data.
      Specified by:
      setRetryPolicy in interface SingleCellDetector
    • retry

      protected <T> T retry(SimpleRetryCallable<T,IOException> callable, String what) throws IOException
      Retry the given callable a certain number of times before giving up.
      Throws:
      IOException
      See Also:
    • existsAndHasExpectedSize

      protected boolean existsAndHasExpectedSize(Path dest, String remoteFile, long expectedContentLength, boolean decompressIfNeeded, boolean storeCompressed) throws IOException
      Check if a file at a given destination exists and has the size of a remote file.
      Parameters:
      dest - file at destination
      remoteFile - filename at origin
      expectedContentLength - expected size, or -1 if unknown
      decompressIfNeeded - if true and the remote file is gzipped, will only check if the local file exists
      storeCompressed - if true and the remote file is *not* gzipped, will only check if the local file exists
      Throws:
      IOException
    • openSupplementaryFileAsStream

      protected InputStream openSupplementaryFileAsStream(String filename, int attempt, boolean decompressIfNeeded) throws IOException
      Open a supplementary file as an input stream, possibly decompressing it.
      Throws:
      IOException
    • getSizeInBytes

      protected long getSizeInBytes(String remoteFile) throws IOException
      Throws:
      IOException