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 SummaryFields Modifier and Type Field Description protected booleanavoidDownloadprotected org.apache.commons.net.ftp.FTPClientftpClientprotected NetDatasourceUtilnetDataSourceUtil- 
Fields inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcherallowUseExisting, force, INFO_UPDATE_INTERVAL, localBasePath, log, remoteBaseDir
 
- 
 - 
Constructor SummaryConstructors Constructor Description FtpFetcher()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected FutureTask<Boolean>defineTask(String outputFileName, String seekFile)protected Collection<LocalFile>doTask(FutureTask<Boolean> future, long expectedSize, String seekFileName, String outputFileName)Collection<LocalFile>fetch(String identifier)Fetch files according to the identifier provided.protected Collection<LocalFile>fetch(String identifier, String seekFile)protected longgetExpectedSize(String seekFile)NetDatasourceUtilgetNetDataSourceUtil()voidsetAvoidDownload(boolean avoidDownload)abstract voidsetNetDataSourceUtil()- 
Methods inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcherfetchedFile, fetchedFile, formLocalFilePath, formRemoteFilePath, getExistingFile, getLocalBasePath, initConfig, isForce, mkdir, mkdir, setAllowUseExisting, setForce, waitForDownload, waitForDownload
 
- 
 
- 
- 
- 
Field Detail- 
ftpClientprotected org.apache.commons.net.ftp.FTPClient ftpClient 
 - 
netDataSourceUtilprotected NetDatasourceUtil netDataSourceUtil 
 - 
avoidDownloadprotected boolean avoidDownload 
 
- 
 - 
Method Detail- 
fetchpublic Collection<LocalFile> fetch(String identifier) Description copied from interface:FetcherFetch files according to the identifier provided.- Parameters:
- identifier- identifier
- Returns:
- local files
 
 - 
getNetDataSourceUtilpublic NetDatasourceUtil getNetDataSourceUtil() - Returns:
- the netDataSourceUtil
 
 - 
setAvoidDownloadpublic 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'.
 
 - 
setNetDataSourceUtilpublic abstract void setNetDataSourceUtil() 
 - 
defineTaskprotected FutureTask<Boolean> defineTask(String outputFileName, String seekFile) 
 - 
doTaskprotected Collection<LocalFile> doTask(FutureTask<Boolean> future, long expectedSize, String seekFileName, String outputFileName) 
 - 
fetchprotected Collection<LocalFile> fetch(String identifier, String seekFile) 
 - 
getExpectedSizeprotected long getExpectedSize(String seekFile) throws IOException - Throws:
- IOException
 
 
- 
 
-