public class CSVParser extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,DateFormat> |
_dateFormatMap |
protected Map<String,DecimalFormat> |
_numberFormatMap |
protected CSVFileStorage |
csvStorage |
protected CSVDataSetDef |
dataSetDef |
static String |
DATE_FORMAT_EPOCH |
Constructor and Description |
---|
CSVParser(CSVDataSetDef def,
CSVFileStorage csvFileStorage) |
Modifier and Type | Method and Description |
---|---|
protected void |
_processLine(DataSet dataSet,
Object[] row,
String[] line,
List<Integer> columnIdxs) |
protected ColumnType |
calculateType(String columnId,
String value) |
protected boolean |
canBeParsedAsNumber(DecimalFormat parser,
String value) |
protected InputStream |
getCSVInputStream() |
protected DateFormat |
getDateFormat(String columnId) |
protected DecimalFormat |
getNumberFormat(String columnId) |
protected boolean |
isColumnIncluded(String columnId) |
protected DataSet |
load() |
protected Object |
parseValue(DataColumn column,
String value) |
public static final String DATE_FORMAT_EPOCH
protected transient Map<String,DateFormat> _dateFormatMap
protected transient Map<String,DecimalFormat> _numberFormatMap
protected CSVDataSetDef dataSetDef
protected CSVFileStorage csvStorage
public CSVParser(CSVDataSetDef def, CSVFileStorage csvFileStorage)
protected boolean isColumnIncluded(String columnId)
protected InputStream getCSVInputStream() throws Exception
Exception
protected ColumnType calculateType(String columnId, String value)
protected boolean canBeParsedAsNumber(DecimalFormat parser, String value)
protected void _processLine(DataSet dataSet, Object[] row, String[] line, List<Integer> columnIdxs) throws Exception
Exception
protected Object parseValue(DataColumn column, String value) throws Exception
Exception
protected DateFormat getDateFormat(String columnId)
protected DecimalFormat getNumberFormat(String columnId)
Copyright © 2017–2020 JBoss by Red Hat. All rights reserved.