Class FtpArchiveFetcher
java.lang.Object
ubic.gemma.core.loader.util.fetcher.AbstractFetcher
ubic.gemma.core.loader.util.fetcher.FtpFetcher
ubic.gemma.core.loader.util.fetcher.FtpArchiveFetcher
- All Implemented Interfaces:
ArchiveFetcher,Fetcher
- Direct Known Subclasses:
DataFileFetcher,NCBIGeneFileFetcher,RawDataFetcher,TaxonFetcher
Fetcher that can fetch archives (e.g., tar.gz) and unpack them.
- Author:
- pavlidis
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanorg.apache.tools.ant.taskdefs.ExpandFields inherited from class ubic.gemma.core.loader.util.fetcher.FtpFetcher
avoidDownload, ftpClient, netDataSourceUtilFields 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 TypeMethodDescriptionprotected voidprotected Collection<File> protected voidinitArchiveHandler(String methodName) protected Collection<File> listFiles(String remoteFile, File newDir, Collection<File> result) voidsetDeleteAfterUnpack(boolean doDelete) Should the downloaded archive be deleted after unpacking?voidsetExcludePattern(String excludePattern) voidsetForce(boolean force) Set to true if downloads should proceed even if the file already exists.protected voidMethods inherited from class ubic.gemma.core.loader.util.fetcher.FtpFetcher
defineTask, fetch, fetch, getExpectedSize, getNetDataSourceUtil, setAvoidDownload, setNetDataSourceUtilMethods inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
fetchedFile, fetchedFile, formLocalFilePath, formRemoteFilePath, getExistingFile, getLocalBasePath, initConfig, isForce, mkdir, mkdir, setAllowUseExisting, waitForDownload
-
Field Details
-
expander
public org.apache.tools.ant.taskdefs.Expand expander -
doDelete
protected boolean doDelete
-
-
Constructor Details
-
FtpArchiveFetcher
public FtpArchiveFetcher()
-
-
Method Details
-
setDeleteAfterUnpack
public void setDeleteAfterUnpack(boolean doDelete) Description copied from interface:ArchiveFetcherShould the downloaded archive be deleted after unpacking?- Specified by:
setDeleteAfterUnpackin interfaceArchiveFetcher- Parameters:
doDelete- whether to delete
-
setExcludePattern
- Parameters:
excludePattern- the excludePattern to set
-
setForce
public void setForce(boolean force) Description copied from class:AbstractFetcherSet to true if downloads should proceed even if the file already exists.- Specified by:
setForcein interfaceFetcher- Overrides:
setForcein classAbstractFetcher- Parameters:
force- new force
-
cleanUp
-
doTask
protected Collection<File> doTask(Callable<Boolean> callable, long expectedSize, String seekFileName, String outputFileName) - Overrides:
doTaskin classFtpFetcher
-
initArchiveHandler
- Parameters:
methodName- e.g., "gzip". If null, ignored
-
listFiles
protected Collection<File> listFiles(String remoteFile, File newDir, Collection<File> result) throws IOException - Throws:
IOException
-
unPack
-