com.gisgraphy.importer
Class GeonamesFileRetriever
java.lang.Object
com.gisgraphy.importer.AbstractFileRetriever
com.gisgraphy.importer.GeonamesFileRetriever
- All Implemented Interfaces:
- IImporterProcessor
public class GeonamesFileRetriever
- extends AbstractFileRetriever
Retrieve The Geonames files from a server
- Author:
- David Masclet
Methods inherited from class com.gisgraphy.importer.AbstractFileRetriever |
downloadFile, downloadFiles, getCurrentFileName, getNumberOfLinesToProcess, getReadFileLine, getStatus, getStatusMessage, getTotalReadLine, process, resetStatus, rollback, setImporterConfig, setInternationalisationService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeonamesFileRetriever
public GeonamesFileRetriever()
getDownloadDirectory
public String getDownloadDirectory()
- Specified by:
getDownloadDirectory
in class AbstractFileRetriever
- Returns:
- The directory where the file should be downloaded
getDownloadBaseUrl
public String getDownloadBaseUrl()
- Specified by:
getDownloadBaseUrl
in class AbstractFileRetriever
- Returns:
- the base URL from wich the file should be downloaded
decompressFiles
public void decompressFiles()
throws IOException
- Description copied from class:
AbstractFileRetriever
- Method to call if files must be decompress (untar or unzip)
- Specified by:
decompressFiles
in class AbstractFileRetriever
- Throws:
IOException
shouldBeSkipped
public boolean shouldBeSkipped()
- Specified by:
shouldBeSkipped
in interface IImporterProcessor
- Overrides:
shouldBeSkipped
in class AbstractFileRetriever
- Returns:
- true if the processor should Not be executed
getFilesToDecompress
public File[] getFilesToDecompress()
throws IOException
- Description copied from class:
AbstractFileRetriever
- return an array of file that are to be decompressed
- Specified by:
getFilesToDecompress
in class AbstractFileRetriever
- Throws:
IOException
isFileNotFoundTolerant
public boolean isFileNotFoundTolerant()
- Specified by:
isFileNotFoundTolerant
in class AbstractFileRetriever
- Returns:
- false if download files that doesn't exists on the remote server
should throw
Copyright © 2012. All Rights Reserved.