Class FeatureCatalogueDecoder
Provides human-readable resolution of S-100 Feature Catalogue codes: attribute codes → names, listed-value (enumeration) codes → labels, and feature-type codes → names.
public sealed class FeatureCatalogueDecoder
- Inheritance
-
FeatureCatalogueDecoder
- Inherited Members
Remarks
Construction is O(n) over the catalogue; lookups are O(1). Returns
null from any resolver when no match is found, leaving callers
free to fall back to the raw code. Intended for "pick / object info"
rendering where a viewer wants to show "Object name" instead
of the bare attribute code "OBJNAM", or "In force"
instead of the listed-value code "1". See S-100 Edition 5.2.1
Part 5 (Feature Catalogue, ISO 19110) for the underlying schema.
Constructors
FeatureCatalogueDecoder(FeatureCatalogue)
Builds the code lookup tables for catalogue.
public FeatureCatalogueDecoder(FeatureCatalogue catalogue)
Parameters
catalogueFeatureCatalogueThe parsed catalogue to index.
Exceptions
- ArgumentNullException
catalogueis null.
Properties
Catalogue
The wrapped feature catalogue.
public FeatureCatalogue Catalogue { get; }
Property Value
Methods
IsEnumeratedAttribute(string)
Returns true when the simple attribute identified by attributeCode
is an enumerated type with at least one listed value.
public bool IsEnumeratedAttribute(string attributeCode)
Parameters
attributeCodestring
Returns
ResolveAttributeName(string)
Returns the human-readable name for a simple- or complex-attribute
code, or null if the catalogue does not define it.
public string? ResolveAttributeName(string code)
Parameters
codestring
Returns
ResolveFeatureTypeName(string)
Returns the human-readable name for a feature-type code, or
null if the catalogue does not define it.
public string? ResolveFeatureTypeName(string code)
Parameters
codestring
Returns
ResolveInformationTypeName(string)
Returns the human-readable name for an information-type code, or
null if the catalogue does not define it.
public string? ResolveInformationTypeName(string code)
Parameters
codestring
Returns
ResolveListedValue(string, string?)
Resolves a listed-value (enumeration) code for the given simple
attribute to its display label. Returns null when the
attribute is not enumerated, the value is not a listed value, or
either is unknown to the catalogue.
public string? ResolveListedValue(string attributeCode, string? rawValue)
Parameters
attributeCodestringThe simple attribute's code (e.g.
"CATPIB").rawValuestringThe raw value from the dataset (typically a numeric code).
Returns
ResolveListedValueDefinition(string, string?)
Resolves a listed-value (enumeration) code for the given simple
attribute to its prose definition (the human-readable meaning, e.g.
"Grey Ice"). Returns null when the attribute is not
enumerated, the value is not a listed value, the listed value carried
no definition, or either is unknown to the catalogue.
public string? ResolveListedValueDefinition(string attributeCode, string? rawValue)
Parameters
attributeCodestringThe simple attribute's code (e.g.
"iceStageofDevelopment").rawValuestringThe raw value from the dataset (typically a numeric code).
Returns
ResolveSimpleAttribute(string)
Returns the simple attribute with the code code,
for its value type and unit of measure, or null if the
catalogue does not define it.
public SimpleAttribute? ResolveSimpleAttribute(string code)
Parameters
codestringThe simple attribute's code (e.g.
"signalPeriod").