Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.domain.geoloc.importer
Class ImporterManager

    java.lang.Object
      com.gisgraphy.domain.geoloc.importer.ImporterManager

All Implemented Interfaces:
  IImporterManager

    public class ImporterManager

extends java.lang.Object
implements IImporterManager

Do the importing stuff

Author:
  David Masclet

Field Summary
`protected static org.slf4j.Logger` | `logger` The logger

Constructor Summary
`ImporterManager()`

Method Summary
`java.lang.String` | `getFormatedTimeElapsed()`
`ImporterConfig` | `getImporterConfig()`
`java.util.List<IGeonamesProcessor>` | `getImporters()`
`java.util.List<ImporterStatusDto>` | `getStatusDtoList()`
`long` | `getTimeElapsed()`
`void` | `importAll()` synchronized method to Import all the GisFeatures according the `ImporterConfig` and the several importers define in the applicationContext-geoloc file.
`boolean` | `isAlreadyDone()`
`boolean` | `isInProgress()`
`java.util.List<NameValueDTO<java.lang.Integer>>` | `resetImport()` /!
`void` | `setIDaos(IGisDao<? extends GisFeature>[] daos)`
`void` | `setImporterConfig(ImporterConfig importerConfig)`
`void` | `setImporters(java.util.List<IGeonamesProcessor> importers)`
`void` | `setImporterStatusListDao(IImporterStatusListDao importerStatusListDao)`
`void` | `setSolRSynchroniser(ISolRSynchroniser solRSynchroniser)`

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

Constructor Detail

### ImporterManager

    public ImporterManager()

Method Detail

### importAll

    public void importAll()

  Description copied from interface: `IImporterManager`
  synchronized method to Import all the GisFeatures according the `ImporterConfig` and the several importers define in the applicationContext-geoloc file.

  Specified by:
    `importAll` in interface `IImporterManager`

### getStatusDtoList

    public java.util.List<ImporterStatusDto> getStatusDtoList()

  Specified by:
    `getStatusDtoList` in interface `IImporterManager`
  Returns:
    a list of DTO for each importers

### getImporters

    public java.util.List<IGeonamesProcessor> getImporters()

  Specified by:
    `getImporters` in interface `IImporterManager`
  Returns:
    the importers

### getImporterConfig

    public ImporterConfig getImporterConfig()

  Specified by:
    `getImporterConfig` in interface `IImporterManager`
  Returns:
    the importerConfig

### getTimeElapsed

    public long getTimeElapsed()

  Specified by:
    `getTimeElapsed` in interface `IImporterManager`
  Returns:
    the time the last import took. If the import is in progress, returns the time it took from the beginning. If the import has not been started yet return 0.

### getFormatedTimeElapsed

    public java.lang.String getFormatedTimeElapsed()

  Specified by:
    `getFormatedTimeElapsed` in interface `IImporterManager`
  Returns:
    The human readable elapsed time .

### isInProgress

    public boolean isInProgress()

  Specified by:
    `isInProgress` in interface `IImporterManager`
  Returns:
    Wether an import is in Progress

### isAlreadyDone

    public boolean isAlreadyDone()

  Specified by:
    `isAlreadyDone` in interface `IImporterManager`
  Returns:
    Wether the import has already been done (error or successful)

### resetImport

    public java.util.List<NameValueDTO<java.lang.Integer>> resetImport()

  Description copied from interface: `IImporterManager`
  /!\ USE THIS METHOD VERY CAREFULLY /!\ : If you call this function, all the imported data will be deleted clear all the tables with GisFeature (and subclass, adm, languages, country,...), delete alternatenames, delete all the fulltext search engine entries, in order to re-run a new import from scratch

  Specified by:
    `resetImport` in interface `IImporterManager`
  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.

### setSolRSynchroniser

    public void setSolRSynchroniser(ISolRSynchroniser solRSynchroniser)

  Parameters:
    `solRSynchroniser` - the solRSynchroniser to set

### setImporterConfig

    public void setImporterConfig(ImporterConfig importerConfig)

  Parameters:
    `importerConfig` - The `ImporterConfig` to set

### setImporters

    public void setImporters(java.util.List<IGeonamesProcessor> importers)

  Parameters:
    `importers` - The importers to process

### setIDaos

    public void setIDaos(IGisDao<? extends GisFeature>[] daos)

  Parameters:
    `daos` - the iDaos to set

### setImporterStatusListDao

    public void setImporterStatusListDao(IImporterStatusListDao importerStatusListDao)

  Parameters:
    `importerStatusListDao` - the importerStatusListDao to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.