com.gisgraphy.importer
Class GeonamesAdm3Importer

java.lang.Object
  extended by com.gisgraphy.importer.AbstractSimpleImporterProcessor
      extended by com.gisgraphy.importer.GeonamesFeatureSimpleImporter
          extended by com.gisgraphy.importer.GeonamesAdm3Importer
All Implemented Interfaces:
IImporterProcessor

public class GeonamesAdm3Importer
extends GeonamesFeatureSimpleImporter

Import the Adm of level 3 file. It is the first step of the adm3 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
GeonamesAdm3Importer()
           
 
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

GeonamesAdm3Importer

public GeonamesAdm3Importer()
Method Detail

isAdmMode

protected boolean isAdmMode()
Overrides:
isAdmMode in class GeonamesFeatureSimpleImporter

getFiles

protected File[] getFiles()
Overrides:
getFiles in class GeonamesFeatureSimpleImporter
Returns:
The files to be process
See Also:
ImporterHelper

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