public interface RecordIdentifier
A discriminator for identifying text record types in multi-record schemas.
Used by multi-record text file readers to determine how to
parse a given record.
-
Method Summary
Modifier and TypeMethodDescriptiongetError()Gets a description of the last record identification failure.intidentifyRecord(String record) Determines the type of the given text record.
-
Method Details
-
identifyRecord
Determines the type of the given text record.- Parameters:
record- the text of the record to identify- Returns:
- the index of the identified type in the source schema;
-1if the type could not be identified.
-
getError
String getError()Gets a description of the last record identification failure. This should only be called immediately afteridentifyRecord(String)has reported an error. IfidentifyRecordsucceeds, the results of calling this method are undefined.- Returns:
- the last error reported
-