Class S101FeatureAttributeBindings
Lookup of which S-101 feature classes directly bind a given (complex or simple) attribute, derived from the attribute bindings declared on each feature type in the bundled S-101 Feature Catalogue.
public sealed class S101FeatureAttributeBindings
- Inheritance
-
S101FeatureAttributeBindings
- Inherited Members
Remarks
The S-57 → S-101 translation assembles several S-101 complex
attributes (for example rhythmOfLight and the date-range complexes
fixedDateRange / periodicDateRange / surveyDateRange)
from flat S-57 attributes. A complex attribute may only be emitted on a
feature whose Feature Catalogue entry actually binds it; emitting it on any
other feature would be non-conformant. Because the same S-57 attribute pair
(e.g. PERSTA/PEREND) is only meaningful where the destination
complex is bound, this lookup gates the assembly on the resolved S-101
feature class.
Only direct attribute bindings are indexed. The bundled S-101 FC
denormalises bindings onto concrete feature types (for example
rhythmOfLight is listed on LightAllAround rather than on an
abstract light super-type), so super-type inheritance does not need to be
resolved here.
Properties
Default
Lazily-loaded singleton built from the S-101 Feature Catalogue embedded in Specification.
public static S101FeatureAttributeBindings Default { get; }
Property Value
Methods
Binds(string?, string)
Returns true if the feature class (or information type) named
featureCode directly binds the attribute named
attributeCode in the Feature Catalogue.
public bool Binds(string? featureCode, string attributeCode)
Parameters
Returns
BindsFeatureAssociation(string?, string, string, string?)
Returns true if the feature class named featureCode
may be linked, through the feature association named
associationCode, to an instance of
otherFeatureCode playing the role named
roleCode. Both the S-101 and the S-401 catalogue, for
instance, let a Bridge reach a LightAllAround as
theEquipment of a StructureEquipment association.
public bool BindsFeatureAssociation(string? featureCode, string associationCode, string roleCode, string? otherFeatureCode)
Parameters
featureCodestringThe feature class carrying the binding, e.g.
"Bridge".associationCodestringThe feature association code, e.g.
"StructureEquipment".roleCodestringThe role the other feature plays, e.g.
"theEquipment".otherFeatureCodestringThe other feature class, e.g.
"LightAllAround".
Returns
- bool
truewhen the feature class declares that feature binding.
BindsInformationType(string?, string, string)
Returns true if the feature class named featureCode
may be linked to an instance of the information type named
informationTypeCode through the information
association named associationCode. S-401, for
instance, lets LockBasin reach TimeScheduleInGeneral through
AdditionalInformation, but not Bridge.
public bool BindsInformationType(string? featureCode, string associationCode, string informationTypeCode)
Parameters
featureCodestringThe feature class code, e.g.
"LockBasin".associationCodestringThe information association code, e.g.
"AdditionalInformation".informationTypeCodestringThe information type code, e.g.
"TimeScheduleInGeneral".
Returns
- bool
truewhen the feature class declares that information binding.
BindsSubAttribute(string?, string?)
Returns true if the complex attribute named
complexAttributeCode declares a sub-attribute binding
for the (simple or complex) attribute named
attributeCode in the Feature Catalogue — for example
zoneOfConfidence binds categoryOfZoneOfConfidenceInData.
public bool BindsSubAttribute(string? complexAttributeCode, string? attributeCode)
Parameters
complexAttributeCodestringThe parent complex attribute code.
attributeCodestringThe candidate sub-attribute code.
Returns
DefinesAttribute(string?)
Returns true if the Feature Catalogue defines a simple or complex
attribute named attributeCode (case-sensitive). S-401,
for instance, does not define S-101's categoryOfBridge.
public bool DefinesAttribute(string? attributeCode)
Parameters
attributeCodestringThe attribute code, e.g.
"categoryOfBridge".
Returns
DefinesFeatureType(string?)
Returns true if the Feature Catalogue defines a feature class
named featureCode (case-sensitive, as feature class
codes are). Lets a translation skip constructs its target product lacks,
such as S-101's RangeSystem, which S-401 does not define.
public bool DefinesFeatureType(string? featureCode)
Parameters
featureCodestringThe feature class code, e.g.
"RangeSystem".
Returns
ForSpec(string)
The feature/attribute binding lookup built from the bundled Feature Catalogue of
catalogueSpec (e.g. "S-101" or "S-401"), loaded
on first use and shared thereafter. Lets the S-57 translation check its
output against whichever S-100 product it targets.
public static S101FeatureAttributeBindings ForSpec(string catalogueSpec)
Parameters
catalogueSpecstringThe product whose bundled Feature Catalogue to use.
Returns
- S101FeatureAttributeBindings
The shared lookup for that catalogue.
Exceptions
- InvalidOperationException
No Feature Catalogue is bundled for
catalogueSpec.
FromFeatureCatalogue(FeatureCatalogue)
Builds an instance from a parsed S-101 FeatureCatalogue.
public static S101FeatureAttributeBindings FromFeatureCatalogue(FeatureCatalogue catalogue)
Parameters
catalogueFeatureCatalogue
Returns
IsComplexAttribute(string?)
Returns true if the Feature Catalogue defines a complex
attribute named attributeCode (case-sensitive), such as
featureName or zoneOfConfidence.
public bool IsComplexAttribute(string? attributeCode)
Parameters
attributeCodestringThe attribute code, e.g.
"featureName".
Returns
IsSingleValued(string?, string)
Returns true if the S-101 feature class named
featureCode binds the attribute named
attributeCode with an upper multiplicity of at most
one, so a feature instance may carry at most one occurrence of it.
public bool IsSingleValued(string? featureCode, string attributeCode)
Parameters
featureCodestringS-101 feature class code (e.g.
Bridge).attributeCodestringS-101 attribute code (e.g.
bridgeConstruction).
Returns
- bool
truefor a [0..1] or [1..1] binding;falsefor a multi-valued binding or when the feature does not bind the attribute.