public interface RecordMetaData
Records parsed from the input.| Modifier and Type | Method and Description |
|---|---|
boolean |
containsColumn(java.lang.String headerName)
Queries whether a given header name exists in the
Records parsed from the input |
<T extends java.lang.Enum<T>> |
convertFields(java.lang.Class<T> enumType,
Conversion... conversions)
Associates a sequence of
Conversions to fields of a given set of fields |
FieldSet<java.lang.String> |
convertFields(Conversion... conversions)
Associates a sequence of
Conversions to fields of a given set of field names |
FieldSet<java.lang.Integer> |
convertIndexes(Conversion... conversions)
Associates a sequence of
Conversions to fields of a given set of column indexes |
java.lang.Object |
defaultValueOf(java.lang.Enum<?> column)
Returns the default value associated with a column (defined using
setDefaultValueOf(Column, Object)) |
java.lang.Object |
defaultValueOf(int columnIndex)
Returns the default value associated with a column (defined using
setDefaultValueOf(Column, Object)) |
java.lang.Object |
defaultValueOf(java.lang.String headerName)
Returns the default value associated with a column (defined using
setDefaultValueOf(Column, Object)) |
java.lang.String[] |
headers()
Returns the column names of the
Records parsed from the input. |
int |
indexOf(java.lang.Enum<?> column)
Returns the index of a given column
|
int |
indexOf(java.lang.String headerName)
Returns the index of a given column
|
java.lang.String[] |
selectedHeaders()
Returns the sequence of headers that have been selected.
|
<T> void |
setDefaultValueOfColumns(T defaultValue,
java.lang.Enum<?>... columns)
Associates a default value with one or more columns, in case the values contained are
null |
<T> void |
setDefaultValueOfColumns(T defaultValue,
int... columnIndexes)
Associates a default value with one or more columns, in case the values contained are
null |
<T> void |
setDefaultValueOfColumns(T defaultValue,
java.lang.String... headerNames)
Associates a default value with one or more columns, in case the values contained are
null |
void |
setTypeOfColumns(java.lang.Class<?> type,
java.lang.Enum... columns)
Associates a type with one or more column.
|
void |
setTypeOfColumns(java.lang.Class<?> type,
int... columnIndexes)
Associates a type with one or more column.
|
void |
setTypeOfColumns(java.lang.Class<?> type,
java.lang.String... headerNames)
Associates a type with one or more column.
|
java.lang.Class<?> |
typeOf(java.lang.Enum<?> column)
Returns the type associated with a given column, defined with the method
setTypeOfColumns(type, columns) |
java.lang.Class<?> |
typeOf(int columnIndex)
Returns the type associated with a given column, defined with the method
setTypeOfColumns(type, columns) |
java.lang.Class<?> |
typeOf(java.lang.String headerName)
Returns the type associated with a given column name, defined with the method
setTypeOfColumns(type, columns) |
int indexOf(java.lang.Enum<?> column)
column - the column whose index will be returnedint indexOf(java.lang.String headerName)
headerName - name of the column whose index will be returnedjava.lang.Class<?> typeOf(java.lang.Enum<?> column)
setTypeOfColumns(type, columns)column - the column whose type will be returnedjava.lang.Class<?> typeOf(java.lang.String headerName)
setTypeOfColumns(type, columns)headerName - name of the column whose type will be returnedjava.lang.Class<?> typeOf(int columnIndex)
setTypeOfColumns(type, columns)columnIndex - the position of the column whose type will be returnedvoid setTypeOfColumns(java.lang.Class<?> type,
java.lang.Enum... columns)
Record, e.g. Record.toFieldObjectMap(String...) will
convert the selected field values to their respective types, and then set the result as the values in the map.type - the type to associate with a list of columncolumns - the columns that will be associated with the given type.void setTypeOfColumns(java.lang.Class<?> type,
java.lang.String... headerNames)
Record, e.g. Record.toFieldObjectMap(String...) will
convert the selected field values to their respective types, and then set the result as the values in the map.type - the type to associate with a list of columnheaderNames - the columns that will be associated with the given type.void setTypeOfColumns(java.lang.Class<?> type,
int... columnIndexes)
Record, e.g. Record.toFieldObjectMap(String...) will
convert the selected field values to their respective types, and then set the result as the values in the map.type - the type to associate with a list of columncolumnIndexes - the columns that will be associated with the given type.<T> void setDefaultValueOfColumns(T defaultValue,
java.lang.Enum<?>... columns)
nullT - type of the default value.defaultValue - the value to be used for the given column when the parsed result is nullcolumns - the columns to be associated with a default value.<T> void setDefaultValueOfColumns(T defaultValue,
java.lang.String... headerNames)
nullT - type of the default value.defaultValue - the value to be used for the given column when the parsed result is nullheaderNames - the column names to be associated with a default value.<T> void setDefaultValueOfColumns(T defaultValue,
int... columnIndexes)
nullT - type of the default value.defaultValue - the value to be used for the given column when the parsed result is nullcolumnIndexes - the column indexes to be associated with a default value.java.lang.Object defaultValueOf(java.lang.Enum<?> column)
setDefaultValueOf(Column, Object))column - the column whose default value will be returnednull.java.lang.Object defaultValueOf(java.lang.String headerName)
setDefaultValueOf(Column, Object))headerName - the column name whose default value will be returnednull.java.lang.Object defaultValueOf(int columnIndex)
setDefaultValueOf(Column, Object))columnIndex - the column index whose default value will be returnednull.<T extends java.lang.Enum<T>> FieldSet<T> convertFields(java.lang.Class<T> enumType, Conversion... conversions)
Conversions to fields of a given set of fieldsT - the enumeration typeenumType - the type of the enumeration whose values represent headers in the input Recordsconversions - the sequence of conversions to applyFieldSet<java.lang.String> convertFields(Conversion... conversions)
Conversions to fields of a given set of field namesconversions - the sequence of conversions to applyFieldSet<java.lang.Integer> convertIndexes(Conversion... conversions)
Conversions to fields of a given set of column indexesconversions - the sequence of conversions to applyjava.lang.String[] headers()
Records parsed from the input.
If the headers are extracted from the input (i.e. CommonParserSettings.isHeaderExtractionEnabled() == true), then these values will be returned.
If no headers are extracted from the input, then the configured headers in CommonSettings.getHeaders() will be returned.
Records parsed from the inputjava.lang.String[] selectedHeaders()
headers().boolean containsColumn(java.lang.String headerName)
Records parsed from the inputheaderName - name of the headertrue if the given header name exists in the input records, otherwise false