com.gisgraphy.domain.geoloc.importer
Class OpenStreetMapFileRetriever

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.importer.AbstractFileRetriever
      extended by com.gisgraphy.domain.geoloc.importer.OpenStreetMapFileRetriever
All Implemented Interfaces:
IImporterProcessor

public class OpenStreetMapFileRetriever
extends AbstractFileRetriever

Retrieve The Geonames files from a server

Author:
David Masclet

Field Summary
 
Fields inherited from class com.gisgraphy.domain.geoloc.importer.AbstractFileRetriever
currentFileName, fileIndex, importerConfig, logger, numberOfFileToDownload, status, statusMessage
 
Constructor Summary
OpenStreetMapFileRetriever()
           
 
Method Summary
 void decompressFiles()
          Method to call if files must be decompress (untar or unzip)
 java.lang.String getcurrentExtractedFileNameIntoArchive()
           
 java.lang.String getDownloadBaseUrl()
           
 java.lang.String getDownloadDirectory()
           
 java.io.File[] getFilesToDecompress()
          return an array of file that are to be decompressed
 boolean shouldBeSkipped()
           
 
Methods inherited from class com.gisgraphy.domain.geoloc.importer.AbstractFileRetriever
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
 

Constructor Detail

OpenStreetMapFileRetriever

public OpenStreetMapFileRetriever()
Method Detail

getcurrentExtractedFileNameIntoArchive

public java.lang.String getcurrentExtractedFileNameIntoArchive()

getDownloadDirectory

public java.lang.String getDownloadDirectory()
Specified by:
getDownloadDirectory in class AbstractFileRetriever
Returns:
The directory where the file should be downloaded

getDownloadBaseUrl

public java.lang.String getDownloadBaseUrl()
Specified by:
getDownloadBaseUrl in class AbstractFileRetriever
Returns:
the base URL from wich the file should be downloaded

decompressFiles

public void decompressFiles()
                     throws java.io.IOException
Description copied from class: AbstractFileRetriever
Method to call if files must be decompress (untar or unzip)

Specified by:
decompressFiles in class AbstractFileRetriever
Throws:
java.io.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 java.io.File[] getFilesToDecompress()
                                    throws java.io.IOException
Description copied from class: AbstractFileRetriever
return an array of file that are to be decompressed

Specified by:
getFilesToDecompress in class AbstractFileRetriever
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.