1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<xs:schema targetNamespace="http://ns.dataone.org/service/types/v2.0"
|
3
|
xmlns:d1="http://ns.dataone.org/service/types/v1"
|
4
|
xmlns:d1_v1.1="http://ns.dataone.org/service/types/v1.1"
|
5
|
xmlns:d1_v2.0="http://ns.dataone.org/service/types/v2.0"
|
6
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
7
|
version="2.0.0"
|
8
|
elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
9
|
|
10
|
<!--
|
11
|
$HeadURL: $
|
12
|
$Id: $
|
13
|
|
14
|
About this document:
|
15
|
|
16
|
This XML Schema document defines the common data structures that are used
|
17
|
to support messaging between the major components of the DataONE
|
18
|
infrastructure and to guide structure design for storage of information
|
19
|
required for normal operations.
|
20
|
|
21
|
License:
|
22
|
|
23
|
This work was created by participants in the DataONE project, and is
|
24
|
jointly copyrighted by participating institutions in DataONE. For
|
25
|
more information on DataONE, see our web site at http://dataone.org.
|
26
|
|
27
|
Copyright 2015
|
28
|
|
29
|
Licensed under the Apache License, Version 2.0 (the "License");
|
30
|
you may not use this file except in compliance with the License.
|
31
|
You may obtain a copy of the License at
|
32
|
|
33
|
http://www.apache.org/licenses/LICENSE-2.0
|
34
|
|
35
|
Unless required by applicable law or agreed to in writing, software
|
36
|
distributed under the License is distributed on an "AS IS" BASIS,
|
37
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
38
|
See the License for the specific language governing permissions and
|
39
|
limitations under the License.
|
40
|
|
41
|
Formatting:
|
42
|
|
43
|
- This document MUST be saved as a UTF-8 encoded file.
|
44
|
|
45
|
- Indent using spaces, not tabs, with two spaces per indent level.
|
46
|
|
47
|
- Line wrapping should be set to 80 chars, adjusted as necessary
|
48
|
|
49
|
- Documentation entries contain formatting instructions for integration with
|
50
|
the DataONE architecture documentation, available at:
|
51
|
|
52
|
http://mule1.dataone.org/ArchitectureDocs-current
|
53
|
|
54
|
-->
|
55
|
|
56
|
<!-- NOTE THAT ALL SERIALIZEABLE ROOT ELEMENTS FOR MESSAGES SHOULD BE OF A
|
57
|
COMPLEX TYPE -->
|
58
|
|
59
|
<xs:import namespace="http://ns.dataone.org/service/types/v1"
|
60
|
schemaLocation="http://ns.dataone.org/service/types/v1" />
|
61
|
<xs:import namespace="http://ns.dataone.org/service/types/v1.1"
|
62
|
schemaLocation="http://ns.dataone.org/service/types/v1.1" />
|
63
|
|
64
|
<!-- MediaTypeProperty extension-->
|
65
|
<xs:complexType name="MediaTypeProperty">
|
66
|
<xs:annotation>
|
67
|
<xs:documentation>Additional optional properties for MediaType as
|
68
|
described by IANA.</xs:documentation>
|
69
|
</xs:annotation>
|
70
|
<xs:simpleContent>
|
71
|
<xs:extension base="xs:string">
|
72
|
<xs:attribute name="name" type="xs:string" use="required">
|
73
|
<xs:annotation>
|
74
|
<xs:documentation>The property name for this entry.
|
75
|
</xs:documentation>
|
76
|
</xs:annotation>
|
77
|
</xs:attribute>
|
78
|
</xs:extension>
|
79
|
</xs:simpleContent>
|
80
|
</xs:complexType>
|
81
|
|
82
|
<!-- MediaType -->
|
83
|
<xs:complexType name="MediaType">
|
84
|
<xs:annotation>
|
85
|
<xs:documentation>Value drawn from the value space of IANA Media Types (
|
86
|
http://www.iana.org/assignments/media-types/media-types.xhtml ). When
|
87
|
specified, indicates the IANA Media Type (aka MIME-Type) of the object.
|
88
|
The name attribute MUST include the media type and subtype
|
89
|
(e.g. text/csv). The media type value is not case sensitive.
|
90
|
</xs:documentation>
|
91
|
<xs:documentation>Any required media type parameters must be provided, and
|
92
|
optional parameters may be specified. There are no explicit constraints
|
93
|
on the name of media-type properties or their values, however they
|
94
|
SHOULD conform to media type optional and required parameters as
|
95
|
specified in the respective media type RFC.
|
96
|
</xs:documentation>
|
97
|
</xs:annotation>
|
98
|
<xs:sequence>
|
99
|
<xs:element name="property"
|
100
|
type="d1_v2.0:MediaTypeProperty"
|
101
|
minOccurs="0"
|
102
|
maxOccurs="unbounded">
|
103
|
<xs:annotation>
|
104
|
<xs:documentation>Media-type parameter(s) as specified by the
|
105
|
respective RFC for the media-type.
|
106
|
</xs:documentation>
|
107
|
</xs:annotation>
|
108
|
</xs:element>
|
109
|
</xs:sequence>
|
110
|
<xs:attribute name="name" type="xs:string" use="required" >
|
111
|
<xs:annotation>
|
112
|
<xs:documentation>The value of the media-type specified as a
|
113
|
required 'name' attribute of the mediaType element.
|
114
|
</xs:documentation>
|
115
|
</xs:annotation>
|
116
|
</xs:attribute>
|
117
|
</xs:complexType>
|
118
|
|
119
|
|
120
|
<!-- Updated SystemMetadata type -->
|
121
|
<xs:complexType name="SystemMetadata" >
|
122
|
<xs:annotation>
|
123
|
<xs:documentation>System metadata in DataONE APIs version 2.0 extends
|
124
|
the :class:`types.SystemMetadata` definition of version 1.x by adding
|
125
|
:term:`seriesId`, :term:`mediaType`, and :term:`fileName` elements. Each
|
126
|
of these are optional, so Version 1.x System Metadata is compatible with
|
127
|
Version 2.x, though not vice-versa.
|
128
|
</xs:documentation>
|
129
|
</xs:annotation>
|
130
|
<xs:complexContent>
|
131
|
<xs:extension base="d1:SystemMetadata">
|
132
|
<xs:sequence>
|
133
|
<xs:element name="seriesId" type="d1:Identifier" minOccurs="0">
|
134
|
<xs:annotation>
|
135
|
<xs:documentation>The :term:`seriesId` is a unique Unicode
|
136
|
string that can be used to identify an object revision chain
|
137
|
in DataONE. When included, the seriesId can be used to
|
138
|
reference the latest version of and object in the revision
|
139
|
chain. API methods that rely on byte fixity (e.g. for content
|
140
|
replication) will not accept seriesId in place of discrete
|
141
|
identifiers.</xs:documentation>
|
142
|
<xs:documentation>The values used for seriesId must be unique
|
143
|
within DataONE and cannot be the same as the :term:`primary
|
144
|
identifier` of an object. </xs:documentation>
|
145
|
<xs:documentation>The same encoding rules used for identifier
|
146
|
values apply to seriesId values.</xs:documentation>
|
147
|
</xs:annotation>
|
148
|
</xs:element>
|
149
|
<xs:element name="mediaType" type="d1_v2.0:MediaType" minOccurs="0">
|
150
|
<xs:annotation>
|
151
|
<xs:documentation>When specified, indicates the IANA Media
|
152
|
Type (aka MIME-Type) of the object. When specified, this
|
153
|
value overrides the default value specified in the version
|
154
|
2.0 ObjectFormat structure. The value should include the
|
155
|
media type and subtype (e.g. text/csv). The mediaType value
|
156
|
is not case sensitive.</xs:documentation>
|
157
|
<xs:documentation>The purpose of this value is to provide
|
158
|
more detailed information about the specific media type
|
159
|
of the associated object than may be available through
|
160
|
the associated ObjectFormat.
|
161
|
</xs:documentation>
|
162
|
<xs:documentation>When specified, the mediaType value here
|
163
|
should be used in preference to the value recorded in the
|
164
|
referenced :class:`ObjectFormat`.
|
165
|
</xs:documentation>
|
166
|
<xs:documentation>This value SHOULD be set by the content
|
167
|
creator. It MAY be set by any receiving agent if the value
|
168
|
is not already set, the value in the ObjectFormat is less
|
169
|
specific, and a correct value is specified elsewhere such
|
170
|
as by a HTTP Content-Type parameter.
|
171
|
</xs:documentation>
|
172
|
<xs:documentation>This value may only be changed to correct
|
173
|
an erroneous entry.</xs:documentation>
|
174
|
</xs:annotation>
|
175
|
</xs:element>
|
176
|
<xs:element name="fileName" type="xs:string" minOccurs="0">
|
177
|
<xs:annotation>
|
178
|
<xs:documentation>Optional tough recommended value that
|
179
|
provides a suggested file name for the object. Values should
|
180
|
conform to cross platform file naming conventions.
|
181
|
</xs:documentation>
|
182
|
<xs:documentation>This value SHOULD be set by the content
|
183
|
creator.</xs:documentation>
|
184
|
<xs:documentation>This value MAY be set by any receiving agent
|
185
|
Changing the value is discouraged once set, unless by the
|
186
|
authoritative Member Node of content owner.
|
187
|
</xs:documentation>
|
188
|
</xs:annotation>
|
189
|
</xs:element>
|
190
|
</xs:sequence>
|
191
|
</xs:extension>
|
192
|
</xs:complexContent>
|
193
|
</xs:complexType>
|
194
|
|
195
|
<!-- Node List -->
|
196
|
<xs:complexType name="NodeList">
|
197
|
<xs:annotation>
|
198
|
<xs:documentation> A list of :class:`v2_0.Types.Node` entries returned by
|
199
|
:func:`CNCore.listNodes()`.
|
200
|
</xs:documentation>
|
201
|
<xs:documentation>NodeList is described in :mod:`NodeList`.
|
202
|
</xs:documentation>
|
203
|
</xs:annotation>
|
204
|
<xs:sequence>
|
205
|
<xs:element name="node"
|
206
|
type="d1_v2.0:Node"
|
207
|
maxOccurs="unbounded"
|
208
|
minOccurs="1"/>
|
209
|
</xs:sequence>
|
210
|
</xs:complexType>
|
211
|
|
212
|
|
213
|
<!-- Updated Node type to allow for Service Extensions-->
|
214
|
<xs:complexType name="Node">
|
215
|
<xs:annotation>
|
216
|
<xs:documentation>Extends the Version 1.x :class:`Types.Node` by adding
|
217
|
an optional unbounded parameter entry that can be used to provide
|
218
|
additional simple metadata relevant to a Node. </xs:documentation>
|
219
|
</xs:annotation>
|
220
|
<xs:complexContent>
|
221
|
<xs:extension base="d1:Node">
|
222
|
<xs:sequence>
|
223
|
<xs:element name="property"
|
224
|
type="d1_v2.0:Property"
|
225
|
minOccurs="0"
|
226
|
maxOccurs="unbounded">
|
227
|
<xs:annotation>
|
228
|
<xs:documentation>Allows additional attributes be added to the
|
229
|
Node document as needed.</xs:documentation>
|
230
|
</xs:annotation>
|
231
|
</xs:element>
|
232
|
</xs:sequence>
|
233
|
</xs:extension>
|
234
|
</xs:complexContent>
|
235
|
</xs:complexType>
|
236
|
|
237
|
|
238
|
<!-- Property extension-->
|
239
|
<xs:complexType name="Property">
|
240
|
<xs:annotation>
|
241
|
<xs:documentation>Additional Property elements can be included to
|
242
|
describe the Node in more detail. Some properties will come from
|
243
|
controlled vocabularies, indicated by the type attribute, while
|
244
|
others will be free-form key value pairs.</xs:documentation>
|
245
|
</xs:annotation>
|
246
|
<xs:simpleContent>
|
247
|
<xs:extension base="xs:string">
|
248
|
<xs:attribute name="key" type="xs:string" use="required">
|
249
|
<xs:annotation>
|
250
|
<xs:documentation>The property key for this entry. Should be
|
251
|
unique within the Node element.</xs:documentation>
|
252
|
</xs:annotation>
|
253
|
</xs:attribute>
|
254
|
<xs:attribute name="type" type="xs:string" use="optional">
|
255
|
<xs:annotation>
|
256
|
<xs:documentation>The optional type for the property. Can be
|
257
|
used to indicate if a controlled vocabulary is used for the
|
258
|
property key to better facilitate machine interpretation.
|
259
|
</xs:documentation>
|
260
|
</xs:annotation>
|
261
|
</xs:attribute>
|
262
|
</xs:extension>
|
263
|
</xs:simpleContent>
|
264
|
</xs:complexType>
|
265
|
|
266
|
<!-- Updated ObjectFormat type to allow for MIME type and extension -->
|
267
|
<xs:complexType name="ObjectFormat">
|
268
|
<xs:annotation>
|
269
|
<xs:documentation>Extends Version 1.x :class:`Types.ObjectFormat` by
|
270
|
adding :term:`mediaType` and :term:`extension` elements.
|
271
|
</xs:documentation>
|
272
|
</xs:annotation>
|
273
|
<xs:complexContent>
|
274
|
<xs:extension base="d1:ObjectFormat">
|
275
|
<xs:sequence>
|
276
|
<xs:element name="mediaType" type="d1_v2.0:MediaType" minOccurs="0">
|
277
|
<xs:annotation>
|
278
|
<xs:documentation>The IANA Media Type for this object format.
|
279
|
</xs:documentation>
|
280
|
</xs:annotation>
|
281
|
</xs:element>
|
282
|
<xs:element name="extension" type="xs:string" minOccurs="0">
|
283
|
<xs:annotation>
|
284
|
<xs:documentation>Suggested file name extension to be used
|
285
|
when serializing this type of object to a file. The value
|
286
|
should not include the period (.).</xs:documentation>
|
287
|
</xs:annotation>
|
288
|
</xs:element>
|
289
|
</xs:sequence>
|
290
|
</xs:extension>
|
291
|
</xs:complexContent>
|
292
|
</xs:complexType>
|
293
|
|
294
|
<!-- ObjectFormatList -->
|
295
|
<xs:complexType name="ObjectFormatList">
|
296
|
<xs:annotation>
|
297
|
<xs:documentation>Extends :class:`Types.ObjectFormatList` to provide a
|
298
|
list of :class:`v2_0.Types.ObjectFormat`.
|
299
|
</xs:documentation>
|
300
|
</xs:annotation>
|
301
|
<xs:complexContent>
|
302
|
<xs:extension base="d1:Slice">
|
303
|
<xs:sequence>
|
304
|
<xs:element name="objectFormat"
|
305
|
type="d1_v2.0:ObjectFormat"
|
306
|
minOccurs="1"
|
307
|
maxOccurs="unbounded" />
|
308
|
</xs:sequence>
|
309
|
</xs:extension>
|
310
|
</xs:complexContent>
|
311
|
</xs:complexType>
|
312
|
|
313
|
<!-- Log -->
|
314
|
<xs:complexType name="Log">
|
315
|
<xs:annotation>
|
316
|
<xs:documentation>Extends :class:`Types.Log` to represent a collection of
|
317
|
:class:`v2_0.Types.LogEntry` elements, used to transfer log information
|
318
|
between DataONE components.</xs:documentation>
|
319
|
</xs:annotation>
|
320
|
<xs:complexContent>
|
321
|
<xs:extension base="d1:Slice">
|
322
|
<xs:sequence>
|
323
|
<xs:element name="logEntry" type="d1_v2.0:LogEntry" minOccurs="0"
|
324
|
maxOccurs="unbounded" />
|
325
|
</xs:sequence>
|
326
|
</xs:extension>
|
327
|
</xs:complexContent>
|
328
|
</xs:complexType>
|
329
|
|
330
|
<!-- LogEntry -->
|
331
|
<xs:complexType name="LogEntry">
|
332
|
<xs:annotation>
|
333
|
<xs:documentation>Extends :class:`Types.LogEntry` by relaxing the value
|
334
|
space for the *event* element.</xs:documentation>
|
335
|
</xs:annotation>
|
336
|
<xs:sequence>
|
337
|
<xs:element name="entryId" type="d1:NonEmptyString"
|
338
|
minOccurs="1" maxOccurs="1">
|
339
|
<xs:annotation>
|
340
|
<xs:documentation>A unique identifier for this log entry. The
|
341
|
identifier should be unique for a particular node; This is not drawn
|
342
|
from the same value space as other identifiers in DataONE, and so is
|
343
|
not subjec to the same restrictions.</xs:documentation>
|
344
|
</xs:annotation>
|
345
|
</xs:element>
|
346
|
<xs:element name="identifier" type="d1:Identifier"
|
347
|
minOccurs="1" maxOccurs="1">
|
348
|
<xs:annotation>
|
349
|
<xs:documentation>The :term:`identifier` of the object that was the
|
350
|
target of the operation which generated this log entry.</xs:documentation>
|
351
|
</xs:annotation>
|
352
|
</xs:element>
|
353
|
<xs:element name="ipAddress" type="xs:string"
|
354
|
minOccurs="1" maxOccurs="1">
|
355
|
<xs:annotation>
|
356
|
<xs:documentation>The IP address, as reported by the service receiving
|
357
|
the request, of the request origin.</xs:documentation>
|
358
|
</xs:annotation>
|
359
|
</xs:element>
|
360
|
<xs:element name="userAgent" type="xs:string"
|
361
|
minOccurs="1" maxOccurs="1">
|
362
|
<xs:annotation>
|
363
|
<xs:documentation>The user agent of the client making the request, as
|
364
|
reported in the User-Agent HTTP header.</xs:documentation>
|
365
|
</xs:annotation>
|
366
|
</xs:element>
|
367
|
<xs:element name="subject" type="d1:Subject"
|
368
|
minOccurs="1" maxOccurs="1">
|
369
|
<xs:annotation>
|
370
|
<xs:documentation>The :term:`Subject` used for making the request.
|
371
|
This may be the DataONE :term:`public` user if the request is not
|
372
|
authenticated, otherwise it will be the *Subject* of the certificate
|
373
|
used for authenticating the request.</xs:documentation>
|
374
|
</xs:annotation>
|
375
|
</xs:element>
|
376
|
<xs:element name="event" type="d1:NonEmptyString"
|
377
|
minOccurs="1" maxOccurs="1">
|
378
|
<xs:annotation>
|
379
|
<xs:documentation>A non-empty string that indicates the type of even
|
380
|
logged. A value from the :class:`Types.Event` enumeration is
|
381
|
recommended but no longer required for Version 2.x.
|
382
|
</xs:documentation>
|
383
|
</xs:annotation>
|
384
|
</xs:element>
|
385
|
<xs:element name="dateLogged" type="xs:dateTime"
|
386
|
minOccurs="1" maxOccurs="1">
|
387
|
<xs:annotation>
|
388
|
<xs:documentation>A :class:`Types.DateTime` time stamp indicating when
|
389
|
the event triggering the log message ocurred. Note that all time
|
390
|
stamps in DataONE are in UTC.</xs:documentation>
|
391
|
</xs:annotation>
|
392
|
</xs:element>
|
393
|
<xs:element name="nodeIdentifier" type="d1:NodeReference"
|
394
|
minOccurs="1" maxOccurs="1">
|
395
|
<xs:annotation>
|
396
|
<xs:documentation>The unique identifier for the node where the log
|
397
|
message was generated.</xs:documentation>
|
398
|
</xs:annotation>
|
399
|
</xs:element>
|
400
|
</xs:sequence>
|
401
|
</xs:complexType>
|
402
|
|
403
|
<!-- OptionList -->
|
404
|
<xs:complexType name="OptionList">
|
405
|
<xs:annotation>
|
406
|
<xs:documentation>A list of options that indicate the possible values for
|
407
|
a DataONE service. Each option that can be validly sent to a service is
|
408
|
listed, providing the specific key that should be used when interacting
|
409
|
with the service, as well as a description of that key that allows API
|
410
|
users to understand the usage of the key. For example, an OptionList
|
411
|
might contain a list of themes that can be used with the MNView.view
|
412
|
service, or for other services that have a configurable but controlled
|
413
|
set of parameters.</xs:documentation>
|
414
|
</xs:annotation>
|
415
|
<xs:sequence>
|
416
|
<xs:element name="option"
|
417
|
type="d1:NonEmptyString"
|
418
|
minOccurs="0"
|
419
|
maxOccurs="unbounded">
|
420
|
<xs:annotation>
|
421
|
<xs:documentation>The key to be used within an API call to a DataONE
|
422
|
service, including a description of the key and its impact on the
|
423
|
service. For example, a key 'default' can be provided as the theme for
|
424
|
the MNView.view service. Keys must not contain characters that will
|
425
|
need to be URL escaped.</xs:documentation>
|
426
|
</xs:annotation>
|
427
|
</xs:element>
|
428
|
</xs:sequence>
|
429
|
<xs:attribute name="key" use="required" type="xs:string">
|
430
|
<xs:annotation>
|
431
|
<xs:documentation>A value that can be used with a DataONE
|
432
|
service. Key values must not contain any characters that need to be
|
433
|
URL escaped, and should be short and informative.
|
434
|
</xs:documentation>
|
435
|
</xs:annotation>
|
436
|
</xs:attribute>
|
437
|
<xs:attribute name="description" use="required" type="xs:string">
|
438
|
<xs:annotation>
|
439
|
<xs:documentation>The description of an option, indicating its
|
440
|
intended use and impact on a DataONE service invocation.</xs:documentation>
|
441
|
</xs:annotation>
|
442
|
</xs:attribute>
|
443
|
</xs:complexType>
|
444
|
|
445
|
<!-- ******************************************
|
446
|
DEFINE ROOT ELEMENTS OF MESSAGES HERE
|
447
|
****************************************** -->
|
448
|
<!-- NOTE THAT ALL SERIALIZEABLE ROOT ELEMENTS FOR MESSAGES SHOULD BE OF A
|
449
|
COMPLEX TYPE -->
|
450
|
|
451
|
<!-- These root-level element definitions are provided for selected types so
|
452
|
that those types can be used in serialized messages in method calls in
|
453
|
DataONE. Any type that is included as a parameter to or a return type
|
454
|
from a DataONE service should have a corresponding root element of that
|
455
|
type defined here.
|
456
|
-->
|
457
|
|
458
|
<xs:element name="optionList" type="d1_v2.0:OptionList" />
|
459
|
<xs:element name="systemMetadata" type="d1_v2.0:SystemMetadata" />
|
460
|
<xs:element name="property" type="d1_v2.0:Property" />
|
461
|
<xs:element name="node" type="d1_v2.0:Node" />
|
462
|
<xs:element name="nodeList" type="d1_v2.0:NodeList" />
|
463
|
<xs:element name="objectFormat" type="d1_v2.0:ObjectFormat" />
|
464
|
<xs:element name="objectFormatList" type="d1_v2.0:ObjectFormatList" />
|
465
|
<xs:element name="log" type="d1_v2.0:Log" />
|
466
|
<xs:element name="logEntry" type="d1_v2.0:LogEntry" />
|
467
|
<xs:element name="mediaType" type="d1_v2.0:MediaType" />
|
468
|
|
469
|
</xs:schema>
|
470
|
|