|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gisgraphy.domain.geoloc.importer.AbstractImporterProcessor
com.gisgraphy.domain.geoloc.importer.GeonamesFeatureImporter
public class GeonamesFeatureImporter
Import the Features from a Geonames dump file.
Field Summary |
---|
Fields inherited from class com.gisgraphy.domain.geoloc.importer.AbstractImporterProcessor |
---|
COMMENT_START, currentFile, importerConfig, in, internationalisationService, logger, readFileLine, status, statusMessage, totalReadLine, transactionManager |
Constructor Summary | |
---|---|
GeonamesFeatureImporter()
Default constructor |
Method Summary | |
---|---|
protected void |
flushAndClear()
Should flush and clear all the Daos that are used by the processor. |
protected java.io.File[] |
getFiles()
|
protected int |
getNumberOfColumns()
|
protected void |
processData(java.lang.String line)
Process a read line of the geonames file, must be implemented by the concrete class |
java.util.List<NameValueDTO<java.lang.Integer>> |
rollback()
/! |
void |
setAdmDao(IAdmDao admDao)
|
void |
setAlternateNameDao(IAlternateNameDao alternateNameDao)
|
void |
setCityDao(ICityDao cityDao)
|
protected void |
setCommitFlushMode()
Will flush after every commit |
void |
setCountryDao(ICountryDao countryDao)
|
void |
setGisFeatureDao(IGisFeatureDao gisFeatureDao)
|
void |
setIDaos(IGisDao<? extends GisFeature>[] daos)
|
void |
setSolRSynchroniser(ISolRSynchroniser solRSynchroniser)
|
void |
setup()
Template method that can be override. |
boolean |
shouldBeSkipped()
|
protected boolean |
shouldIgnoreComments()
Whether the filter should ignore the comments (i.e. lines starting with #) |
protected boolean |
shouldIgnoreFirstLine()
Template Method : Whether the processor should ignore the first line of the input |
protected void |
tearDown()
Template method that can be override. |
Methods inherited from class com.gisgraphy.domain.geoloc.importer.AbstractImporterProcessor |
---|
checkNumberOfColumn, countLines, dumpFields, getCurrentFileName, getMaxInsertsBeforeFlush, getNumberOfLinesToProcess, getReadFileLine, getStatus, getStatusMessage, getTotalReadLine, isEmptyField, isEndOfDocument, process, readLineAndProcessData, resetStatus, setImporterConfig, setInternationalisationService, setTransactionManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeonamesFeatureImporter()
Method Detail |
---|
protected void processData(java.lang.String line)
AbstractImporterProcessor
processData
in class AbstractImporterProcessor
line
- the line to processpublic boolean shouldBeSkipped()
shouldBeSkipped
in interface IImporterProcessor
shouldBeSkipped
in class AbstractImporterProcessor
protected boolean shouldIgnoreFirstLine()
AbstractImporterProcessor
shouldIgnoreFirstLine
in class AbstractImporterProcessor
protected boolean shouldIgnoreComments()
AbstractImporterProcessor
shouldIgnoreComments
in class AbstractImporterProcessor
AbstractImporterProcessor.COMMENT_START
protected void setCommitFlushMode()
AbstractImporterProcessor
setCommitFlushMode
in class AbstractImporterProcessor
AbstractImporterProcessor.flushAndClear()
protected void flushAndClear()
AbstractImporterProcessor
flushAndClear
in class AbstractImporterProcessor
protected int getNumberOfColumns()
getNumberOfColumns
in class AbstractImporterProcessor
public void setCityDao(ICityDao cityDao)
cityDao
- The CityDao to setpublic void setAlternateNameDao(IAlternateNameDao alternateNameDao)
alternateNameDao
- The alternateNameDao to setpublic void setGisFeatureDao(IGisFeatureDao gisFeatureDao)
gisFeatureDao
- The GisFeatureDao to setpublic void setAdmDao(IAdmDao admDao)
admDao
- the admDao to setpublic void setup()
AbstractImporterProcessor
setup
in class AbstractImporterProcessor
protected void tearDown()
AbstractImporterProcessor
tearDown
in class AbstractImporterProcessor
public void setCountryDao(ICountryDao countryDao)
countryDao
- The countryDao to setprotected java.io.File[] getFiles()
getFiles
in class AbstractImporterProcessor
ImporterHelper
public void setSolRSynchroniser(ISolRSynchroniser solRSynchroniser)
solRSynchroniser
- the solRSynchroniser to setpublic void setIDaos(IGisDao<? extends GisFeature>[] daos)
daos
- the iDaos to setpublic java.util.List<NameValueDTO<java.lang.Integer>> rollback()
IImporterProcessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |