7 Metadata Structure Definition and Metadata Set

Last modified by Artur on 2025/07/14 10:19

7.1 Context

The SDMX metamodel allows metadata:

  1. To be exchanged without the need to embed it within the object that it is describing.
  2. To be stored separately from the object that it describes, yet be linked to it (for example, an organisation has a metadata repository which supports the dissemination of metadata resulting from metadata requests generated by systems or services that have access to the object for which the metadata pertains. This is common in web dissemination where additional metadata is available for viewing (and eventually downloading) by clicking on an “information” icon next to the object to which the metadata is attached).
  3. To be indexed to aid searching (example: a registry service can process a metadata report and extract structural information that allows it to catalogue the metadata in a way that will enable users to query for it).
  4. To be reported according to a defined structure.

In order to achieve this, the following structures are modelled:

  • metadata structure definition which has the following components:
    • the object types to which the metadata are to be associated (attached)
    • the components that, together, comprise a unique key of the object type to which the metadata are to be associated
    • the reporting structure comprising the metadata attributes that can be attached to the various object types (these attributes can be structured in a hierarchy), together with any constraints that may apply (e.g. association to a code list that contains valid values for the attribute when reported in a metadata set)
  • the metadata set, which contains reported metadata

7.2 Inheritance

7.2.1 Introduction

As with the Data Structure Definition Structure, many of the constructs in this layer of the model inherit from the SDMX Base layer. Therefore, it is necessary to study both the inheritance and the relationship diagrams to understand the functionality of individual packages. The diagram below shows the full inheritance tree for the classes concerned with the MetadataStructureDefinition and the MetadataSet.

There are very few additional classes in the MetadataStructureDefinition package that do not themselves inherit from classes in the SDMX Base. In other words, the SDMX Base gives most of the structure of this sub model both in terms of associations and in terms of attributes. The relationship diagrams shown in this section show clearly when these associations are inherited from the SDMX Base (see the Appendix “A Short Guide to UML in the SDMX Information Model” to see the diagrammatic notation used to depict this). It is important to note that SDMX base structures used for the MetadataStructureDefinition are the same as those used for the DataStructureDefinition and so, even though the usage is slightly different, the underlying way of defining a MetadataStructureDefinition is similar to that used for defining a DataStructureDefinition.

7.2.2 Class Diagram - Inheritance

1747903167692-628.png

Figure 27: Inheritance class diagram of the Metadata Structure Definition

7.2.3 Explanation of the Diagram

7.2.3.1 Narrative

It is important to the understanding of the relationship class diagrams presented in this section to identify the concrete classes that inherit from the abstract classes.

The concrete classes in this part of the SDMX metamodel which require to be maintained by Maintenance Agencies all inherit from MaintainableArtefact. These are:

  • StructureUsage (concrete class is MetadataflowDefinition)
  • Structure (concrete class is MetadataStructureDefinition)

These classes also inherit the identity and versioning facets of IdentifiableArtefact, NameableArtefact, and VersionableArtefact.

A Structure contains several lists of components. The concrete classes which inherit from ComponentList and in themselves are sub components of the MetadataStructureDefinition are:

  • MetadataTarget
  • ReportStructure

ComponentList contains Components. The classes that inherit from Component are:

  • Sub Classes of TargetObject
  • MetadataAttribute

7.3 Metadata Structure Definition

7.3.1 Introduction

The diagrams and explanations in the rest of this section show how these concrete classes are related so as to support the functionality required.

7.3.2 Structures Already Described

The MetadataStructureDefinition makes use of the following ItemScheme structures either as explicit concrete classes in the model, or as possible lists which comprise the value domain of a TargetObject.

  • CategoryScheme
  • ConceptScheme
  • Codelist
  • OrganisationScheme
  • Reporting Taxonomy

7.3.3 Class Diagram – Relationship

1747902064472-244.png

Figure 28: Relationship class diagram of the Metadata Structure Definition

7.3.4 Explanation of the Diagram

7.3.4.1 Narrative

In brief a MetadataStructureDefinition (MSD) defines:

  • The MetadataTarget which defines the components (TargetObject) and their Representation which are valid for this MetadataStructureDefinition, and which are the metadata target object of one or more ReportStructure
  • The ReportStructures comprising the MetadataAttributes that can be associated with the object type identified in the referenced MetadataTargets, and hierarchical structure of the attributes

The MetadataTarget comprises one or more TargetObjects. The combination of TargetObjects identifies a specific object type to which metadata can be attached in a MetadataSet.

The TargetObject is one of the following:

  • DimensionDescriptorValuesTarget - this allows the specification of a full or partial key (as used in a dataset) to be specified in a MetadataSet as the target object
  • IdentifiableObjectTarget – this defines a specific object type, which can be any IdentifiableArtefact
  • DataSetTarget – this specifies that the target object is a DataSet
  • ReportPeriodTarget - this specifies that the report period must be present in the MetadataSet
  • ConstraintContentTarget – this specifies that target object is the content of an AttachmentConstraint i.e. the part of the data set or metadata set identified by the content of an AttachmentConstraint

The valid content of a TargetObject when reported in a MetadataSet is defined in the Representation. This can be an enumerated representation (i.e. a reference to one of the sub clases of ItemScheme – these are Codelist, ConceptScheme, OrganisationScheme, CategoryScheme, or ReportingTaxonomy) or nonenumerated.

Thus a single MetadataStructureDefinition can be defined for a discrete set of related object types. For example, a single definition can be constructed to define the metadata that can be attached to any part of a Data Structure Definition, or that can be attached to any artefact concerned with the reporting of quality metadata (such as data provider and (data) category). The MetadataTarget specifies the identification properties of a specific object type to which metadata can be attached in a MetadataSet. For example, in a DataStructureDefinition the MetadataTarget might be a Dimension, and therefore the TargetObjects are those that uniquely identify a Dimension. This will include both the DataStructureDefinition and he Dimension both of these are an IdentifiableArtefact and will use the IdentitifableObjectTarget) as both TargetObjects are required in order to identify uniquely a Dimension).

The ReportStructure comprises a set of MetadataAttributes - these can be defined as a hierarchy. Each MetadataAttribute identifies a Concept that is reported or disseminated in a MetadataSet (/conceptIdentity) that uses this MetadataStructureDefinition. Different MetadataAttributes in the same ReportStructure can use Concepts from different ConceptSchemes. Note that a MetadataAttribute does not link to a Concept that defines its role in this MetadataStructureDefinition (i.e. the MetadataAttribute does not play a role).

The MetadataAttribute can be specified as having multiple occurrences and/or specified as being mandatory (minOccurs=1 or more) or conditional (minOccurs=0). A hierarchical ReportStructure can be defined by specifying a hierarchy for a MetadataAttribute.

The ReportStructure is associated to one or more of the MetadataTargets which specify to which object the MetadataAttributes specified in the ReportStructure are attached when reported in a MetadataSet.

It can be seen from this that the specification of the object types to which a MetadataAttribute can be attached is indirect: the MetadataAttributes are defined in a ReportStructure which itself is attached to one or more MetadataTarget and the actual object is identified by the TargetObjects comprising the MetadataTarget. This gives a flexible mechanism by which the actual object types need not be defined in concrete terms in the model, but are defined dynamically in the MetadataStructureDefinition, in much the same way as the keys to which data observation are “attached” in a DataStructureDefinition. In this way the MetadataStructureDefinition can be used to define any set of MetadataAttributes and any set of object types to which they can be attached.

Each MetadataAttribute can have a Representation specified (using the /localRepresentation association). If this is not specified in the MetadataStructureDefinition then the Representation is taken from that defined for the Concept (the coreRepresentation association).

The definition of the various types of Representation can be found in the specification of the Base constructs. Note that if the Representation is non-enumerated then the association is to the ExtendedFacet (which allows for xhtml as a FacetValueType). If the Representation is enumerated then is must use a Codelist.

The MetadataStructureDefinition is linked to a MetadataflowDefinition. The MetadataflowDefinition does not have any attributes in addition to those inherited from the Base classes.

7.3.4.2 Definitions

ClassFeatureDescription
StructureUsage See “SDMX Base”.
Metadataflow Definition

Inherits from:
StructureUsage

Abstract сoncept (i.e. the structure without any metadata) of a flow of metadata that providers will provide for different reference periods.
 /structureAssociates a Metadata Structure Definition.
MetadataStructure Definition A collection of metadata concepts, their structure and usage when used to collect or disseminate reference metadata.
 /groupingAn association to a Metadata Target or Report Structure.
MetadataTarget

Inherits from
ComponentList

A set of components that define a key of an object type to which metadata may be attached.
 /componentsAssociates the Target Object components that define the key of the Metadata Target.
TargetObject

Abstract Class
Sub Classes
DimensionDescriptorValues
Target
IdentifiableObjectTarget
DataSetTarget
ReportPeriodTarget

 
 /localRepresentationAssociates a Representation to the Target Object that must be respected when the object is identified in a Metadata Set. This may be enumerated or nonenumerated.
DimensionDescriptor ValuesTarget

Inherits from

TargetObject

The target object is the key of a data series.
IdentifiableObject Target

Inherits from
TargetObject

The target object is a specified object type.
 objectTypeIdentifies the object type.
DataSetTarget

Inherits from
TargetObject

The target object is a Data Set.
ReportPeriodTarget

Inherits from
TargetObject

The target is a report period. Note that this does not describe the use of an object, but rather serves as a unique metadata key for metadata reports. Metadata reports attached to a particular object may vary over time, and this time identifier component can be used to disambiguate the reports, much like the time dimension disambiguates observations in a data series.
ConstraintTarget

Inherits from
TargetObject

The target object is the data or reference metadata that is identified in the content of an Attachment Constraint.
ReportStructure

Inherits from:
ComponentList

Defines a set of concepts that comprises the Metadata Attributes to be reported.
 /componentsAn association to the Metadata Attributes relevant to the Report Structure.
 +reportForAssociates the Metadata Targets for which this Report Structure is used.
MetadataAttribute Identifies a Concept for which a value may be reported in a Metadata Set.
 /hierarchyAssociation to one or more child Metadata Attribute.
 /conceptIdentityAn association to the concepts which defines the semantic of the attribute.
 isPresentationalIndication that the Metadata Attribute is present for structural purposes (i.e. it has child attributes) and that no value for this attribute is expected to be reported in a Metadata Set using this Report Structure.
 minOccurs maxOccursSpecifies how many occurrences of the Metadata Attribute may be reported at this point in the Metadata Report.
ConceptUsage The use of a Concept as Metadata Attribute.
 conceptAssociation to a Concept in a ConceptScheme.
 /localRepresentationAssociates a Representation that overrides any core representation specified for the Concept itself.
Representation The representation of the Metadata Attribute.

7.4 Metadata Set

7.4.1 Class Diagram

1747902223404-649.png

Figure 29: Relationship Class Diagram of the Metadata Set

7.4.2 Explanation of the Diagram

7.4.2.1 Narrative

Note that the MetadataSet must conform to the MetadataStructureDefinition associated to the MetadataflowDefinition for which this MetadataSet is an “instance of metadata”. Whilst the model shows the association to the classes of the MetadataStructureDefinition, this is for conceptual purposes to show the link to the MetadataStructureDefinition. In the actual MetadataSet as exchanged there must, of course, be a reference to the MetadataStructureDefinition and the ReportStructure, and optionally a MetadataflowDefinition, but the MetadataStructureDefinition is not necessarily exchanged with the metadata. Therefore, the MetadataStructureDefinition classes are shown in the grey areas, as these are not a part of the MetadataSet itself.

An organisation playing the role of DataProvider can be responsible for one or more MetadataSet.

A MetadataSet comprises one or more MetadataReport, each of which must be for the same ReportStructure. It references both a MetadataTarget, defined in the MetadataStructureDefinition, and contains a TargetObjectKey and ReportedAttributes.

The identified ReportStructure specifies which MetadataAttributes are expected as ReportedAttributes. The identified MetadataTarget specifies the expected content of the TargetObjectKey i.e. it specifies the information required to identify the object for which the ReportedAttributes are reported.

The TargetObjectValue can be one of:

  • TargetDataKey – this can contain:
    • a SeriesKey (set of dimension values)
    • a SeriesKey plus a value or values (giving time range) for the TimeDimension (TimeDimensionValue)
    • a value of values for the TimeDimension
  • TargetIdentifiableObject – this identifies any identifiable object (which includes both Maintainable and Identifiable objects
  • TargetDataSet – this identifies a DataSet
  • TargetReportPeriod – this specifies the report period for the Report

A simple text value for the ReportedAttribute uses the NonEnumeratedAttributeValue sub class of ReportedAttribute whilst a coded value uses the EnumeratedAttributeValue sub class.

The NonEnumeratedAttributeValue can be one of:

  • XHTMLAttributeValue – the content is XHTML
  • TextAttributeValue – the content is textual and may contain the text in multiple languages
  • OtherNonEnumeratedAttributeValue – the content is a string value that must conform to the Representation specified for the MetadataAttribute in the MetadataStructureDefinition for the relevant ReportStructure

The EnumeratedAttributeValue contains a value for a Code specified as the Representation for the MetadataAttribute in the MetadataStructureDefinition for the relevant ReportStructure.

7.4.2.2 Definitions

ClassFeatureDescription
MetadataSet Any organised collection of metadata.
 reportingBeginA specific time period in a known system of time periods that identifies the start period of a report.
 reportingEndA specific time period in a known system of time periods that identifies the ebd period of a report.
 dataExtractionDateA specific time period that identifies the date and time that the data are extracted from a data source.
 validFromIndicates the inclusive start time indicating the validity of the information in the data set.
 validToIndicates the inclusive end time indicating the validity of the information in the metadata set.
 publicationYearSpecifies the year of publication of the data or metadata in terms of whatever provisioning agreements might be in force.
 publicationPeriodSpecifies the period of publication of the data or metadata in terms of whatever provisioning agreements might be in force.
 setIdProvides an identification of the metadata set.
 actionDefines the action to be taken by the recipient system (update, replace, delete)
 +describedByAssociates a Metadataflow Definition to the Metadata Set.
 +structuredByAssociates the Metadata Structure Definition that defines the structure of the Metadata Set. Note that the Metadata Structure Definition is the same as that associated (nonmandatory) to the Metadataflow Definition.
 +publishedByAssociates the Data Provider that reports/publishes the metadata.
 +describedByReference to the Report Structure.
MetadataReport A set of values for Metadata Attributes defined in a Report Structure of a Metadata Structure Definition.
 +attachesToAssociates the object key to which metadata is to be attached.
 +targetAssociates the Metadata Target that defines the target object to which the metadata are to be associated.
 +metadataAssociates the Reported Attribute values which are to be associated with the object or objects identified by the Target Object Key.
TargetObjectKey Identifies the key of the object to which the metadata are to be attached.
 +valueFor

Associates the Metadata Target that identifies the object type and the component structure of the Target Object Key.

Note that this is a conceptual association showing the link to the MSD construct.

 +keyValuesAssociates the Target Object Values of the Target Object Key.
TargetObjectValue

Abstract class
Sub classes are
TargetDataKey
TargetIdentifiableObject
TargetDataSet
TargetReportPeriod

The key of an individual object of the type specified in the Metadata Target of the Metadata Structure Definition.
 +valueFor

Associates the Target Object for which this value is provided.

Note that this is a conceptual association showing the link to the MSD construct.

TargetDataKey

Inherits from
TargetObjectValue

The identification of the components and the values that form the data or metadata key.
ComponentValue Collectively contain the identification of the components and the values that form the data key.
value The key value.
 +valueForAssociates the Component for which the value is declared.
TimeDimensionValue Contains identification of the Time Dimension and the value.
TargetIdentifiable Object

Inherits from
TargetObjectValue

Specifies the identification of an Identifiable object.
StructureRef Contains the identification of an Identifiable object.
 structureTypeThe object type of the target object.

Maintainable
ArtefactRef
Identifiable
ArtefactRef

 Identification of the target object by means of its identifier constructs i.e agency ID, id, version for Maintainable Object plus, for Identifiable Object, the id.
 +containedObjectAssociation to a contained object in a hierarchy of Identifiable Objects such as a Transition in a Process Step.
TargetDataSet

Inherits from
TargetObjectValue

Contains the identification of a Data Set
TargetReportPeriod

Inherits from
TargetObjectValue

Contains the period covered by the Metadata Report.
ReportedAttribute

Abstract class Sub classes are:
NonEnumeratedAttributeValue
EnumeratedAttributeValue

The value for a Metadata Attribute.
 +valueFor

Association to the Metadata Attribute in the Metadata Structure Definition that identifies the Concept and allowed Representation for the Reported Attribute.
Note that this is a conceptual association showing the link to the MSD construct. The syntax for the Reported Attribute will state, in some form, the id of the Metadata Attribute.

 +childAssociation to a child Reported Attribute consistent with the hierarchy defined in the Report Structure for the Metadata Attribute for which this child is a Reported Attribute.
NonEnumerated AttributeValue

Inherits from
ReportedAttribute
Sub class:
XHTMLAttributeValue
TextAttributeValue
OtherNonEnumerated
AttributeValue

The content of a Reported Attribute where this is textual.
XHTMLAttributeValue This contains XHTML.
 valueThe string value of the XHTML.
TextAttributeValue This value of a Reported Attribute where the content is humanreadable text.
 textThe string value is text. This can be present in multiple language versions.
OtherNonEnumerated AttributeValue The value of a Reported Attribute where the content is not of humanreadable text.
 valueA text string that is consistent in format to that defined in the Representation of the Metadata Attribute for which this is a Reported Attribute.
EnumeratedAttribute Value

Inherits from
MetadataAttributeValue

The content of a Reported Attribute that is taken from a Code in a Code list.
 valueThe Code value of the Reported Attribute.
 +value

Association to a Code in the Code list specified in the Representation of the Metadata Attribute for which this Reported Attribute is the value
Note that this shows the conceptual link to the Item that is the value. In reality, the value itself will be contained in the Enumerated Attribute Value.