Table of Contents

Class SpecName

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

Helpers for normalising S-100 product specification short names into the canonical "S-NNN" form (e.g. "S-101", "S-102"), and the closed set of non-S-100 format names a product may be registered under (Grib2, NetCdf, Cap).

public static class SpecName
Inheritance
SpecName
Inherited Members

Remarks

A non-S-100 format keeps its own name rather than a made-up S-0nn number, and its edition is the format's version: GRIB2/2.0.0, NetCDF/4.0.0 (or NetCDF/3.0.0), CAP/1.2.0. Whether a product is S-100 is a trait of its registration (ProductRegistration.IsS100), so hosts ask the product registry rather than parse names.

Fields

Cap

OASIS Common Alerting Protocol, canonical name "CAP".

public const string Cap = "CAP"

Field Value

string

Grib2

WMO GRIB edition 2 (FM 92), canonical name "GRIB2".

public const string Grib2 = "GRIB2"

Field Value

string

NetCdf

Unidata NetCDF (classic and NetCDF-4), canonical name "NetCDF".

public const string NetCdf = "NetCDF"

Field Value

string

Properties

NonS100Formats

The non-S-100 format names Normalize(string) accepts, in their canonical casing. The set is closed: a new format is added here.

public static IReadOnlyList<string> NonS100Formats { get; }

Property Value

IReadOnlyList<string>

Methods

IsNonS100Format(string?)

Whether name (trimmed, any casing) is one of the NonS100Formats.

public static bool IsNonS100Format(string? name)

Parameters

name string

Returns

bool

Normalize(string)

Normalises a product specification short name into "S-NNN" form. Accepts inputs such as "S-101", "s101", "S101", and the long-form product identifier "INT.IHO.S-101.1.2.0". A non-S-100 format name ("grib2", "netcdf", "Cap") is returned in its canonical casing (NonS100Formats).

public static string Normalize(string name)

Parameters

name string

Returns

string

Exceptions

FormatException

The input does not match any recognised form.

TryNormalize(string?, out string)

Attempts to normalise a product specification short name. Returns false when name does not match a recognised form.

public static bool TryNormalize(string? name, out string canonical)

Parameters

name string
canonical string

Returns

bool