com.gisgraphy.importer

## Class GeonamesAdm1Importer

- java.lang.Object
- - com.gisgraphy.importer.AbstractSimpleImporterProcessor
  - - com.gisgraphy.importer.GeonamesFeatureSimpleImporter
    - - com.gisgraphy.importer.GeonamesAdm1Importer

- All Implemented Interfaces:
    IImporterProcessor

      public class GeonamesAdm1Importer
      extends GeonamesFeatureSimpleImporter

  Import the Adm of level 1 file. It is the first step of the Adm1 import process, the import will be complete when all the datastore object will be updated by the `GeonamesFeatureSimpleImporter`
  Author:
    David Masclet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `logger`

    - ### Fields inherited from class com.gisgraphy.importer.GeonamesFeatureSimpleImporter

      `acceptedPatterns, admDao, alternateNameDao, cityDao, countryDao, gisFeatureDao, iDaos, municipalityDetector, solRSynchroniser`

    - ### Fields inherited from class com.gisgraphy.importer.AbstractSimpleImporterProcessor

      `COMMENT_START, currentFile, importerConfig, in, internationalisationService, readFileLine, status, statusMessage, totalReadLine, transactionManager, txDefinition, txStatus`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeonamesAdm1Importer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected File[]` | `getFiles()`
    `protected int` | `getMaxInsertsBeforeFlush()`
    `protected boolean` | `isAdmMode()`
    `List<NameValueDTO<Integer>>` | `rollback()` /!

    - ### Methods inherited from class com.gisgraphy.importer.GeonamesFeatureSimpleImporter

      `correctPlaceType, flushAndClear, getNumberOfColumns, processAdm, processData, setAdmDao, setAlternateNameDao, setCityDao, setCommitFlushMode, setCountryDao, setGisFeatureDao, setIDaos, setSolRSynchroniser, setup, shouldBeSkipped, shouldIgnoreComments, shouldIgnoreFirstLine, tearDown`

    - ### Methods inherited from class com.gisgraphy.importer.AbstractSimpleImporterProcessor

      `checkNumberOfColumn, commit, countLines, decrementReadedFileLine, dumpFields, getCurrentFileName, getNumberOfLinesToProcess, getReadFileLine, getStatus, getStatusMessage, getTotalReadLine, incrementReadedFileLine, isEmptyField, isEndOfDocument, needCommit, onFileProcessed, process, processError, readLineAndProcessData, resetStatus, rollbackTransaction, setImporterConfig, setInternationalisationService, setTransactionManager, startTransaction`

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

  - ### Constructor Detail

    - #### GeonamesAdm1Importer

          public GeonamesAdm1Importer()

  - ### Method Detail

    - #### getFiles

          protected File[] getFiles()

      Overrides:
        `getFiles` in class `GeonamesFeatureSimpleImporter`
      Returns:
        The files to be process
      See Also:
        `ImporterHelper`

    - #### isAdmMode

          protected boolean isAdmMode()

      Overrides:
        `isAdmMode` in class `GeonamesFeatureSimpleImporter`

    - #### getMaxInsertsBeforeFlush

          protected int getMaxInsertsBeforeFlush()

      Overrides:
        `getMaxInsertsBeforeFlush` in class `AbstractSimpleImporterProcessor`
      Returns:
        The option
      See Also:
        `ImporterConfig.setMaxInsertsBeforeFlush(int)`

    - #### rollback

          public List<NameValueDTO<Integer>> rollback()

      Description copied from interface: `IImporterProcessor`
      /!\ 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 `IImporterProcessor`
      Overrides:
        `rollback` in class `GeonamesFeatureSimpleImporter`
      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 except if an error occurred during the deletion.

Copyright © 2015. All rights reserved.