com.gisgraphy.importer

## Class OpenStreetMapFulltextBuilder

- java.lang.Object
- - com.gisgraphy.importer.OpenStreetMapFulltextBuilder

- All Implemented Interfaces:
    IImporterProcessor

      public class OpenStreetMapFulltextBuilder
      extends Object
      implements IImporterProcessor

  build the fulltext engine in order to use the street fulltext search
  Author:
    David Masclet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `increment` The paginate step
    `protected static org.slf4j.Logger` | `logger` The logger
    `protected ImporterStatus` | `status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OpenStreetMapFulltextBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `flushAndClear()`
    `String` | `getCurrentFileName()`
    `ImporterConfig` | `getImporterConfig()`
    `long` | `getNumberOfLinesToProcess()`
    `IOpenStreetMapDao` | `getOpenStreetMapDao()`
    `long` | `getReadFileLine()` The number of read line for the current processed file
    `ImporterStatus` | `getStatus()`
    `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
    `List<NameValueDTO<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 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`
      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 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 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 © 2015. All rights reserved.