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 GeonamesAdm2Importer

    java.lang.Object
      com.gisgraphy.importer.AbstractSimpleImporterProcessor
          com.gisgraphy.importer.GeonamesFeatureSimpleImporter
              com.gisgraphy.importer.GeonamesAdm2Importer

All Implemented Interfaces:
  IImporterProcessor

    public class GeonamesAdm2Importer

extends GeonamesFeatureSimpleImporter

Import the Adm of level 2 file. It is the first step of the adm2 import process, the import will be complete when all the datastore object will be updated by the `GeonamesFeatureSimpleImporter`

Author:
  David Masclet

Field Summary

Fields inherited from class com.gisgraphy.importer.GeonamesFeatureSimpleImporter
`acceptedPatterns, admDao, alternateNameDao, cityDao, countryDao, gisFeatureDao, iDaos, solRSynchroniser`

Fields inherited from class com.gisgraphy.importer.AbstractSimpleImporterProcessor
`COMMENT_START, currentFile, importerConfig, in, internationalisationService, logger, readFileLine, status, statusMessage, totalReadLine, transactionManager, txDefinition, txStatus`

Constructor Summary
`GeonamesAdm2Importer()`

Method Summary
`protected File[]` | `getFiles()`
`protected int` | `getMaxInsertsBeforeFlush()`
`protected boolean` | `isAdmMode()`
`List<NameValueDTO<Integer>>` | `rollback()` /!

Methods inherited from class com.gisgraphy.importer.GeonamesFeatureSimpleImporter
`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`

Constructor Detail

### GeonamesAdm2Importer

    public GeonamesAdm2Importer()

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.

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.