Wiki source code of 5 Reference Metadata

Version 3.3 by Helena on 2025/05/16 00:08

Show last authors
1 {{box title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 == 5.1 Scope of the Metadata Structure Definition (MSD) ==
6
7 The scope of the MSD is reduced in SDMX 3.0, by means of simplifying its structure, but also in the way referenced Artefacts are targeted. In fact, the MSD is restricted to play the role of a single container, without targeting any specific Artefact. The possible targets of Metadata Set are specified in the Metadataflows or Metadata Provision Agreements relating to that MSD. To achieve that, the structure of the Metadataflow has changed in this version of the standard. Moreover, the Metadata Provision Agreement Artefact is introduced to include this feature.
8
9 Two more changes, introduced in this version, are the following:
10
11 * The Metadata Set becomes a Maintainable Artefact but maintained by a Metadata Provider (another new Artefact in this version).
12 * Metadata Attributes may also be used in Data Structure Definitions, as long as the latter reference the Metadata Structure Definition that specify those Metadata Attributes.
13
14 == 5.2 Identification of the Object(s) to which the Metadata is to be attached ==
15
16 The following example shows the structure and naming of the MSD and related components for creating reference metadata.
17
18 The schematic structure of an MSD is shown below.
19
20 [[image:SDMX 3-0-0 SECTION 6 FINAL-1.0_en_bf0dc4e4.jpg||height="309" width="550"]]
21
22 ==== Figure 1: Schematic of the Metadata Structure Definition ====
23
24 The MSD contains one Metadata Attribute Descriptor comprising the Metadata Attributes that identify the Concepts for which metadata may be reported in the Metadata Set. The Metadataflow and Metadata Provision Agreement comprise the specification of the objects to which metadata can be reported in a Metadata Set (Metadata Target(s)).
25
26 The high-level view of the MSD, as well as the way the Metadataflow and Metadata Provision Agreement specify the Targets:
27
28 **<str:MetadataStructure agencyID="SDMX" id="MSD" version="1.0.0-draft">**
29
30 **<com:Name>MSD 3.0 sample</com:Name>**
31
32 **<str:MetadataAttributeDescriptor id="MetadataAttributeDescriptor">**
33
34 **...**
35
36 **</str: MetadataAttributeDescriptor>**
37
38 **</str:MetadataStructure>**
39
40 **Figure 2: The high-level view of the MSD containing one Metadata Attribute Descriptor**
41
42 **<str:Metadataflow agencyID="OECD" id="GENERAL_METADATA" version="1.0.0draft">**
43
44 **<com:Name xml:lang="en">Metadataflow 3.0 sample</com:Name> &nbsp;&nbsp;<str:Structure>urn:sdmx:org.sdmx.infomodel.metadatastructure.**
45
46 **MetadataStructure=OECD:MSD(1.0.0-draft)</str:Structure>**
47
48 **<!~-~- Attach to any Dataflows maintained by the OECD ~-~-> &nbsp;&nbsp;<str:Targets>urn:sdmx:org.sdmx.infomodel.datastructure.**
49
50 **Dataflow=OECD:*(*)</str:Targets>**
51
52 **</str:Metadataflow>**
53
54 ==== Figure 3: Wildcarded Target Objects as specified in a Metadataflow ====
55
56 **<str:MetadataProvisionAgreement agencyID="OECD" id="ABS_INDICATORS" version="1.0.0-draft">**
57
58 **<com:Name xml:lang="en">Metadata Provision Agreement 3.0 sample</com:Name>**
59
60 **<str:StructureUsage>urn:sdmx:org.sdmx.infomodel.metadatastructure.**
61
62 **Metadataflow=OECD:GENERAL_METADATA(1.0.0-draft)</str:StructureUsage>**
63
64 **<str:MetadataProvider>urn:sdmx:org.sdmx.infomodel.base.**
65
66 **MetadataProvider=OECD:METADATA_PROVIDERS(1.0).ABS</str:MetadataProvider>**
67
68 **<!~-~- Attach to specific Dataflows maintained by the OECD ~-~->**
69
70 **<str:Target>urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow= OECD:GDP(*)</str:Target>**
71
72 **<str:Target>urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow= OECD:EXR(*)</str:Target>**
73
74 **<str:Target>urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=**
75
76 **OECD:ABC(*)</str:Target>**
77
78 **</str:MetadataProvisionAgreement>**
79
80 ==== Figure 4: Specific Target Objects as specified in a Metadata Provision Agreement ====
81
82 Note that the SDMX-ML schemas have specific XML elements for each identifiable object type because identifying, for instance, a Maintainable Object has different properties from an Identifiable Object which must also include the agencyId, version, and id of the Maintainable Object in which it resides.
83
84 == 5.3 Metadata Structure Definition ==
85
86 An example is shown below.
87
88 **<str:MetadataStructure agencyID="SDMX" id="MSD" version="1.0.0-draft">**
89
90 **<com:Name>MSD 3.0 sample</com:Name>**
91
92 **<str:MetadataAttributeDescriptor id="MetadataAttributeDescriptor">**
93
94 **<str:MetadataAttribute id="CONTACT" isPresentational="true"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.**
95
96 **Concept=SDMX:CONCEPTS(1.0.0).CONTACT</str:ConceptIdentity>**
97
98 **<str:MetadataAttribute id="CONTACT_NAME" minOccurs="1" maxOccurs="1">**
99
100 **<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.**
101
102 **Concept=SDMX:CONCEPTS(1.0.0).CONTACT_NAME</str:ConceptIdentity>**
103
104 **<str:LocalRepresentation>**
105
106 **<str:TextFormat textType="String"/>**
107
108 **</str:LocalRepresentation>**
109
110 **</str:MetadataAttribute>**
111
112 **<str:MetadataAttribute id="ADDRESS" minOccurs="1" maxOccurs="3" isPresentational="true">**
113
114 **<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.**
115
116 **Concept=SDMX:CONCEPTS(1.0.0).ADDRESS</str:ConceptIdentity> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<str:MetadataAttribute id="HOUSE_NUMBER" minOccurs="1" maxOccurs="1">**
117
118 **<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.**
119
120 **Concept=SDMX:CONCEPTS(1.0.0).HOUSE_NUMBER</str:ConceptIdentity>**
121
122 **<str:LocalRepresentation>**
123
124 **<str:TextFormat textType="Integer"/>**
125
126 **</str:LocalRepresentation>**
127
128 **</str:MetadataAttribute>**
129
130 **</str:MetadataAttribute>**
131
132 **</str:MetadataAttribute>**
133
134 **</str:MetadataAttributeDescriptor>**
135
136 **</str:MetadataStructure>**
137
138 **Figure 5: Example MSD showing specification of some Metadata Attributes **This example shows the following hierarchy of Metadata Attributes:
139
140 * Contact – this is presentational; no metadata is expected to be reported at this level
141 ** Contact Name
142 ** Address – this is also presentational; up to 3 addresses are allowed
143 *** House Number
144
145 == 5.4 Metadata Set ==
146
147 An example of reporting metadata according to the MSD described above, is shown below.
148
149 **<msg:MetadataSet id="ALB" metadataProviderID="OECD" version="1.0.0"> <str:MetadataProvision>urn:sdmx:org.sdmx.infomodel.registry.MetadataProvis ionAgreement=OECD:ABS_INDICATORS(1.0.0-draft)</str:MetadataProvision> <str:Target>urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=OECD:GDP(1.**
150
151 **0.0)</str:Target>**
152
153 **<md:AttributeSet>**
154
155 **<md:ReportedAttribute id="CONTACT">**
156
157 **<md:AttributeSet>**
158
159 **<md:ReportedAttribute id="CONTACT_NAME">John Doe**
160
161 **</md:ReportedAttribute>**
162
163 **<md:ReportedAttribute id="ADDRESS">**
164
165 **<md:AttributeSet>**
166
167 **<md:ReportedAttribute id="STREET_NAME">**
168
169 **<com:Text xml:lang="en">5th Avenue</com:Text>**
170
171 **</md:ReportedAttribute>**
172
173 **<md:ReportedAttribute id="HOUSE_NUMBER">12**
174
175 **</md:ReportedAttribute>**
176
177 **</md:AttributeSet>**
178
179 **</md:ReportedAttribute>**
180
181 **<md:ReportedAttribute id="HTML_ATTR">**
182
183 **<com:StructuredText xml:lang="en">**
184
185 **<div xmlns="http:~/~/www.w3.org/1999/xhtml">**
186
187 **<p>Lorem Ipsum</p>**
188
189 **</div>**
190
191 **</com:StructuredText>**
192
193 **</md:ReportedAttribute>**
194
195 **</md:AttributeSet>**
196
197 **</md:ReportedAttribute>**
198
199 **</md:AttributeSet>**
200
201 **</msg:MetadataSet>**
202
203 ==== Figure 6: Example Metadata Set ====
204
205 This example shows:
206
207 1. The reference to the Metadata Provision Agreement and Metadata Target
208 1. The reported metadata attributes (AttributeSet)
209
210 == 5.5 Reference Metadata in Data Structure Definition and Dataset ==
211
212 An important change of SDMX 3.0 is the ability to reference an MSD within a DSD, in order to report any Metadata Attributes defined in the former to Datasets of the latter.
213
214 This is achieved by the following:
215
216 * In a DSD, the user may add a reference to one MSD.
217 * In the Attribute Descriptor of the DSD, the user may include any Metadata Attributes defined in the linked MSD. o For each link to a Metadata Attribute, an Attribute Relationship may be specified (similarly to that for Data Attributes).
218 * In any Dataset complying with this DSD, Metadata Attributes may be reported according to the specified Attribute Relationship.
219
220 o The hierarchy of the Metadata Attributes defined in the MSD must be respected and they are reported in the same way as in a Metadataset, under the level they are related within the DSD, via their Attribute Relationship.
221
222 * In Data Constraints, the user is allowed to restrict values for Metadata Attributes, in the same way as Data Attributes (more on this in section “10 Constraints”).