public class LineImportProcessor extends ImporterProcessor
| Modifier and Type | Field and Description |
|---|---|
protected Object |
currentLine |
protected Map |
currentRow |
protected Object |
headerLine |
protected LineReader |
lineReader |
protected LineImporterSpec |
spec |
cancelled, errorCount, importer, lastError, rowCount| Constructor and Description |
|---|
LineImportProcessor(LineImporterSpec spec,
Importer importer) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getCurrentLine()
the current row/line itself as it came from the LineReader
|
Map |
getCurrentRow()
the current row/line itself as it was transferred to a map
|
protected Object |
getHeaderLine() |
LineReader |
getLineReader() |
LineImporterSpec |
getSpec() |
void |
importFrom(Closeable aReader)
API - this method starts the import process.
|
protected void |
importRow(Object aLine)
import a record from the file and do what is required with the data.
|
void |
release() |
void |
setCurrentLine(Object currentLine) |
void |
setCurrentRow(Map currentRow) |
protected void |
setFieldValue(int fieldIdx,
Object singleValue) |
void |
setHeaderLine(Object headerLine) |
void |
setLineReader(LineReader lineReader) |
protected Map |
transferRow(Object aRecord)
parse a specified record and save the record data in the root model.
|
getErrorCount, getErrorWriter, getImporter, getLastError, getRowCount, handleException, handleRowException, isCancelled, log, logFinished, setCancelled, setErrorWriter, setLastErrorprotected final LineImporterSpec spec
protected LineReader lineReader
protected Object headerLine
protected Object currentLine
protected Map currentRow
public LineImportProcessor(LineImporterSpec spec, Importer importer)
public LineImporterSpec getSpec()
getSpec in class ImporterProcessorpublic void importFrom(Closeable aReader) throws ImporterException
importFrom in class ImporterProcessoraReader - - reader to read the import data from.ExceptionImporterExceptionprotected void importRow(Object aLine) throws ImporterException
aLine - - a line of data of one recordImporterExceptionpublic void release()
release in class ImporterProcessorprotected Map transferRow(Object aRecord) throws IOException
IOExceptionprotected void setFieldValue(int fieldIdx,
Object singleValue)
protected Object getHeaderLine()
public Map getCurrentRow()
public LineReader getLineReader()
public Object getCurrentLine()
public void setCurrentLine(Object currentLine)
public void setLineReader(LineReader lineReader)
public void setHeaderLine(Object headerLine)
public void setCurrentRow(Map currentRow)
Copyright © 2008-2016. All Rights Reserved.