Class Iso8211FieldDefinition
Represents a single field definition from the DDR.
public sealed record Iso8211FieldDefinition : IEquatable<Iso8211FieldDefinition>
- Inheritance
-
Iso8211FieldDefinition
- Implements
- Inherited Members
Remarks
A field definition describes the structure and format of a field that appears in data records. It includes the field tag, name, data structure type, data type, and the definitions of all subfields within the field.
Properties
ArrayDescriptor
Gets the array descriptor string, if present.
public string? ArrayDescriptor { get; init; }
Property Value
Remarks
The array descriptor is used when the data structure is Array
or ConcatenatedArray. It contains dimension information
separated by ! delimiters.
DataStructureCode
Gets the data structure code for this field.
public Iso8211DataStructureCode DataStructureCode { get; init; }
Property Value
DataTypeCode
Gets the data type code for this field.
public Iso8211DataTypeCode DataTypeCode { get; init; }
Property Value
FieldName
Gets the field name as specified in the DDR.
public string FieldName { get; init; }
Property Value
FormatControls
Gets the raw format controls string (e.g., "(A,I(10),b11)").
public string FormatControls { get; init; }
Property Value
HasRepeatingGroup
Gets whether this field definition contains a repeating subfield group.
public bool HasRepeatingGroup { get; }
Property Value
RepeatingSubfieldStartIndex
Gets the index within SubfieldDefinitions at which the repeating
subfield group begins, or -1 if there is no repeating group.
public int RepeatingSubfieldStartIndex { get; init; }
Property Value
Remarks
In ISO 8211, a * prefix on a subfield name in the DDR descriptor indicates
that this subfield and all subsequent subfields form a repeating group. When a field
has DataStructureCode of Vector,
the entire group of subfields from this index onward repeats until the end of the
field data.
For example, the S-57 SG2D field has descriptors *YCOO!XCOO, meaning both
YCOO and XCOO repeat as a pair. In this case, RepeatingSubfieldStartIndex
would be 0.
The S-57 FSPT field has descriptors *NAME!ORNT!USAG!MASK, meaning all four
subfields repeat as a group, so RepeatingSubfieldStartIndex would be 0.
SubfieldDefinitions
Gets the subfield definitions for this field.
public IReadOnlyList<Iso8211SubfieldDefinition> SubfieldDefinitions { get; init; }
Property Value
Tag
Gets the field tag (e.g., "0001", "DSID", "FRID").
public string Tag { get; init; }
Property Value
Methods
GetSubfieldDefinition(string)
Gets a subfield definition by its name/label.
public Iso8211SubfieldDefinition? GetSubfieldDefinition(string name)
Parameters
namestringThe subfield name to search for.
Returns
- Iso8211SubfieldDefinition
The subfield definition with the specified name, or
nullif not found.