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
public abstract class FtpArchiveFetcher extends FtpFetcher implements ArchiveFetcher
Fetcher that can fetch archives (e.g., tar.gz) and unpack them.- Author:
- pavlidis
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandoDeleteorg.apache.tools.ant.taskdefs.Expandexpander-
Fields inherited from class ubic.gemma.core.loader.util.fetcher.FtpFetcher
avoidDownload, ftpClient, netDataSourceUtil
-
Fields inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
allowUseExisting, force, INFO_UPDATE_INTERVAL, localBasePath, log, remoteBaseDir
-
-
Constructor Summary
Constructors Constructor Description FtpArchiveFetcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanUp(File outputFile)protected Collection<LocalFile>doTask(FutureTask<Boolean> future, long expectedSize, String seekFileName, String outputFileName)protected voidinitArchiveHandler(String methodName)protected Collection<LocalFile>listFiles(String remoteFile, File newDir, Collection<LocalFile> 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 voidunPack(File toUnpack)-
Methods inherited from class ubic.gemma.core.loader.util.fetcher.FtpFetcher
defineTask, fetch, fetch, getExpectedSize, getNetDataSourceUtil, setAvoidDownload, setNetDataSourceUtil
-
Methods inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
fetchedFile, fetchedFile, formLocalFilePath, formRemoteFilePath, getExistingFile, getLocalBasePath, initConfig, isForce, mkdir, mkdir, setAllowUseExisting, waitForDownload, waitForDownload
-
-
-
-
Method Detail
-
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
public void setExcludePattern(String excludePattern)
- 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
protected void cleanUp(File outputFile)
-
doTask
protected Collection<LocalFile> doTask(FutureTask<Boolean> future, long expectedSize, String seekFileName, String outputFileName)
- Overrides:
doTaskin classFtpFetcher
-
initArchiveHandler
protected void initArchiveHandler(String methodName)
- Parameters:
methodName- e.g., "gzip". If null, ignored
-
listFiles
protected Collection<LocalFile> listFiles(String remoteFile, File newDir, Collection<LocalFile> result) throws IOException
- Throws:
IOException
-
unPack
protected void unPack(File toUnpack)
-
-