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.domain.geoloc.importer
Class GeonamesFileRetriever

    java.lang.Object
      com.gisgraphy.domain.geoloc.importer.GeonamesFileRetriever

All Implemented Interfaces:
  IGeonamesProcessor

    public class GeonamesFileRetriever

extends java.lang.Object
implements IGeonamesProcessor

Retrieve The Geonames files from a server

Author:
  David Masclet

Field Summary
`protected static org.slf4j.Logger` | `logger` The logger

Constructor Summary
`GeonamesFileRetriever()`

Method Summary
`java.lang.String` | `getCurrentFileName()`
`int` | `getNumberOfLinesToProcess()`
`int` | `getReadFileLine()` The number of read line for the current processed file
`ImporterStatus` | `getStatus()`
`java.lang.String` | `getStatusMessage()`
`int` | `getTotalReadLine()` The number of read line for all the processed file
`void` | `process()` Do the stuff...
`java.util.List<NameValueDTO<java.lang.Integer>>` | `rollback()` /!
`void` | `setImporterConfig(ImporterConfig importerConfig)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected static final org.slf4j.Logger logger

  The logger

Constructor Detail

### GeonamesFileRetriever

    public GeonamesFileRetriever()

Method Detail

### process

    public void process()
                 throws GeonamesProcessorException

  Description copied from interface: `IGeonamesProcessor`
  Do the stuff...

  Specified by:
    `process` in interface `IGeonamesProcessor`
  Throws:
    `GeonamesProcessorException`

### setImporterConfig

    public void setImporterConfig(ImporterConfig importerConfig)

  Parameters:
    `importerConfig` - The importerConfig to set

### getReadFileLine

    public int getReadFileLine()

  Description copied from interface: `IGeonamesProcessor`
  The number of read line for the current processed file

  Specified by:
    `getReadFileLine` in interface `IGeonamesProcessor`
  See Also:
    `IGeonamesProcessor.getTotalReadLine()`

### getTotalReadLine

    public int getTotalReadLine()

  Description copied from interface: `IGeonamesProcessor`
  The number of read line for all the processed file

  Specified by:
    `getTotalReadLine` in interface `IGeonamesProcessor`
  See Also:
    `IGeonamesProcessor.getReadFileLine()`

### getCurrentFileName

    public java.lang.String getCurrentFileName()

  Specified by:
    `getCurrentFileName` in interface `IGeonamesProcessor`
  Returns:
    The name of the file currently processed or null if no file is processed

### getNumberOfLinesToProcess

    public int getNumberOfLinesToProcess()

  Specified by:
    `getNumberOfLinesToProcess` in interface `IGeonamesProcessor`
  Returns:
    The number of line the processor will process. (it is not the number of lines left!)

### getStatus

    public ImporterStatus getStatus()

  Specified by:
    `getStatus` in interface `IGeonamesProcessor`
  Returns:
    The current status of the importer

### getStatusMessage

    public java.lang.String getStatusMessage()

  Specified by:
    `getStatusMessage` in interface `IGeonamesProcessor`
  Returns:
    A text Message for the importer

### rollback

    public java.util.List<NameValueDTO<java.lang.Integer>> rollback()

  Description copied from interface: `IGeonamesProcessor`
  /!\ USE THIS METHOD VERY CAREFULLY /!\ : If you call this function, all the imported data for the specified importer will be deleted

  Specified by:
    `rollback` in interface `IGeonamesProcessor`
  Returns:
    a NameValueDTO with the name of the deleted object and the number of deleted Object. No entry will be return for Object that were 0 object will be deleted.

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 © 2009. All Rights Reserved.