Table of Contents

Class S101DatasetView

Namespace
EncDotNet.S100.Datasets.S101.Validation
Assembly
EncDotNet.S100.Datasets.S101.dll

Spec-aligned façade over an S101Document, exposing feature-type acronyms, attribute acronyms, and spatial-record lookup helpers in the vocabulary used by the S-101 Feature Catalogue rather than the numeric codes of the ISO 8211 encoding.

public sealed class S101DatasetView
Inheritance
S101DatasetView
Inherited Members

Remarks

Implements the input-model decision recorded in docs/design/non-gml-validation.md §3.1 — option (b), "thin spec-aligned façade". The façade is constructed once per dataset by From(S101Document, FeatureCatalogueDecoder?); rule packs (e.g. S101DatasetRules) read from Features, OfType(string), and TryGetSpatial(S101SpatialAssociation, out object?).

The underlying S101Document is reachable through Raw for the rare rule that needs to dive below the façade. By design (§3.1 closing paragraph) the façade does NOT expose S101FeatureRecord as part of its surface, keeping the door open for a future fully typed projection (option (d)) without breaking existing rule code.

Properties

Decoder

The bundled FeatureCatalogueDecoder the façade was constructed with, or null when no catalogue was available. Rule packs use the decoder to enumerate attribute bindings and listed values for FC-conformance rules (S101-R-1.2, S101-R-4.1).

public FeatureCatalogueDecoder? Decoder { get; }

Property Value

FeatureCatalogueDecoder

Diagnostics

Parse-time diagnostics surfaced by EncDotNet.S100.Datasets.S101.S101DocumentReader. Always empty for v1 per the design note §5.2 Stance A; the surface is present so a future reader change can populate it without breaking the façade contract.

public IReadOnlyList<S101DiagnosticView> Diagnostics { get; }

Property Value

IReadOnlyList<S101DiagnosticView>

Features

Every feature in the document, in dataset order, including features whose FeatureTypeAcronym did not resolve. Use UnresolvedFeatures to enumerate only the unresolved subset.

public IReadOnlyList<S101FeatureView> Features { get; }

Property Value

IReadOnlyList<S101FeatureView>

Raw

The underlying parsed S-101 document.

public S101Document Raw { get; }

Property Value

S101Document

UnresolvedFeatures

Sidecar view of every feature in the document whose feature type code did not resolve through FeatureTypeCatalogue. Used by S101-R-1.1.

public IReadOnlyList<S101FeatureView> UnresolvedFeatures { get; }

Property Value

IReadOnlyList<S101FeatureView>

Methods

From(S101Document, FeatureCatalogueDecoder?)

Builds a façade for the supplied document, resolving every feature's type code and attribute codes once against the embedded catalogues. The decoder is retained for FC-conformance rules; pass null when no Feature Catalogue is available (in which case S101-R-1.2 and S101-R-4.1 degrade to no-ops).

public static S101DatasetView From(S101Document document, FeatureCatalogueDecoder? decoder)

Parameters

document S101Document

The parsed S-101 document.

decoder FeatureCatalogueDecoder

The bundled FeatureCatalogueDecoder for S-101, or null when validation runs without a catalogue.

Returns

S101DatasetView

OfType(string)

Returns every resolved feature whose FeatureTypeAcronym matches acronym (case-insensitive). Returns an empty sequence when no features of that type exist.

public IEnumerable<S101FeatureView> OfType(string acronym)

Parameters

acronym string

Returns

IEnumerable<S101FeatureView>

SpatialRelatedId(S101SpatialAssociation)

Returns the canonical RelatedFeatureId string for a spatial association per design §4.3 — e.g. "surf:42", "curve:17", "point:9". Includes the tagged prefix so RCIDs (which are NOT unique across record-name buckets) remain disambiguated.

public static string SpatialRelatedId(S101SpatialAssociation association)

Parameters

association S101SpatialAssociation

Returns

string

TryGetSpatial(S101SpatialAssociation, out object?)

Resolves a S101SpatialAssociation into the matching spatial record. Returns true with the record boxed as object when the (RecordName, RecordId) pair maps into one of the document's spatial dictionaries (RCNM 110 = Point, 115 = MultiPoint, 120 = Curve, 125 = CompositeCurve, 130 = Surface); returns false when the reference is dangling.

public bool TryGetSpatial(S101SpatialAssociation association, out object? record)

Parameters

association S101SpatialAssociation
record object

Returns

bool

Remarks

Surfaces are returned as S101SurfaceRecord, composite curves as S101CompositeCurveRecord, curves as S101CurveSegmentRecord, points as S101PointRecord, and multi-points as S101MultiPointRecord. Rule code that needs a specific shape pattern-matches the returned object.