|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RecordMetaData
Metadata with information about Records parsed from the input.
| Method Summary | ||
|---|---|---|
boolean |
containsColumn(String headerName)
Queries whether a given header name exists in the Records parsed from the input |
|
|
convertFields(Class<T> enumType,
Conversion... conversions)
Associates a sequence of Conversions to fields of a given set of fields |
|
FieldSet<String> |
convertFields(Conversion... conversions)
Associates a sequence of Conversions to fields of a given set of field names |
|
FieldSet<Integer> |
convertIndexes(Conversion... conversions)
Associates a sequence of Conversions to fields of a given set of column indexes |
|
Object |
defaultValueOf(Enum<?> column)
Returns the default value associated with a column (defined using setDefaultValueOf(Column, Object)) |
|
Object |
defaultValueOf(int columnIndex)
Returns the default value associated with a column (defined using setDefaultValueOf(Column, Object)) |
|
Object |
defaultValueOf(String headerName)
Returns the default value associated with a column (defined using setDefaultValueOf(Column, Object)) |
|
String[] |
headers()
Returns the column names of the Records parsed from the input. |
|
int |
indexOf(Enum<?> column)
Returns the index of a given column |
|
int |
indexOf(String headerName)
Returns the index of a given column |
|
String[] |
selectedHeaders()
|
|
|
setDefaultValueOfColumns(T defaultValue,
Enum<?>... columns)
Associates a default value with one or more columns, in case the values contained are null |
|
|
setDefaultValueOfColumns(T defaultValue,
int... columnIndexes)
Associates a default value with one or more columns, in case the values contained are null |
|
|
setDefaultValueOfColumns(T defaultValue,
String... headerNames)
Associates a default value with one or more columns, in case the values contained are null |
|
void |
setTypeOfColumns(Class<?> type,
Enum... columns)
Associates a type with one or more column. |
|
void |
setTypeOfColumns(Class<?> type,
int... columnIndexes)
Associates a type with one or more column. |
|
void |
setTypeOfColumns(Class<?> type,
String... headerNames)
Associates a type with one or more column. |
|
Class<?> |
typeOf(Enum<?> column)
Returns the type associated with a given column, defined with the method setTypeOfColumns(type, columns) |
|
Class<?> |
typeOf(int columnIndex)
Returns the type associated with a given column, defined with the method setTypeOfColumns(type, columns) |
|
Class<?> |
typeOf(String headerName)
Returns the type associated with a given column name, defined with the method setTypeOfColumns(type, columns) |
|
| Method Detail |
|---|
int indexOf(Enum<?> column)
column - the column whose index will be returned
int indexOf(String headerName)
headerName - name of the column whose index will be returned
Class<?> typeOf(Enum<?> column)
setTypeOfColumns(type, columns)
column - the column whose type will be returned
Class<?> typeOf(String headerName)
setTypeOfColumns(type, columns)
headerName - name of the column whose type will be returned
Class<?> typeOf(int columnIndex)
setTypeOfColumns(type, columns)
columnIndex - the position of the column whose type will be returned
void setTypeOfColumns(Class<?> type,
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(Class<?> type,
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(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,
Enum<?>... columns)
null
T - 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,
String... headerNames)
null
T - 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)
null
T - 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.Object defaultValueOf(Enum<?> column)
setDefaultValueOf(Column, Object))
column - the column whose default value will be returned
null.Object defaultValueOf(String headerName)
setDefaultValueOf(Column, Object))
headerName - the column name whose default value will be returned
null.Object defaultValueOf(int columnIndex)
setDefaultValueOf(Column, Object))
columnIndex - the column index whose default value will be returned
null.
<T extends Enum<T>> FieldSet<T> convertFields(Class<T> enumType,
Conversion... conversions)
Conversions to fields of a given set of fields
T - the enumeration typeenumType - the type of the enumeration whose values represent headers in the input Recordsconversions - the sequence of conversions to apply
FieldSet<String> convertFields(Conversion... conversions)
Conversions to fields of a given set of field names
conversions - the sequence of conversions to apply
FieldSet<Integer> convertIndexes(Conversion... conversions)
Conversions to fields of a given set of column indexes
conversions - the sequence of conversions to apply
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 inputString[] selectedHeaders()
boolean containsColumn(String headerName)
Records parsed from the input
headerName - name of the header
true if the given header name exists in the input records, otherwise false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||