Class S125AtonRules
- Namespace
- EncDotNet.S100.Datasets.S125.Validation
- Assembly
- EncDotNet.S100.Datasets.S125.dll
The default ValidationRuleSet<TModel> of normative rules
for an S-125 S125AtonDataset. Rule identifiers follow
the convention S125-R-{clause}, where {clause} traces
to the relevant section of the S-125 specification
(Edition 1.0.0 — Marine Aids to Navigation).
public static class S125AtonRules
- Inheritance
-
S125AtonRules
- Inherited Members
Remarks
The pilot rule set focuses on Tier-1 (schema-shape) and Tier-2
(spec-semantic) rules that can be evaluated against a single
S125AtonDataset in isolation. Tier-3 cross-dataset
rules (e.g. checking an AtoN's charted position against an S-101
chart) will be added in a follow-up once the MCP
validate_all surface is wired up — they need access to
sibling datasets via Services.
Deviation from the S-421 pilot. Projection-time issues
surfaced by From(S125Dataset, out IReadOnlyList<ProjectionDiagnostic>) (unresolved xlinks,
duplicate ids, etc.) are reported through the
ProjectionDiagnostic out-parameter rather than carried on
the typed model, so there is no rule that mirrors S-421's
"information binding sanity" check. Callers that care about those
diagnostics should capture them at projection time.
Properties
AggregationHasMembers
S125-R-4.1 — Every AtonAggregation /
AtonAssociation must bind at least one aid to
navigation.
public static IValidationRule<S125AtonDataset> AggregationHasMembers { get; }
Property Value
Remarks
Spec reference: S-125 Edition 1.0.0 §AtonAggregation, §AtonAssociation — these features are geometry-less containers whose entire purpose is to group AtoN by xlink. An aggregation with zero resolved members has no semantic content (either the aggregation is empty in the source or every xlink failed to resolve, which is itself a defect).
AidIdsUnique
S125-R-1.2 — Every aid to navigation must have a
dataset-unique gml:id.
public static IValidationRule<S125AtonDataset> AidIdsUnique { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.4 — every GML object exposed
at the dataset level must carry a unique gml:id so that
xlink references can resolve. Duplicate aid identifiers also
break the typed model's parent / aggregation lookups.
AidLatLonInRange
S125-R-1.1 — Every aid to navigation's position must fall
within the WGS-84 ranges: latitude in [-90, +90] and longitude
in [-180, +180].
public static IValidationRule<S125AtonDataset> AidLatLonInRange { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.2 — geographic coordinates for
EPSG:4326 are bounded. Aids without a position are
ignored by this rule; geometry presence is covered separately
where the spec requires it.
AisAidHasMmsi
S125-R-2.1 — Every AIS aid to navigation
(Physical / Synthetic / Virtual) must carry an mMSICode
of exactly nine decimal digits.
public static IValidationRule<S125AtonDataset> AisAidHasMmsi { get; }
Property Value
Remarks
Spec reference: S-125 Edition 1.0.0 §PhysicalAISAidToNavigation,
§SyntheticAISAidToNavigation, §VirtualAISAidToNavigation —
mMSICode (Maritime Mobile Service Identity) is the
9-digit MMSI broadcast in the AIS message. The check is most
load-bearing on Virtual aids, which
have no physical presence and so cannot be cross-validated
against a real-world fix. The attribute is read from
ExtraAttributes because the typed model
does not break it out as a strongly-typed property.
ChangeTypeCodeInEnumeration
S125-R-3.1 — When an AtonStatusInformation
carries a numeric changeTypes code it must fall within
the closed enumeration declared by the Feature Catalogue.
public static IValidationRule<S125AtonDataset> ChangeTypeCodeInEnumeration { get; }
Property Value
Remarks
Spec reference: S-125 Edition 1.0.0 §changeTypes (Feature Catalogue listed values 1–5: Advance Notice of Change, Discrepancy, Proposed Change, Temporary Change, Permanent Change). The typed projection maps an out-of-range numeric value to Unknown, so this rule fires precisely when ChangeTypeCode is present but the projection refused to classify it.
Default
The canonical default rule set for S-125 AtoN datasets.
public static ValidationRuleSet<S125AtonDataset> Default { get; }
Property Value
StatusDateRangeOrdered
S125-R-3.2 — When a status date range
(fixedDateRange or periodicDateRange) carries
both dateStart and dateEnd, the start must not
be after the end.
public static IValidationRule<S125AtonDataset> StatusDateRangeOrdered { get; }
Property Value
Remarks
Spec reference: S-125 Edition 1.0.0 §fixedDateRange and
§periodicDateRange — the complex attribute is composed of
dateStart / dateEnd; the spec is silent on
degenerate ranges but a status whose validity begins after it
ends is non-actionable.
StatusIndicationHasPosition
S125-R-5.1 — Every AtonStatusIndication feature
must have a position.
public static IValidationRule<S125AtonDataset> StatusIndicationHasPosition { get; }
Property Value
Remarks
Spec reference: S-125 Edition 1.0.0 §AtonStatusIndication —
permittedPrimitives = point. The feature is portrayed
at its position; an indication with no geometry cannot be
drawn and adds nothing the bound AtonStatusInformation
does not already convey through its xlink.
Methods
Validate(S125AtonDataset, ValidationContext?)
Convenience wrapper around Run(TModel, ValidationContext?) using the Default rule set.
public static ValidationReport Validate(S125AtonDataset dataset, ValidationContext? context = null)
Parameters
datasetS125AtonDatasetcontextValidationContext