Skip to content

Metadata Set

A Metadata Set holds reference metadata: the values reported for the metadata attributes of a Metadata Structure Definition, against one or more target structures. The set is reported against a Metadataflow or a Metadata Provision Agreement. Documents start ref: "MetadataSet=AGENCY:ID(1.0)".

Simple form

The document starts with the common header, followed by the structure the set is reported against, the target, and then the tree of reported attributes. As in the MSD, the reported attributes sit directly in the root object; there is no wrapping field.

format: "fusion-yaml(1.0.0)"
ref: "MetadataSet=IMF:DQAF(1.0.0)"
name: "TEST"
metadataflow: "ACY:MDF(1.0.0)"
target: "Dataflow=OECD:POP(1.0.0)"
QUALITY:
  LEGAL: "The responsibility for collecting, processing, and"
  RESOURCE: "Staff, facilities, computing resources, and financing"
METHODOLOGY:
  BASIS: "Market prices are used to value flows and stocks."
  SOURCE: "IMF"
Source: trimmed from metadataset/testSimpleAndMultilingualValueReport.yaml

  • metadataflow: short URN of the structure the set is reported against, keyed by its lower-case class (references). For a set reported against a Metadata Provision Agreement the key is metadataprovisionagreement.
  • target: the structure the metadata describes, as a canonical value (Class=AGENCY:ID(VERSION)). Several targets are written as an array (value or array).
  • QUALITY, METHODOLOGY: reported attributes, keyed by the metadata attribute id. These two are presentational (they carry no value), so they are objects that hold their child attributes.
  • LEGAL, RESOURCE, BASIS, SOURCE: reported attributes with a plain value and no children, written as ID: "value".

Reported attributes are written in the order they were reported, not sorted.

Complex form

A reported attribute is written in its simplest form, as a string, when it has a plain (non-localised) value, no child attributes and no annotations. It becomes an object in every other case:

Reported attribute has Written as
A value, no children ID: "value"
A value and children ID: object with value: followed by the children
Localised text (with or without children) ID: object with text:, text-fr:, ... followed by the children
No value (presentational), children ID: object holding only the children
Annotations (with any of the above) ID: object as above, with annotations written after the children

Localised text follows the localised text rule: English is written as text, other locales as text-<locale>. An attribute whose text is only in English is still an object (text: inside it), which keeps it distinct from a plain value.

format: "fusion-yaml(1.0.0)"
ref: "MetadataSet=TEST:DQAF(1.0.0)"
name: "TEST"
metadataprovisionagreement: "ACY:MDF_DP3(1.0.0)"
target: "Dataflow=IMF:BOP(1.0.0)"
QUALITY:
  LEGAL:
    text: "The responsibility for collecting, processing, and"
  RELEVANCE:
    text: "The relevance and practical utility of existing statistics"
    text-de: "the German version"
    text-fr: "The french version"
CONTACT:
  value: "Statistics Department"
  EMAIL: "stats@example.org"
Source: built from metadataset/testDataflowReportAgainstProvision.yaml and testSimpleAndMultilingualValueReport.yaml; the CONTACT attribute is illustrative.

  • LEGAL has an English-only text value, so it is an object with text.
  • RELEVANCE has text in three languages.
  • CONTACT has a plain value and a child attribute, so the value moves into a value field and the child follows it.

Field reference

Body fields, in written order:

Field Value Written when
metadataflow / metadataprovisionagreement Short URN of the structure the set is reported against The structure reference is set
target Canonical value, or an array of canonical values The set has one or more targets
<ATTRIBUTE_ID> Reported attribute: a string, or an object (below) Once for each top-level reported attribute

Reported attribute object, in written order:

Field Value Written when
value String The attribute has a plain value and has children or annotations
text, text-<locale> Localised text The attribute has localised text (and no plain value)
<ATTRIBUTE_ID> Child reported attribute, a string or an object Once for each child attribute
annotations Array, see annotations The attribute has annotations

If an attribute had both a plain value and localised text, only value would be written.

Reading notes

  • Reported attributes share the root object with the header and body fields, and share their own object with value and text fields. An attribute whose id is one of those field names (for example name, description, url, annotations, target, value or text) cannot be read back.
  • At the root, the first scalar field whose name is a lower-case structure class (such as metadataflow) is read as the structure reference; every other field is a reported attribute.
  • Inside an attribute object, a scalar value field is the attribute's value, text / text-<locale> fields are its localised text, an annotations array holds its annotations, and every other field is a child attribute.