Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.importer
Class GeonamesZipCodeFileRetriever

    java.lang.Object
      com.gisgraphy.importer.AbstractFileRetriever
          com.gisgraphy.importer.GeonamesZipCodeFileRetriever

All Implemented Interfaces:
  IImporterProcessor

    public class GeonamesZipCodeFileRetriever

extends AbstractFileRetriever

Retrieve The Geonames zip code files from a server

Author:
  David Masclet

Field Summary

Fields inherited from class com.gisgraphy.importer.AbstractFileRetriever
`currentFileName, fileIndex, importerConfig, logger, numberOfFileToDownload, status, statusMessage`

Constructor Summary
`GeonamesZipCodeFileRetriever()`

Method Summary
`void` | `decompressFiles()` Method to call if files must be decompress (untar or unzip)
`String` | `getDownloadBaseUrl()`
`String` | `getDownloadDirectory()`
`File[]` | `getFilesToDecompress()` return an array of file that are to be decompressed
`boolean` | `isFileNotFoundTolerant()`
`boolean` | `shouldBeSkipped()`

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`

Constructor Detail

### GeonamesZipCodeFileRetriever

    public GeonamesZipCodeFileRetriever()

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.