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 Summary
Fields Modifier and Type Field Description protected booleanavoidDownloadprotected org.apache.commons.net.ftp.FTPClientftpClientprotected NetDatasourceUtilnetDataSourceUtil-
Fields inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
allowUseExisting, force, INFO_UPDATE_INTERVAL, localBasePath, log, remoteBaseDir
-
-
Constructor Summary
Constructors Constructor Description FtpFetcher()
-
Method Summary
All 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.AbstractFetcher
fetchedFile, fetchedFile, formLocalFilePath, formRemoteFilePath, getExistingFile, getLocalBasePath, initConfig, isForce, mkdir, mkdir, setAllowUseExisting, setForce, waitForDownload, waitForDownload
-
-
-
-
Field Detail
-
ftpClient
protected org.apache.commons.net.ftp.FTPClient ftpClient
-
netDataSourceUtil
protected NetDatasourceUtil netDataSourceUtil
-
avoidDownload
protected boolean avoidDownload
-
-
Method Detail
-
fetch
public Collection<LocalFile> fetch(String identifier)
Description copied from interface:FetcherFetch 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 FutureTask<Boolean> defineTask(String outputFileName, String seekFile)
-
doTask
protected Collection<LocalFile> doTask(FutureTask<Boolean> future, long expectedSize, String seekFileName, String outputFileName)
-
fetch
protected Collection<LocalFile> fetch(String identifier, String seekFile)
-
getExpectedSize
protected long getExpectedSize(String seekFile) throws IOException
- Throws:
IOException
-
-