com.gisgraphy.domain.valueobject
Class ImporterStatusDto

java.lang.Object
  extended by com.gisgraphy.domain.valueobject.ImporterStatusDto

public class ImporterStatusDto
extends java.lang.Object

Represents a status of an IgeonamesProcessor

Author:
David Masclet
See Also:
ImporterStatus

Field Summary
static java.lang.String CSV_FIELD_SEPARATOR
          The csv field separator (we have chosen a very improbable one)
static java.lang.String CSV_LINE_SEPARATOR
          The csv line separator
static java.lang.String DEFAULT_CURRENT_FILE
          the default value of the currentFile if it is null
 
Constructor Summary
ImporterStatusDto(IImporterProcessor processor)
           
ImporterStatusDto(java.lang.String csv)
          Construct a ImporterStatusDto from a csv line
ImporterStatusDto(java.lang.String processorName, java.lang.String currentFileName, long currentLine, long numberOfLineToProcess, long numberOfLineProcessed, java.lang.String statusMessage, ImporterStatus status)
           
 
Method Summary
 java.lang.String getCurrentFileName()
           
 long getCurrentLine()
           
 long getNumberOfLinelefts()
           
 long getNumberOfLineProcessed()
           
 long getNumberOfLineToProcess()
           
 int getPercent()
           
 java.lang.String getProcessorName()
           
 ImporterStatus getStatus()
           
 java.lang.String getStatusMessage()
           
 java.lang.String toCSV()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSV_LINE_SEPARATOR

public static final java.lang.String CSV_LINE_SEPARATOR
The csv line separator

See Also:
toCSV(), Constant Field Values

CSV_FIELD_SEPARATOR

public static final java.lang.String CSV_FIELD_SEPARATOR
The csv field separator (we have chosen a very improbable one)

See Also:
toCSV(), Constant Field Values

DEFAULT_CURRENT_FILE

public static final java.lang.String DEFAULT_CURRENT_FILE
the default value of the currentFile if it is null

See Also:
Constant Field Values
Constructor Detail

ImporterStatusDto

public ImporterStatusDto(java.lang.String processorName,
                         java.lang.String currentFileName,
                         long currentLine,
                         long numberOfLineToProcess,
                         long numberOfLineProcessed,
                         java.lang.String statusMessage,
                         ImporterStatus status)
Parameters:
processorName - The name of the processor (typically the className)
currentFileName - wich file is currently processed
currentLine - which line of the currentFileName is processed
numberOfLineToProcess - the total of line to be process by the importer
numberOfLineProcessed - The total of line already process by this importer
statusMessage - a message
status -

ImporterStatusDto

public ImporterStatusDto(IImporterProcessor processor)

ImporterStatusDto

public ImporterStatusDto(java.lang.String csv)
Construct a ImporterStatusDto from a csv line

Parameters:
csv - the String that represent the ImporterStatusDto
Method Detail

getProcessorName

public java.lang.String getProcessorName()
Returns:
the processorName

getCurrentFileName

public java.lang.String getCurrentFileName()
Returns:
the currentFile

getCurrentLine

public long getCurrentLine()
Returns:
the currentLine

getNumberOfLineToProcess

public long getNumberOfLineToProcess()
Returns:
the numberOfLineToProcess

getNumberOfLineProcessed

public long getNumberOfLineProcessed()
Returns:
the numberOfLineProcessed

getPercent

public int getPercent()
Returns:
the percent

getStatus

public ImporterStatus getStatus()
Returns:
the status

getNumberOfLinelefts

public long getNumberOfLinelefts()
Returns:
the numberOfLinelefts

getStatusMessage

public java.lang.String getStatusMessage()
Returns:
the errorMessage

toCSV

public java.lang.String toCSV()


Copyright © 2010. All Rights Reserved.