com.agimatec.utility.fileimport.spreadsheet
Class ExcelImporterSpec

java.lang.Object
  extended by com.agimatec.utility.fileimport.LineImporterSpec
      extended by com.agimatec.utility.fileimport.LineImporterSpecAutoFields
          extended by com.agimatec.utility.fileimport.spreadsheet.ExcelImporterSpec
All Implemented Interfaces:
ImporterSpec

public abstract class ExcelImporterSpec
extends LineImporterSpecAutoFields

Description: Convenience ImporterSpec for importing Excel spreadsheets. Subclass this and implement the method 'processRow(ExcelImportProcessor processor)' to handle the row.

User: roman.stumm
Date: 23.05.13
Time: 15:54
viaboxx GmbH, 2013

Since:
2.5.13
See Also:
Examples using this class with SharedExcelRowReaderFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class com.agimatec.utility.fileimport.LineImporterSpec
LineImporterSpec.Header
 
Field Summary
 
Fields inherited from class com.agimatec.utility.fileimport.LineImporterSpec
log
 
Constructor Summary
ExcelImporterSpec(String sheetName)
           
ExcelImporterSpec(String sheetName, LineTokenizerFactory<ExcelRow,ExcelCell> excelRowTokenizerFactory)
           
 
Method Summary
 LineReader createLineReader(Closeable aReader)
          initialize the lineReader. overwrite in subclasses if required
 ImporterProcessor createProcessor(Importer importer)
          factory method - create a processor capable to process the data to be imported.
 String getSheetName()
           
protected abstract  void processRow(ExcelImportProcessor processor)
           
 void processRow(LineImportProcessor processor)
          overwrite this method to get the behavior after a row has been completly transfered.
 
Methods inherited from class com.agimatec.utility.fileimport.LineImporterSpecAutoFields
processHeaderLine
 
Methods inherited from class com.agimatec.utility.fileimport.LineImporterSpec
getErrorWriter, getFieldName, getFieldNames, getHeaderLineIndex, getHeaderSpec, getLineTokenizerFactory, setErrorWriter, setFieldNames, setHeaderLineIndex, setHeaderSpec, setLineTokenizerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelImporterSpec

public ExcelImporterSpec(String sheetName)

ExcelImporterSpec

public ExcelImporterSpec(String sheetName,
                         LineTokenizerFactory<ExcelRow,ExcelCell> excelRowTokenizerFactory)
Method Detail

getSheetName

public String getSheetName()

createLineReader

public LineReader createLineReader(Closeable aReader)
                            throws IOException
Description copied from class: LineImporterSpec
initialize the lineReader. overwrite in subclasses if required

Overrides:
createLineReader in class LineImporterSpec
Throws:
IOException

processRow

public void processRow(LineImportProcessor processor)
                throws ImporterException
Description copied from class: LineImporterSpec
overwrite this method to get the behavior after a row has been completly transfered.

Overrides:
processRow in class LineImporterSpec
Throws:
ImporterException

processRow

protected abstract void processRow(ExcelImportProcessor processor)

createProcessor

public ImporterProcessor createProcessor(Importer importer)
Description copied from interface: ImporterSpec
factory method - create a processor capable to process the data to be imported.

Specified by:
createProcessor in interface ImporterSpec
Overrides:
createProcessor in class LineImporterSpec
Returns:


Copyright © 2008-2015. All Rights Reserved.