com.gisgraphy.importer
Interface IImporterProcessor

All Known Implementing Classes:
AbstractAdvancedImporterProcessor, AbstractFileRetriever, AbstractSimpleImporterProcessor, AdmExtracter, GeonamesAdm1Importer, GeonamesAdm2Importer, GeonamesAdm3Importer, GeonamesAdm4Importer, GeonamesAdmExtracter, GeonamesAlternateNamesAdmImporter, GeonamesAlternateNamesExtracter, GeonamesAlternateNamesSimpleImporter, GeonamesCountryImporter, GeonamesDatabaseIndexer, GeonamesFeatureSimpleImporter, GeonamesFileRetriever, GeonamesLanguageImporter, GeonamesZipCodeFileRetriever, GeonamesZipCodeSimpleImporter, OpenStreetMapFileRetriever, OpenStreetMapFulltextBuilder, OpenStreetMapSimpleImporter

public interface IImporterProcessor

Interface for Geonames processor

Author:
David Masclet

Method Summary
 String getCurrentFileName()
           
 long getNumberOfLinesToProcess()
           
 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()
          /!
 boolean shouldBeSkipped()
           
 

Method Detail

process

void process()
Do the stuff...


getReadFileLine

long getReadFileLine()
The number of read line for the current processed file

See Also:
getTotalReadLine()

getTotalReadLine

long getTotalReadLine()
The number of read line for all the processed file

See Also:
getReadFileLine()

getCurrentFileName

String getCurrentFileName()
Returns:
The name of the file currently processed or null if no file is processed

getNumberOfLinesToProcess

long getNumberOfLinesToProcess()
Returns:
The number of line the processor will process. (it is not the number of lines left!)

getStatus

ImporterStatus getStatus()
Returns:
The current status of the importer

getStatusMessage

String getStatusMessage()
Returns:
A text Message for the importer

rollback

List<NameValueDTO<Integer>> rollback()
/!\ USE THIS METHOD VERY CAREFULLY /!\ : If you call this function, all the imported data for the specified importer will be deleted

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.

shouldBeSkipped

boolean shouldBeSkipped()
Returns:
true if the processor should Not be executed

resetStatus

void resetStatus()
Reset status fields, it should be done when the import has been canceled



Copyright © 2012. All Rights Reserved.