-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadataregistry.xsd
285 lines (256 loc) · 11.6 KB
/
metadataregistry.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:mdr="http://www.metadataregistry.org.uk/assets/schema/1.0/metadataregistry.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.metadataregistry.org.uk/assets/schema/1.0/metadataregistry.xsd" elementFormDefault="qualified" version="1.0" xml:lang="EN">
<xs:simpleType name="Name">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ID">
<xs:restriction base="xs:anyURI">
<xs:pattern value="https?://.*"/>
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Status">
<xs:restriction base="xs:string">
<xs:enumeration value="DRAFT"/>
<xs:enumeration value="FINALIZED"/>
<xs:enumeration value="DEPRECATED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PreservedString">
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Description">
<xs:restriction base="mdr:PreservedString">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Rule">
<xs:restriction base="mdr:PreservedString">
<xs:maxLength value="10000"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExtensionKey">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExtensionValue">
<xs:restriction base="mdr:PreservedString">
<xs:maxLength value="2000"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Symbol">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Extension">
<xs:simpleContent>
<xs:extension base="mdr:ExtensionValue">
<xs:attribute name="key" type="mdr:ExtensionKey" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Extensions">
<xs:sequence>
<xs:element name="extension" type="mdr:Extension" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Enumeration">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="value" use="required" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Enumerations">
<xs:sequence>
<xs:element name="enumeration" type="mdr:Enumeration" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="KnownCatalogueElementType">
<xs:restriction base="mdr:Name">
<xs:enumeration value="classification"/>
<xs:enumeration value="model"/>
<xs:enumeration value="dataElement"/>
<xs:enumeration value="valueDomain"/>
<xs:enumeration value="dataType"/>
<xs:enumeration value="measurementUnit"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="JavaClass">
<xs:restriction base="xs:string">
<xs:pattern value="([\p{L}_$][\p{L}\p{N}_$]*\.)*[\p{L}_$][\p{L}\p{N}_$]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CatalogueElementType">
<xs:union memberTypes="mdr:JavaClass mdr:KnownCatalogueElementType"/>
</xs:simpleType>
<xs:complexType name="Reference">
<xs:annotation>
<xs:documentation>
The Reference can must always contain at least "ref" attribute or "name". If the "classification" is
provided the name will be searched only within this classification. Also if element of this type
is used inside element of type "Classification" it is assumed that the element should be searched by name
within the surrounding classification. This does not apply on elements having the "ref" attribute
provided. In that case the element is resolved by the ID. The type of the catalogue element can
be provided to distinguish between elements having same name and classification but different types
(this is quite common for value domains and it's data types)
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:sequence>
<xs:element name="metadata" type="mdr:Extensions" minOccurs="0"/>
</xs:sequence>
</xs:sequence>
<xs:attribute name="name" type="mdr:Name"/>
<xs:attribute name="classification" type="mdr:Name"/>
<xs:attribute name="ref" type="mdr:ID"/>
<xs:attribute name="type" type="mdr:CatalogueElementType"/>
<xs:attribute name="href" type="mdr:ID"/>
</xs:complexType>
<xs:simpleType name="KnownRelationshipTypes">
<xs:restriction base="mdr:Name">
<xs:enumeration value="containment"/>
<xs:enumeration value="base"/>
<xs:enumeration value="hierarchy"/>
<xs:enumeration value="relatedTo"/>
<xs:enumeration value="synonym"/>
<xs:enumeration value="favourite"/>
<xs:enumeration value="classification"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="RelationshipType">
<xs:union memberTypes="mdr:Name mdr:KnownRelationshipTypes"/>
</xs:simpleType>
<xs:complexType name="Relationship">
<xs:complexContent>
<xs:extension base="mdr:Reference">
<xs:attribute name="relationshipType" type="mdr:RelationshipType" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Relationships">
<xs:choice maxOccurs="unbounded">
<xs:element name="from" type="mdr:Relationship"/>
<xs:element name="to" type="mdr:Relationship"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="CatalogueElement" abstract="true">
<xs:annotation>
<xs:documentation>
CatalogueElement is either a in-lined definition of the element or a reference to the existing element.
If "ref" attribute is set, any other attributes or nested elements are ignored.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="mdr:Reference">
<xs:sequence>
<xs:element name="description" type="mdr:Description" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="basedOn" type="mdr:Reference"/>
<xs:element name="relatedTo" type="mdr:Reference"/>
<xs:element name="synonym" type="mdr:Reference"/>
</xs:choice>
<xs:element name="extensions" type="mdr:Extensions" minOccurs="0"/>
<xs:element name="relationships" type="mdr:Relationships" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="mdr:ID"/>
<xs:attribute name="status" type="mdr:Status"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="MeasurementUnit">
<xs:complexContent>
<xs:extension base="mdr:CatalogueElement">
<xs:attribute name="symbol" type="mdr:Symbol"/>
<xs:attribute name="type" use="prohibited"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DataType">
<xs:complexContent>
<xs:extension base="mdr:CatalogueElement">
<xs:sequence>
<xs:element name="enumerations" type="mdr:Enumerations" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="prohibited"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ValueDomain">
<xs:complexContent>
<xs:extension base="mdr:CatalogueElement">
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element name="rule" type="mdr:Rule"/>
<xs:element name="regex" type="xs:string"/>
</xs:choice>
<xs:element name="unitOfMeasure" type="mdr:MeasurementUnit" minOccurs="0"/>
<xs:element name="dataType" type="mdr:DataType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="prohibited"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DataElement">
<xs:complexContent>
<xs:extension base="mdr:CatalogueElement">
<xs:sequence>
<xs:element name="valueDomain" type="mdr:ValueDomain" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="prohibited"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Model">
<xs:complexContent>
<xs:extension base="mdr:CatalogueElement">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="model" type="mdr:Model"/>
<xs:element name="dataElement" type="mdr:DataElement"/>
</xs:choice>
<xs:attribute name="type" use="prohibited"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Classification">
<xs:complexContent>
<xs:extension base="mdr:CatalogueElement">
<xs:sequence>
<xs:element name="globalSearchFor" type="mdr:CatalogueElementType" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="model" type="mdr:Model"/>
<xs:element name="dataElement" type="mdr:DataElement"/>
<xs:element name="valueDomain" type="mdr:ValueDomain"/>
<xs:element name="dataType" type="mdr:DataType"/>
<xs:element name="measurementUnit" type="mdr:MeasurementUnit"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="type" use="prohibited"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Catalogue">
<xs:sequence>
<xs:element name="createAutomatically" type="mdr:CatalogueElementType" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice maxOccurs="unbounded">
<xs:element name="classification" type="mdr:Classification"/>
<xs:element name="model" type="mdr:Model"/>
<xs:element name="dataElement" type="mdr:DataElement"/>
<xs:element name="valueDomain" type="mdr:ValueDomain"/>
<xs:element name="dataType" type="mdr:DataType"/>
<xs:element name="measurementUnit" type="mdr:MeasurementUnit"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:element name="catalogue" type="mdr:Catalogue"/>
</xs:schema>