public class FixedWidthMultiRecordTextSchema extends Object implements TextSchema
Constructor and Description |
---|
FixedWidthMultiRecordTextSchema(RecordDiscriminator descriminator)
Defines an empty fixed-width multi-record schema.
|
Modifier and Type | Method and Description |
---|---|
RecordIdentifier |
createRecordIdentifier()
Creates a new record identifier for this schema.
|
void |
defineRecordType(String name,
FixedWidthTextRecord type)
Defines a record type in the schema.
|
FixedWidthTextRecord |
getRecordType(String name)
Gets the definition of the specified record type.
|
int |
getTypeCount()
Gets the number of record types defined in the schema.
|
List<String> |
getTypeNames()
Gets the names of the record types defined in the schema.
|
public FixedWidthMultiRecordTextSchema(RecordDiscriminator descriminator)
An empty multi-record schema definition is not meaningful; it is expected that at least one record schema will be defined before the multi-record schema is used.
descriminator
- descriminator for determining which
contained record schema to use for a recordpublic int getTypeCount()
public List<String> getTypeNames()
public void defineRecordType(String name, FixedWidthTextRecord type)
No significance is placed on the order in which record types are
defined. However, the record identifier is expected to return
the index of the type as it appears in getTypeNames()
.
name
- the name associated with the record type. The
name must be unique amongst all defined types.type
- describes the record format for the record typepublic FixedWidthTextRecord getRecordType(String name)
name
- the identifier associated with the record typenull
is returned.public RecordIdentifier createRecordIdentifier()
Copyright © 2021 Actian Corporation. All rights reserved.