Skip to content

Metadata Constraint

A Metadata Constraint restricts the metadata that can be reported for the structures it is attached to (for example a Metadata Provision Agreement or a Metadataflow). It lists the allowed (included) or disallowed (excluded) values of metadata attributes, and can carry a release calendar. Documents start ref: "MetadataConstraint=AGENCY:ID(1.0)".

Simple form

The document starts with the common header, followed by the attachment and the included or excluded values.

format: "fusion-yaml(1.0.0)"
ref: "MetadataConstraint=AGENCY5:MDC_IVL(1.0)"
name: "TEST"
attachment: "MetadataProvisionAgreement=AGENCY:FLOW1_PROVIDER1(1.0.0)"
included:
  COMPONENT_1: "value-1"
  • attachment: the structure the constraint is attached to, written as a canonical value (Class=AGENCY:ID(VERSION)), because a constraint can be attached to several classes of structure.
  • included: a map from metadata attribute id to its allowed values. Each entry follows the key values rules; a single plain value is written as a string.

Complex form

format: "fusion-yaml(1.0.0)"
ref: "MetadataConstraint=AGENCY3:MDC_MIX(1.0)"
name: "TEST"
attachment:
- "MetadataProvisionAgreement=AGENCY:FLOW1_PROVIDER1(1.0.0)"
- "MetadataProvisionAgreement=AGENCY:FLOW2_PROVIDER2(1.0.0)"
included:
  COMPONENT_1:
  - "value-1|2004-04-04/2005-05-05"
  - "value-2|2005-05-05/2006-06-06"
  COMPONENT_2:
    removePrefix: true
    cascadeExcRoot:
    - "cascade-1|2007-07-07/2008-08-08"
    - "cascade-2|2009-09-09/2010-10-10"
excluded:
  COMPONENT_3:
    timeRange:
      range: true
      start: "2004-04-04"
      startInclusive: false
      end: "2006-06-06"
      endInclusive: true
      validFrom: "2010-10-10"
      validTo: "2011-11-11"
releaseCalendar:
  periodicity: "P1M1D"
  offset: "P5D"
  tolerance: "P1D"
Source: built from metadataconstraint/testIncludedWithValues.yaml and testMixed.yaml

  • attachment becomes an array when there is more than one attachment (value or array).
  • A key value is a string or an array of strings while it only lists values (COMPONENT_1). A value that is only valid for a period is written value|period. The key value becomes an object when it has a removePrefix flag, cascading values (cascade, cascadeExcRoot) or a timeRange (COMPONENT_2, COMPONENT_3). The fields of that object are described in key values and validity.
  • excluded has the same shape as included. Either can be omitted, and both can be present.
  • releaseCalendar is an object with periodicity, offset and tolerance, each written only when set.

Field reference

Field Value Written when
attachment Canonical value, or an array of canonical values The constraint has attachments
included Map of metadata attribute id to key values There are included targets
excluded Map of metadata attribute id to key values There are excluded targets
releaseCalendar Object (below) The constraint has a release calendar

releaseCalendar object:

Field Value Written when
periodicity String, e.g. "P1M1D" Set
offset String, e.g. "P5D" Set
tolerance String, e.g. "P1D" Set

The entries of included and excluded are written in the order held by the constraint; the values inside each entry are sorted.