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
Download files by FTP.
- Author:
- paul
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected org.apache.commons.net.ftp.FTPClient
protected NetDatasourceUtil
Fields inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
allowUseExisting, force, INFO_UPDATE_INTERVAL, localBasePath, log, remoteBaseDir
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefineTask
(String outputFileName, String seekFile) protected Collection
<File> Fetch files according to the identifier provided.protected Collection
<File> protected long
getExpectedSize
(String seekFile) void
setAvoidDownload
(boolean avoidDownload) abstract void
Methods inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
fetchedFile, fetchedFile, formLocalFilePath, formRemoteFilePath, getExistingFile, getLocalBasePath, initConfig, isForce, mkdir, mkdir, setAllowUseExisting, setForce, waitForDownload
-
Field Details
-
ftpClient
protected org.apache.commons.net.ftp.FTPClient ftpClient -
netDataSourceUtil
-
avoidDownload
protected boolean avoidDownload
-
-
Constructor Details
-
FtpFetcher
public FtpFetcher()
-
-
Method Details
-
fetch
Description copied from interface:Fetcher
Fetch files according to the identifier provided.- Parameters:
identifier
- identifier- Returns:
- local files
-
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
-
doTask
-
fetch
-
getExpectedSize
- Throws:
IOException
-