org.virbo.dsutil
Interface AsciiParser.RecordParser

All Known Implementing Classes:
AsciiParser.DelimParser, AsciiParser.FixedColumnsParser, AsciiParser.RegexParser
Enclosing class:
AsciiParser

public static interface AsciiParser.RecordParser


Method Summary
 int fieldCount()
          indicate the number of fields this RecordParser is expecting on each line.
 int fieldCount(java.lang.String line)
          return the number of fields in this line.
 java.lang.String[] fields(java.lang.String line)
          return the string for each field.
 boolean tryParseRecord(java.lang.String line, int irec, DataSetBuilder builder)
          returns true if the line appears to be a record.
 

Method Detail

tryParseRecord

boolean tryParseRecord(java.lang.String line,
                       int irec,
                       DataSetBuilder builder)
returns true if the line appears to be a record. If it is a record, then the record is inserted into the builder.


fieldCount

int fieldCount()
indicate the number of fields this RecordParser is expecting on each line.


fieldCount

int fieldCount(java.lang.String line)
return the number of fields in this line. All records will have this number of fields. This is used for discovery and to configure the parser.


fields

java.lang.String[] fields(java.lang.String line)
return the string for each field. This is useful for discovery, and is not used in the bulk parsing.

Parameters:
line -
Returns: