public class OpenStreetMapHouseNumberSimpleImporter extends AbstractSimpleImporterProcessor
Modifier and Type | Field and Description |
---|---|
protected com.gisgraphy.fulltext.IFullTextSearchEngine |
fullTextSearchEngine |
protected IhouseNumberDao |
houseNumberDao |
protected static org.slf4j.Logger |
logger |
protected static com.gisgraphy.domain.valueobject.Output |
MEDIUM_OUTPUT |
protected IOpenStreetMapDao |
openStreetMapDao |
protected static double |
SEARCH_DISTANCE |
protected ISolRSynchroniser |
solRSynchroniser |
COMMENT_START, currentFile, importerConfig, in, internationalisationService, readFileLine, status, statusMessage, totalReadLine, transactionManager, txDefinition, txStatus
Constructor and Description |
---|
OpenStreetMapHouseNumberSimpleImporter() |
Modifier and Type | Method and Description |
---|---|
protected HouseNumber |
buildHouseNumberFromAssociatedHouseNumber(AssociatedStreetMember houseMember) |
protected OpenStreetMap |
findNearestStreet(String streetName,
com.vividsolutions.jts.geom.Point location) |
protected void |
flushAndClear()
Should flush and clear all the Daos that are used by the processor.
|
protected File[] |
getFiles() |
protected OpenStreetMap |
getNearestByIds(List<com.gisgraphy.fulltext.SolrResponseDto> results,
com.vividsolutions.jts.geom.Point point) |
protected int |
getNumberOfColumns() |
protected AssociatedStreetHouseNumber |
parseAssociatedStreetHouseNumber(String line) |
protected InterpolationHouseNumber |
parseInterpolationHouseNumber(String line) |
protected NodeHouseNumber |
parseNodeHouseNumber(String line) |
protected void |
processAssociatedStreet(AssociatedStreetHouseNumber house) |
protected void |
processData(String line)
Process a read line of the geonames file, must be implemented by the
concrete class
|
protected List<HouseNumber> |
processInterpolationHouseNumber(InterpolationHouseNumber house) |
protected HouseNumber |
processNodeHouseNumber(NodeHouseNumber house) |
List<NameValueDTO<Integer>> |
rollback()
/!
|
protected List<com.vividsolutions.jts.geom.Point> |
segmentize(List<com.vividsolutions.jts.geom.Point> points,
int nbInnerPoint) |
protected void |
setCommitFlushMode()
Will flush after every commit
|
void |
setFullTextSearchEngine(com.gisgraphy.fulltext.IFullTextSearchEngine fullTextSearchEngine) |
void |
setHouseNumberDao(IhouseNumberDao houseNumberDao) |
void |
setOpenStreetMapDao(IOpenStreetMapDao openStreetMapDao) |
void |
setSolRSynchroniser(ISolRSynchroniser solRSynchroniser) |
protected 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.
|
checkNumberOfColumn, commit, countLines, decrementReadedFileLine, dumpFields, getCurrentFileName, getMaxInsertsBeforeFlush, getNumberOfLinesToProcess, getReadFileLine, getStatus, getStatusMessage, getTotalReadLine, incrementReadedFileLine, isEmptyField, isEndOfDocument, needCommit, onFileProcessed, process, processError, readLineAndProcessData, resetStatus, rollbackTransaction, setImporterConfig, setInternationalisationService, setTransactionManager, startTransaction
protected static final org.slf4j.Logger logger
protected IOpenStreetMapDao openStreetMapDao
protected IhouseNumberDao houseNumberDao
protected ISolRSynchroniser solRSynchroniser
protected com.gisgraphy.fulltext.IFullTextSearchEngine fullTextSearchEngine
protected static final com.gisgraphy.domain.valueobject.Output MEDIUM_OUTPUT
protected static final double SEARCH_DISTANCE
public OpenStreetMapHouseNumberSimpleImporter()
protected void flushAndClear()
AbstractSimpleImporterProcessor
flushAndClear
in class AbstractSimpleImporterProcessor
protected void setup()
AbstractSimpleImporterProcessor
setup
in class AbstractSimpleImporterProcessor
protected File[] getFiles()
getFiles
in class AbstractSimpleImporterProcessor
ImporterHelper
protected int getNumberOfColumns()
getNumberOfColumns
in class AbstractSimpleImporterProcessor
protected AssociatedStreetHouseNumber parseAssociatedStreetHouseNumber(String line)
protected InterpolationHouseNumber parseInterpolationHouseNumber(String line)
protected NodeHouseNumber parseNodeHouseNumber(String line)
protected void processData(String line) throws ImporterException
AbstractSimpleImporterProcessor
processData
in class AbstractSimpleImporterProcessor
line
- the line to processImporterException
protected void processAssociatedStreet(AssociatedStreetHouseNumber house)
protected HouseNumber processNodeHouseNumber(NodeHouseNumber house)
protected List<HouseNumber> processInterpolationHouseNumber(InterpolationHouseNumber house)
protected OpenStreetMap findNearestStreet(String streetName, com.vividsolutions.jts.geom.Point location)
protected OpenStreetMap getNearestByIds(List<com.gisgraphy.fulltext.SolrResponseDto> results, com.vividsolutions.jts.geom.Point point)
protected HouseNumber buildHouseNumberFromAssociatedHouseNumber(AssociatedStreetMember houseMember)
protected List<com.vividsolutions.jts.geom.Point> segmentize(List<com.vividsolutions.jts.geom.Point> points, int nbInnerPoint)
points
- a list of point, typically a list of point that represent a streetnbInnerPoint
- the number of point to add beetween the startpoint and the endpointpublic boolean shouldBeSkipped()
shouldBeSkipped
in interface IImporterProcessor
shouldBeSkipped
in class AbstractSimpleImporterProcessor
protected void setCommitFlushMode()
AbstractSimpleImporterProcessor
setCommitFlushMode
in class AbstractSimpleImporterProcessor
AbstractSimpleImporterProcessor.flushAndClear()
protected boolean shouldIgnoreComments()
AbstractSimpleImporterProcessor
shouldIgnoreComments
in class AbstractSimpleImporterProcessor
AbstractSimpleImporterProcessor.COMMENT_START
protected boolean shouldIgnoreFirstLine()
AbstractSimpleImporterProcessor
shouldIgnoreFirstLine
in class AbstractSimpleImporterProcessor
public List<NameValueDTO<Integer>> rollback()
IImporterProcessor
protected void tearDown()
AbstractSimpleImporterProcessor
tearDown
in class AbstractSimpleImporterProcessor
public void setHouseNumberDao(IhouseNumberDao houseNumberDao)
public void setOpenStreetMapDao(IOpenStreetMapDao openStreetMapDao)
public void setFullTextSearchEngine(com.gisgraphy.fulltext.IFullTextSearchEngine fullTextSearchEngine)
public void setSolRSynchroniser(ISolRSynchroniser solRSynchroniser)
Copyright © 2015. All rights reserved.