Class AmlDataSetMetadata
Represents the structured metadata that NATO Additional Military Layers (AML) cells carry in the data set identification comment (Comment).
public sealed class AmlDataSetMetadata
- Inheritance
-
AmlDataSetMetadata
- Inherited Members
Remarks
An AML DSID COMT is a list of key=value pairs separated by semicolons,
for example title=Wrecks; IDO Status = Final; Protective Marking = UNCLASSIFIED; Owner
Authority = UKHO, optionally followed by a caveat. Keys are matched without regard to
case or white space, so IDO Status, ido status and IDOStatus are the same
key. Values are trimmed and may contain =; they can't contain ;.
The well-known keys are exposed as properties, which are null when the comment doesn't have the key. Every pair, including keys this type doesn't recognise, is available from Entries.
Properties
Caveat
Gets the handling caveat (Caveat), or null if absent.
public string? Caveat { get; }
Property Value
Entries
Gets every key/value pair in the comment, keyed by the trimmed key as written. Lookups ignore case. When a key appears more than once, the first value wins.
public IReadOnlyDictionary<string, string> Entries { get; }
Property Value
IdoStatus
Gets the Information and Data Object (IDO) status (IDO Status), or
null if absent.
public string? IdoStatus { get; }
Property Value
OwnerAuthority
Gets the authority that owns the data (Owner Authority), or null
if absent.
public string? OwnerAuthority { get; }
Property Value
ProtectiveMarking
Gets the security classification (Protective Marking), or null if
absent.
public string? ProtectiveMarking { get; }
Property Value
Title
Gets the data set title (title), or null if absent.
public string? Title { get; }
Property Value
Methods
Parse(string)
Parses an AML data set identification comment.
public static AmlDataSetMetadata Parse(string comment)
Parameters
commentstringThe
DSIDCOMTtext.
Returns
- AmlDataSetMetadata
The metadata the comment holds.
Exceptions
- ArgumentNullException
commentis null.- FormatException
commentisn't an AML comment; see TryParse(string?, out AmlDataSetMetadata?).
TryParse(string?, out AmlDataSetMetadata?)
Tries to parse an AML data set identification comment.
public static bool TryParse(string? comment, out AmlDataSetMetadata? metadata)
Parameters
commentstringThe
DSIDCOMTtext.metadataAmlDataSetMetadataWhen this method returns true, the metadata the comment holds; otherwise, null.