|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gisgraphy.importer.AbstractSimpleImporterProcessor
com.gisgraphy.importer.GeonamesFeatureSimpleImporter
public class GeonamesFeatureSimpleImporter
Import the Features from a Geonames dump file.
Field Summary | |
---|---|
protected List<Pattern> |
acceptedPatterns
|
protected IAdmDao |
admDao
|
protected IAlternateNameDao |
alternateNameDao
|
protected ICityDao |
cityDao
|
protected ICountryDao |
countryDao
|
protected IGisFeatureDao |
gisFeatureDao
|
protected IGisDao<? extends GisFeature>[] |
iDaos
|
protected ISolRSynchroniser |
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 | |
---|---|
GeonamesFeatureSimpleImporter()
Default constructor |
Method Summary | |
---|---|
protected void |
flushAndClear()
Should flush and clear all the Daos that are used by the processor. |
protected File[] |
getFiles()
|
protected int |
getNumberOfColumns()
|
protected boolean |
isAdmMode()
|
protected Adm |
processAdm(String[] fields,
GisFeature gisFeature)
|
protected void |
processData(String line)
Process a read line of the geonames file, must be implemented by the concrete class |
List<NameValueDTO<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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ICityDao cityDao
protected IGisFeatureDao gisFeatureDao
protected IAlternateNameDao alternateNameDao
protected IAdmDao admDao
protected ICountryDao countryDao
protected List<Pattern> acceptedPatterns
protected ISolRSynchroniser solRSynchroniser
protected IGisDao<? extends GisFeature>[] iDaos
Constructor Detail |
---|
public GeonamesFeatureSimpleImporter()
Method Detail |
---|
protected void processData(String line)
AbstractSimpleImporterProcessor
processData
in class AbstractSimpleImporterProcessor
line
- the line to processprotected boolean isAdmMode()
protected Adm processAdm(String[] fields, GisFeature gisFeature)
public boolean shouldBeSkipped()
shouldBeSkipped
in interface IImporterProcessor
shouldBeSkipped
in class AbstractSimpleImporterProcessor
protected boolean shouldIgnoreFirstLine()
AbstractSimpleImporterProcessor
shouldIgnoreFirstLine
in class AbstractSimpleImporterProcessor
protected boolean shouldIgnoreComments()
AbstractSimpleImporterProcessor
shouldIgnoreComments
in class AbstractSimpleImporterProcessor
AbstractSimpleImporterProcessor.COMMENT_START
protected void setCommitFlushMode()
AbstractSimpleImporterProcessor
setCommitFlushMode
in class AbstractSimpleImporterProcessor
AbstractSimpleImporterProcessor.flushAndClear()
protected void flushAndClear()
AbstractSimpleImporterProcessor
flushAndClear
in class AbstractSimpleImporterProcessor
protected int getNumberOfColumns()
getNumberOfColumns
in class AbstractSimpleImporterProcessor
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()
AbstractSimpleImporterProcessor
setup
in class AbstractSimpleImporterProcessor
protected void tearDown()
AbstractSimpleImporterProcessor
tearDown
in class AbstractSimpleImporterProcessor
public void setCountryDao(ICountryDao countryDao)
countryDao
- The countryDao to setprotected File[] getFiles()
getFiles
in class AbstractSimpleImporterProcessor
ImporterHelper
public void setSolRSynchroniser(ISolRSynchroniser solRSynchroniser)
solRSynchroniser
- the solRSynchroniser to setpublic void setIDaos(IGisDao<? extends GisFeature>[] daos)
daos
- the iDaos to setpublic List<NameValueDTO<Integer>> rollback()
IImporterProcessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |