com.gisgraphy.domain.geoloc.importer
Class OpenStreetMapFulltextBuilder

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.importer.OpenStreetMapFulltextBuilder
All Implemented Interfaces:
IImporterProcessor

public class OpenStreetMapFulltextBuilder
extends java.lang.Object
implements IImporterProcessor

build the fulltext engine in order to use the street fulltext search

Author:
David Masclet

Field Summary
protected  int increment
          The paginate step
protected static org.slf4j.Logger logger
          The logger
protected  ImporterStatus status
           
 
Constructor Summary
OpenStreetMapFulltextBuilder()
           
 
Method Summary
protected  void flushAndClear()
           
 java.lang.String getCurrentFileName()
           
 ImporterConfig getImporterConfig()
           
 long getNumberOfLinesToProcess()
           
 IOpenStreetMapDao getOpenStreetMapDao()
           
 long getReadFileLine()
          The number of read line for the current processed file
 ImporterStatus getStatus()
           
 java.lang.String getStatusMessage()
           
 long getTotalReadLine()
          The number of read line for all the processed file
 void process()
          Do the stuff...
 void resetStatus()
          Reset status fields, it should be done when the import has been canceled
 java.util.List<NameValueDTO<java.lang.Integer>> rollback()
          /!
 void setImporterConfig(ImporterConfig importerConfig)
           
 void setInternationalisationService(IInternationalisationService internationalisationService)
           
 void setOpenStreetMapDao(IOpenStreetMapDao openStreetMapDao)
           
protected  void setup()
           
 boolean shouldBeSkipped()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.slf4j.Logger logger
The logger


increment

protected int increment
The paginate step


status

protected ImporterStatus status
Constructor Detail

OpenStreetMapFulltextBuilder

public OpenStreetMapFulltextBuilder()
Method Detail

flushAndClear

protected void flushAndClear()

rollback

public java.util.List<NameValueDTO<java.lang.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
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.

setOpenStreetMapDao

public void setOpenStreetMapDao(IOpenStreetMapDao openStreetMapDao)
Parameters:
openStreetMapDao - the openStreetMapDao to set

getCurrentFileName

public java.lang.String getCurrentFileName()
Specified by:
getCurrentFileName in interface IImporterProcessor
Returns:
The name of the file currently processed or null if no file is processed

getNumberOfLinesToProcess

public long getNumberOfLinesToProcess()
Specified by:
getNumberOfLinesToProcess in interface IImporterProcessor
Returns:
The number of line the processor will process. (it is not the number of lines left!)

getReadFileLine

public long getReadFileLine()
Description copied from interface: IImporterProcessor
The number of read line for the current processed file

Specified by:
getReadFileLine in interface IImporterProcessor
See Also:
IImporterProcessor.getTotalReadLine()

getStatus

public ImporterStatus getStatus()
Specified by:
getStatus in interface IImporterProcessor
Returns:
The current status of the importer

getStatusMessage

public java.lang.String getStatusMessage()
Specified by:
getStatusMessage in interface IImporterProcessor
Returns:
A text Message for the importer

getTotalReadLine

public long getTotalReadLine()
Description copied from interface: IImporterProcessor
The number of read line for all the processed file

Specified by:
getTotalReadLine in interface IImporterProcessor
See Also:
IImporterProcessor.getReadFileLine()

process

public void process()
Description copied from interface: IImporterProcessor
Do the stuff...

Specified by:
process in interface IImporterProcessor

setup

protected void setup()

resetStatus

public void resetStatus()
Description copied from interface: IImporterProcessor
Reset status fields, it should be done when the import has been canceled

Specified by:
resetStatus in interface IImporterProcessor

shouldBeSkipped

public boolean shouldBeSkipped()
Specified by:
shouldBeSkipped in interface IImporterProcessor
Returns:
true if the processor should Not be executed

getImporterConfig

public ImporterConfig getImporterConfig()

setImporterConfig

public void setImporterConfig(ImporterConfig importerConfig)

setInternationalisationService

public void setInternationalisationService(IInternationalisationService internationalisationService)

getOpenStreetMapDao

public IOpenStreetMapDao getOpenStreetMapDao()


Copyright © 2010. All Rights Reserved.