Table of Contents

Class SpecVersionAssessment

Namespace
EncDotNet.S100.Core
Assembly
EncDotNet.S100.Core.dll

A user-facing assessment of how the product specification edition a dataset declares relates to the edition(s) of that product this application actually implements.

public sealed record SpecVersionAssessment : IEquatable<SpecVersionAssessment>
Inheritance
SpecVersionAssessment
Implements
Inherited Members

Remarks

The warning deliberately compares the dataset's declared edition against the edition this application supports — not against the Feature or Portrayal Catalogue version number. Catalogue versions advance on their own release cadence and routinely differ from the product-spec edition (e.g. the S-101 portrayal catalogue is at version 2.0.0 while the product specification is at edition 1.x), so comparing a declared edition against a catalogue version would raise false alarms. The catalogue version is surfaced separately as informational context via Catalogue.

A product may implement more than one edition (e.g. S-102 reads both edition 2.1 and 3.0). The declared edition is matched against the Supported member sharing its major component; when none does, the relationship is MajorDivergence. Classification follows S-100 Edition 5.2.1 Part 2 §6 (Maintenance) via Classify(SpecVersion, SpecVersion).

When the dataset does not declare an edition, Kind is Unknown and both IsDivergent and IsWarning are false — hosts stay silent rather than warn on missing information.

Properties

Catalogue

The version of the Feature/Portrayal Catalogue resolved for the dataset, surfaced for display only (it does not drive the warning). null when the catalogue does not self-describe.

public CatalogueRef? Catalogue { get; }

Property Value

CatalogueRef?

Declared

The product specification (name + edition) the dataset declares.

public SpecRef Declared { get; }

Property Value

SpecRef

Implemented

The build-implemented edition the declared edition was compared against — the Supported member sharing the declared major, or (when none does) the highest supported edition.

public SpecVersion Implemented { get; }

Property Value

SpecVersion

IsDivergent

true when the declared edition and the implemented edition are not identical and the declared edition is known — i.e. there is something worth telling the user about, however benign.

public bool IsDivergent { get; }

Property Value

bool

IsWarning

true when the divergence may produce incomplete or incorrect output — the application supports an older edition on the same major (CatalogueOlder) or no edition on the declared major (MajorDivergence). A build that implements a newer backward-compatible edition is divergent but not a warning.

public bool IsWarning { get; }

Property Value

bool

Kind

The classified relationship between declared and implemented editions.

public SpecMatchKind Kind { get; }

Property Value

SpecMatchKind

Supported

Every edition of this product the application supports.

public IReadOnlyList<SpecVersion> Supported { get; }

Property Value

IReadOnlyList<SpecVersion>

Methods

BuildMessage()

Returns a single-line, human-readable description of the divergence, e.g. "Dataset targets S-104 edition 0.8.0, but this application supports S-104 edition 2.0.0; rendering may be incomplete or incorrect." Returns null when IsDivergent is false.

public string? BuildMessage()

Returns

string

Remarks

The supported edition is attributed to "this application" because it is a property of the reader/portrayal implementation in this codebase: an S-100 Feature or Portrayal Catalogue does not declare which product-specification edition it targets (only its own catalogue version), so the supported edition cannot be derived from the loaded catalogue and is instead asserted by the build (see SupportedSpecEditions).

TryCreate(SpecRef, IReadOnlyList<SpecVersion>, CatalogueRef?)

Builds the assessment for a declared spec and the set of editions the application supports for that product.

public static SpecVersionAssessment? TryCreate(SpecRef declared, IReadOnlyList<SpecVersion> supported, CatalogueRef? catalogue = null)

Parameters

declared SpecRef

The dataset's declared product spec.

supported IReadOnlyList<SpecVersion>

Every edition of the product the application supports. Must be non-empty; returns null when empty (no support known).

catalogue CatalogueRef?

The resolved catalogue identity for informational display, or null when unknown.

Returns

SpecVersionAssessment