com.agimatec.utility.fileimport.groovy
Class LineImporterSpecGroovy
java.lang.Object
com.agimatec.utility.fileimport.LineImporterSpec
com.agimatec.utility.fileimport.LineImporterSpecAutoFields
com.agimatec.utility.fileimport.groovy.LineImporterSpecGroovy
- All Implemented Interfaces:
- ImporterSpec
public class LineImporterSpecGroovy
- extends LineImporterSpecAutoFields
Description: This subclass makes it easy in a groovy script to
customize the processing-behavior of the importer
example 1:
def spec = new LineImporterSpecGroovy({ processor ->
println "inside header closure " + processor.headerLine;
},
{ processor ->
println "inside row closure " + processor.rowCount + ": " + processor.currentRow;
});
example 2:
def spec = new LineImporterSpecGroovy({ processor ->
println "inside row closure " + processor.rowCount + ": " + processor.currentRow;
});
User: roman.stumm
Date: 30.08.2007
Time: 10:57:42
Copyright: Agimatec GmbH
|
Method Summary |
void |
processHeaderLine(LineImportProcessor processorimporter)
this implementation assumes, that the first line
contains the header line with field names
separated by the same separator as the data lines. |
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.LineImporterSpec |
createLineReader, createProcessor, 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 |
LineImporterSpecGroovy
public LineImporterSpecGroovy(groovy.lang.Closure rowProcessing)
LineImporterSpecGroovy
public LineImporterSpecGroovy(groovy.lang.Closure headerProcessing,
groovy.lang.Closure rowProcessing)
processHeaderLine
public void processHeaderLine(LineImportProcessor processorimporter)
throws ImporterException
- Description copied from class:
LineImporterSpecAutoFields
- this implementation assumes, that the first line
contains the header line with field names
separated by the same separator as the data lines.
- Overrides:
processHeaderLine in class LineImporterSpecAutoFields
- Throws:
ImporterException
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
Copyright © 2008-2011. All Rights Reserved.