Class HttpFetcher
- java.lang.Object
-
- ubic.gemma.core.loader.util.fetcher.AbstractFetcher
-
- ubic.gemma.core.loader.util.fetcher.HttpFetcher
-
- All Implemented Interfaces:
Fetcher
public class HttpFetcher extends AbstractFetcher
A generic class for fetching files via HTTP and writing them to a local file system.- Author:
- pavlidis
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
allowUseExisting, force, INFO_UPDATE_INTERVAL, localBasePath, log, remoteBaseDir
-
-
Constructor Summary
Constructors Constructor Description HttpFetcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FutureTask<Boolean>defineTask(String outputFileName, String seekFile)protected Collection<LocalFile>doTask(FutureTask<Boolean> future, String seekFile, String outputFileName)Collection<LocalFile>fetch(String url)Fetch files according to the identifier provided.Collection<LocalFile>fetch(String url, String outputFileName)protected StringformLocalFilePath(String identifier, File newDir)protected StringformRemoteFilePath(String identifier)protected voidinitConfig()protected Collection<LocalFile>listFiles(String seekFile, String outputFileName)-
Methods inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
fetchedFile, fetchedFile, getExistingFile, getLocalBasePath, isForce, mkdir, mkdir, setAllowUseExisting, setForce, waitForDownload, waitForDownload
-
-
-
-
Method Detail
-
fetch
public Collection<LocalFile> fetch(String url)
Description copied from interface:FetcherFetch files according to the identifier provided.- Parameters:
url- identifier- Returns:
- local files
-
fetch
public Collection<LocalFile> fetch(String url, String outputFileName)
-
defineTask
protected FutureTask<Boolean> defineTask(String outputFileName, String seekFile)
-
doTask
protected Collection<LocalFile> doTask(FutureTask<Boolean> future, String seekFile, String outputFileName)
-
formLocalFilePath
protected String formLocalFilePath(String identifier, File newDir)
- Specified by:
formLocalFilePathin classAbstractFetcher
-
formRemoteFilePath
protected String formRemoteFilePath(String identifier)
- Specified by:
formRemoteFilePathin classAbstractFetcher
-
initConfig
protected void initConfig()
- Specified by:
initConfigin classAbstractFetcher
-
listFiles
protected Collection<LocalFile> listFiles(String seekFile, String outputFileName) throws IOException
- Throws:
IOException
-
-