Table of Contents

Class FeatureCatalogueDecoder

Namespace
EncDotNet.S100.Features
Assembly
EncDotNet.S100.Features.dll

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

catalogue FeatureCatalogue

The parsed catalogue to index.

Exceptions

ArgumentNullException

catalogue is null.

Properties

Catalogue

The wrapped feature catalogue.

public FeatureCatalogue Catalogue { get; }

Property Value

FeatureCatalogue

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

attributeCode string

Returns

bool

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

code string

Returns

string

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

code string

Returns

string

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

code string

Returns

string

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

attributeCode string

The simple attribute's code (e.g. "CATPIB").

rawValue string

The raw value from the dataset (typically a numeric code).

Returns

string

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

attributeCode string

The simple attribute's code (e.g. "iceStageofDevelopment").

rawValue string

The raw value from the dataset (typically a numeric code).

Returns

string

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

code string

The simple attribute's code (e.g. "signalPeriod").

Returns

SimpleAttribute