Package org.apache.calcite.adapter.file
Class FileRowConverter
- java.lang.Object
-
- org.apache.calcite.adapter.file.FileRowConverter
-
class FileRowConverter extends java.lang.Object
FileRowConverter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
FileRowConverter.CellReader
Parses an an HTML table cell.private class
FileRowConverter.FieldDef
Responsible for managing field (column) definition, and for converting an Element to a java data type.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
fieldConfigs
private java.util.List<FileRowConverter.FieldDef>
fields
private FileReader
fileReader
private boolean
initialized
private java.text.NumberFormat
integerFormat
Format for parsing integers.private java.text.NumberFormat
numberFormat
Format for parsing numbers.
-
Constructor Summary
Constructors Constructor Description FileRowConverter(FileReader fileReader, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> fieldConfigs)
Creates a FileRowConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addFieldDef(java.lang.String name, FileFieldType type, java.util.Map<java.lang.String,java.lang.Object> config, int sourceCol)
(package private) RelDataType
getRowType(JavaTypeFactory typeFactory)
private void
initialize()
(package private) java.lang.Object
toRow(org.jsoup.select.Elements rowElements, int[] projection)
Converts a row of JSoup Elements to an array of java objects.(package private) int
width()
-
-
-
Field Detail
-
fileReader
private final FileReader fileReader
-
fieldConfigs
private final java.util.List<java.util.Map<java.lang.String,java.lang.Object>> fieldConfigs
-
initialized
private boolean initialized
-
fields
private final java.util.List<FileRowConverter.FieldDef> fields
-
numberFormat
private final java.text.NumberFormat numberFormat
Format for parsing numbers. Not thread-safe, but we assume that only one thread uses this converter at a time.
-
integerFormat
private final java.text.NumberFormat integerFormat
Format for parsing integers. Not thread-safe, but we assume that only one thread uses this converter at a time.
-
-
Constructor Detail
-
FileRowConverter
FileRowConverter(FileReader fileReader, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> fieldConfigs)
Creates a FileRowConverter.
-
-
Method Detail
-
initialize
private void initialize()
-
addFieldDef
private void addFieldDef(java.lang.String name, FileFieldType type, java.util.Map<java.lang.String,java.lang.Object> config, int sourceCol)
-
toRow
java.lang.Object toRow(org.jsoup.select.Elements rowElements, int[] projection)
Converts a row of JSoup Elements to an array of java objects.
-
width
int width()
-
getRowType
RelDataType getRowType(JavaTypeFactory typeFactory)
-
-