Class AbstractSingleCellDetector
java.lang.Object
ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
- All Implemented Interfaces:
SingleCellDetector
- Direct Known Subclasses:
AbstractSingleFileInSeriesSingleCellDetector,MexDetector
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanexistsAndHasExpectedSize(Path dest, String remoteFile, long expectedContentLength, boolean decompressIfNeeded, boolean storeCompressed) Check if a file at a given destination exists and has the size of a remote file.protected longgetSizeInBytes(String remoteFile) protected InputStreamopenSupplementaryFileAsStream(String filename, int attempt, boolean decompressIfNeeded) Open a supplementary file as an input stream, possibly decompressing it.protected <T> Tretry(SimpleRetryCallable<T, IOException> callable, String what) Retry the given callable a certain number of times before giving up.voidsetDownloadDirectory(Path downloadDirectory) Set the download directory to use for storing single-cell data.voidsetFTPClientFactory(FTPClientFactory ftpClientFactory) Set the FTP client factory to use for downloading data over FTP.voidsetRetryPolicy(SimpleRetryPolicy retryPolicy) Set the retry policy to use when downloading single-cell data.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.core.loader.expression.geo.singleCell.SingleCellDetector
downloadSingleCellData, downloadSingleCellData, getAdditionalSupplementaryFiles, getAdditionalSupplementaryFiles, getSingleCellDataLoader, hasSingleCellData, hasSingleCellData
-
Field Details
-
log
protected final org.apache.commons.logging.Log log
-
-
Constructor Details
-
AbstractSingleCellDetector
public AbstractSingleCellDetector()
-
-
Method Details
-
setFTPClientFactory
Set the FTP client factory to use for downloading data over FTP. -
getDownloadDirectory
-
setDownloadDirectory
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:
setDownloadDirectoryin interfaceSingleCellDetector
-
setRetryPolicy
Description copied from interface:SingleCellDetectorSet the retry policy to use when downloading single-cell data.- Specified by:
setRetryPolicyin interfaceSingleCellDetector
-
retry
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 destinationremoteFile- filename at originexpectedContentLength- expected size, or -1 if unknowndecompressIfNeeded- if true and the remote file is gzipped, will only check if the local file existsstoreCompressed- 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
- Throws:
IOException
-