AbstractParser and their values.
It is solely responsible for deciding when:
CommonSettingsAbstractParser#parseRecord() should be retained or discardedAbstractParser#parseRecord() or from CommonSettings#getHeaders()AbstractParser.
AbstractParser, CommonSettings
| Modifier and Type | Field and Description |
|---|---|
| public CharAppender | appender
The appender available to parsers for accumulating characters read from the input. |
| private final CharAppender | |
| private final CharAppender[] | appenders
Stores (shared) references to |
| protected int | column
Keeps track of the current column being parsed in the input. |
| private boolean | |
| private boolean | |
| private boolean | |
| private long | |
| private NormalizedString[] | |
| private String[] | |
| private final String | |
| pack-priv String[] | parsedHeaders
Headers parsed from the input when |
| protected final String[] | parsedValues
Stores the values parsed for a record. |
| private final AbstractParser | |
| public final Deque | |
| private int[] | |
| protected final CommonParserSettings | |
| private final boolean | |
| public boolean |
| Access | Constructor and Description |
|---|---|
| public | ParserOutput(CommonParserSettings<?>
the parser configuration settings)Initializes the ParserOutput with the configuration specified in |
| public | ParserOutput(AbstractParser<?>
the parser whose output will be managed by this class. parser, CommonParserSettings<?> the parser configuration settings)Initializes the ParserOutput with the configuration specified in |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public void | emptyParsed()
Adds a nullValue (as specified in |
| public int | Returns: the position of the current parsed valueReturns the position of the current parsed value |
| public long | |
| pack-priv FieldSelector | |
| public String[] | |
| public NormalizedString[] | Returns: the headers each field in the inputReturns the sequence of values that represent the headers each field in the input. |
| public int[] | Returns: the selected indexes of all fields as defined inCommonSettings. Null if no fields were selected.Returns the selected indexes of all fields as defined in |
| private void | initializeColumnsToExtract(NormalizedString[]
a sequence of values that represent the headers of the input. This can be either a parsed record or the headers as defined in values)CommonSettings#getHeaders()Initializes the sequence of selected fields, if any. |
| protected void | |
| public boolean | Returns: false if no fields were selected or column reordering has been disabled in true if fields were selected and column reordering has been enabled in Indicates whether fields selected using the field selection methods (in |
| pack-priv final void | |
| public String[] | Returns: the sequence of parsed values in a record.Gets all values parsed in the |
| public void | valueParsed()
Adds the accumulated value in the appender object to the output and prepares the next position in the record to receive more values. |
| public void | valueParsed(String
the value to be added to the current record position. value)Adds a value processed externally to the output and prepares the next position in the record to receive more values |
| appender | back to summary |
|---|---|
| public CharAppender appender The appender available to parsers for accumulating characters read from the input. This attribute is assigned to different instances of CharAppender during parsing process, namely,
a (potentially) different CharAppender for each parsed column, taken from
| |
| appenderInstance | back to summary |
|---|---|
| private final CharAppender appenderInstance | |
| appenders | back to summary |
|---|---|
| private final CharAppender[] appenders Stores (shared) references to Fields that are not selected will receive an instance of Selected fields (given by | |
| column | back to summary |
|---|---|
| protected int column Keeps track of the current column being parsed in the input.
Calls to | |
| columnReorderingEnabledSetting | back to summary |
|---|---|
| private boolean columnReorderingEnabledSetting | |
| columnsReordered | back to summary |
|---|---|
| private boolean columnsReordered | |
| columnsToExtractInitialized | back to summary |
|---|---|
| private boolean columnsToExtractInitialized | |
| currentRecord | back to summary |
|---|---|
| private long currentRecord | |
| headers | back to summary |
|---|---|
| private NormalizedString[] headers | |
| headerStrings | back to summary |
|---|---|
| private String[] headerStrings | |
| nullValue | back to summary |
|---|---|
| private final String nullValue | |
| parsedHeaders | back to summary |
|---|---|
| pack-priv String[] parsedHeaders Headers parsed from the input when | |
| parsedValues | back to summary |
|---|---|
| protected final String[] parsedValues Stores the values parsed for a record. | |
| parser | back to summary |
|---|---|
| private final AbstractParser<?> parser | |
| pendingRecords | back to summary |
|---|---|
| public final Deque<String[]> pendingRecords | |
| selectedIndexes | back to summary |
|---|---|
| private int[] selectedIndexes | |
| settings | back to summary |
|---|---|
| protected final CommonParserSettings<?> settings | |
| skipEmptyLines | back to summary |
|---|---|
| private final boolean skipEmptyLines | |
| trim | back to summary |
|---|---|
| public boolean trim | |
| ParserOutput | back to summary |
|---|---|
| public ParserOutput(CommonParserSettings<?> settings) Initializes the ParserOutput with the configuration specified in
| |
| ParserOutput | back to summary |
|---|---|
| public ParserOutput(AbstractParser<?> parser, CommonParserSettings<?> settings) Initializes the ParserOutput with the configuration specified in
| |
| discardValues | back to summary |
|---|---|
| public final void discardValues() Discards the values parsed so far | |
| emptyParsed | back to summary |
|---|---|
| public void emptyParsed() Adds a nullValue (as specified in | |
| getCurrentColumn | back to summary |
|---|---|
| public int getCurrentColumn() Returns the position of the current parsed value
| |
| getCurrentRecord | back to summary |
|---|---|
| public long getCurrentRecord() Returns the current record index. The number returned here reflects the number of actually parsed and valid records sent to the output of
| |
| getFieldSelector | back to summary |
|---|---|
| pack-priv FieldSelector getFieldSelector() | |
| getHeaderAsStringArray | back to summary |
|---|---|
| public String[] getHeaderAsStringArray() | |
| getHeaders | back to summary |
|---|---|
| public NormalizedString[] getHeaders() Returns the sequence of values that represent the headers each field in the input. This can be either a parsed record or the headers as defined in
| |
| getSelectedIndexes | back to summary |
|---|---|
| public int[] getSelectedIndexes() Returns the selected indexes of all fields as defined in
| |
| initializeColumnsToExtract | back to summary |
|---|---|
| private void initializeColumnsToExtract(NormalizedString[] values) Initializes the sequence of selected fields, if any.
| |
| initializeHeaders | back to summary |
|---|---|
| protected void initializeHeaders() | |
| isColumnReorderingEnabled | back to summary |
|---|---|
| public boolean isColumnReorderingEnabled() Indicates whether fields selected using the field selection methods (in
| |
| reset | back to summary |
|---|---|
| pack-priv final void reset() Resets the parser output and prepares for a new parsing process. | |
| rowParsed | back to summary |
|---|---|
| public String[] rowParsed() Gets all values parsed in the
| |
| valueParsed | back to summary |
|---|---|
| public void valueParsed() Adds the accumulated value in the appender object to the output and prepares the next position in the record to receive more values. | |
| valueParsed | back to summary |
|---|---|
| public void valueParsed(String value) Adds a value processed externally to the output and prepares the next position in the record to receive more values
| |