/[volute]/trunk/projects/dm/vo-dml/xsd/vo-dml-v1.0.xsd
ViewVC logotype

Contents of /trunk/projects/dm/vo-dml/xsd/vo-dml-v1.0.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3867 - (show annotations)
Thu Feb 9 14:27:47 2017 UTC (4 years, 5 months ago) by gerard.lemson
File size: 41036 byte(s)
updated regexp for modelname in vodml.xsd and vodmlref in votable-alt.
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3 xmlns="http://www.ivoa.net/xml/VODML/v1.0"
4 targetNamespace="http://www.ivoa.net/xml/VODML/v1.0"
5 attributeFormDefault="unqualified" elementFormDefault="unqualified">
6
7 <xsd:annotation>
8 <xsd:documentation>
9
10 This schema defines the "vo-dml meta model", a modeling language used to define the concepts
11 and structures that describe data models. It is proposed as the common language for
12 defining data models in the IVOA.
13 TBD continue based on VO-DML specification document.
14 </xsd:documentation>
15 <xsd:documentation>
16 Look at SVN versions 2129 and earlier for more extensive model.
17 </xsd:documentation>
18 </xsd:annotation>
19
20 <!-- +++++++++++++++++++ Begin of 'Identifier section' +++++++++++++++++++ -->
21 <xsd:simpleType name="VODMLID" >
22 <xsd:annotation>
23 <xsd:documentation>
24 Type representing the way referable elements are identified uniquely in VO-DML.
25 </xsd:documentation>
26 </xsd:annotation>
27 <xsd:restriction base="xsd:string">
28 <xsd:annotation>
29 <xsd:documentation>
30 A restriction on the valid strings that make this a VO-DML Identifier.
31 Requirements on the format are: 1) use in XML document 2) use as fragment in URI
32 </xsd:documentation>
33 </xsd:annotation>
34 <xsd:pattern value="[a-zA-Z][a-zA-Z0-9\._]*"/>
35 </xsd:restriction>
36 </xsd:simpleType>
37
38 <xsd:simpleType name="ModelName">
39 <xsd:annotation>
40 <xsd:documentation>
41 Type used to restrict valid values for prefixes.
42 TBD We could use an xsd:NCName for this.
43 </xsd:documentation>
44 </xsd:annotation>
45 <xsd:restriction base="xsd:string"> <!-- xsd:NCName ? -->
46 <xsd:pattern value="[a-zA-Z][a-zA-Z0-9_\-]*">
47 <xsd:annotation>
48 <xsd:documentation>
49 A model name MUST NOT contain a semicolon.
50 </xsd:documentation>
51 </xsd:annotation>
52 </xsd:pattern>
53 </xsd:restriction>
54 </xsd:simpleType>
55
56 <xsd:simpleType name="VODMLREF">
57 <xsd:annotation>
58 <xsd:documentation>
59 Class representing the way ReferencableElements can be referenced in VO-DML.
60 It must be possible to refer to elements in other, imported data models as well as in the current model.
61 Hence the VODMLREF must identify both model and element.
62 The element is identified by the VO-DML ID in the model, the model is identified using a
63 prefix that MUST correspond to the vodml-id element of the current or an imported model.
64 Note, references to element sin the current model MUST also have a prefix, there is no default model!
65 TBD We could use an xsd:QName where VODMLREF is used, but that may have somewhat more sever syntax constraints than desired.
66 </xsd:documentation>
67 </xsd:annotation>
68 <xsd:restriction base="xsd:string"> <!-- xsd:QName ? -->
69 <xsd:annotation>
70 <xsd:documentation>
71 A restriction on the valid strings that make this a valid reference to a referencable element.
72 Consists of a prefix that should follow the ModelPrefix restriction
73 and a identifier that should follow the VODMLID restriction,
74 separated from each other by a colon.
75 </xsd:documentation>
76 <xsd:documentation>
77 TODO define the restriction pattern properly.
78 MUST be [Prefix ':' VODMLID].
79 </xsd:documentation>
80 </xsd:annotation>
81 <xsd:pattern value="[a-zA-Z][a-zA-Z0-9\._\-]+:[a-zA-Z][a-zA-Z0-9\._]*"/>
82 </xsd:restriction>
83 </xsd:simpleType>
84
85 <xsd:simpleType name="VODMLName">
86 <xsd:annotation>
87 <xsd:documentation>
88 Type used to restrict valid values for prefixes.
89 TBD We could use an xsd:NCName for this.
90 </xsd:documentation>
91 </xsd:annotation>
92 <xsd:restriction base="xsd:string"> <!-- xsd:NCName ? -->
93 <xsd:pattern value="[a-zA-Z_][a-zA-Z0-9_]*">
94 <xsd:annotation>
95 <xsd:documentation>
96 A model name MUST NOT contain a semicolon.
97 </xsd:documentation>
98 </xsd:annotation>
99 </xsd:pattern>
100 </xsd:restriction>
101 </xsd:simpleType>
102
103
104 <xsd:complexType name="ReferableElement" abstract="true">
105 <xsd:annotation>
106 <xsd:documentation>
107 This is the base type for all types whose elements can be explicitly referenced.
108 To this end it has a 'vodml-id' element of type VODMLID that allows explicit and unique identification of
109 these elements within the context of the model.
110 Generally these are also elements that can be
111 represented explicitly in alternative serialisations of
112 a data model, such as a VOTable or a relational model.
113 These should use the value of the utype element to "point into a data model" and identify a
114 model element. VO-DML itself also has needs of pointing to other elements, sometimes in another model.
115 The VODMLREF type is used for such references, which will always be named 'vodml-ref'.
116 </xsd:documentation>
117 </xsd:annotation>
118 <xsd:sequence>
119 <xsd:element name="vodml-id" type="VODMLID" minOccurs="1">
120 <xsd:annotation>
121 <xsd:documentation>
122 Identifier for its containing element.
123 Extracted as a separate type so that we can easily adapt to a different identifier design.
124 </xsd:documentation>
125 </xsd:annotation>
126 </xsd:element>
127 <xsd:element name="name" type="VODMLName" minOccurs="1" >
128 <xsd:annotation>
129 <xsd:documentation>
130 The name of the model element.
131 MUST NOT be an empty string.
132 </xsd:documentation>
133 </xsd:annotation>
134 </xsd:element>
135 <xsd:element name="description" type="xsd:string" minOccurs="0">
136 <xsd:annotation>
137 <xsd:documentation>
138 Human readable description of the model element.
139 </xsd:documentation>
140 </xsd:annotation>
141 </xsd:element>
142 </xsd:sequence>
143
144 <xsd:attribute name="id" type="xsd:string" use="optional">
145 <xsd:annotation>
146 <xsd:documentation>
147 A referencable element may be given an @id attribute to reflect an identifier
148 defined in some source document form which a VO-DML model may have been derived.
149 </xsd:documentation>
150 </xsd:annotation>
151 </xsd:attribute>
152 </xsd:complexType>
153
154
155 <xsd:complexType name="ElementRef">
156 <xsd:annotation>
157 <xsd:documentation>
158 This type represents how to reference a ReferencableElement.
159 It can serve as base class to those types that explicitly reference another type, such as relations and roles.
160 It provides for a uniform way to represent the reference to
161 the target element using the 'utyperef' element.
162 An important design choice is that we wish to allow references to elements in remote models.
163 For that reasons we can not use an ID/IDREF or key/keyref pattern.
164 Instead we define various constraints on
165 this type and its usage in various contexts using
166 the Schematron file in vo-dml.sch.xml.
167 </xsd:documentation>
168 </xsd:annotation>
169 <xsd:sequence>
170 <xsd:element name="vodml-ref" type="VODMLREF">
171 <xsd:annotation>
172 <xsd:documentation>
173 The element identifying the referenced target element.
174 See the documentation for the VODMLREF type.
175 </xsd:documentation>
176 </xsd:annotation>
177 </xsd:element>
178 </xsd:sequence>
179 </xsd:complexType>
180
181
182 <!-- +++++++++++++++++++ End of 'ReferencableElement section' +++++++++++++++++++ -->
183
184 <!-- +++++++++++++++++++ Begin of Model elements section +++++++++++++++++++ -->
185 <xsd:complexType name="Model">
186 <xsd:annotation>
187 <xsd:documentation>
188 Represents a complete data model and is the type of the (single) declared root element for
189 VO-DML/XML representation documents.
190 </xsd:documentation>
191 </xsd:annotation>
192 <xsd:sequence>
193 <xsd:element name="name" type="ModelName" minOccurs="1" maxOccurs="1">
194 <xsd:annotation>
195 <xsd:documentation>
196 Short name of the model.
197 NOTE this name MUST be used as prefix in any utype reference to elements in this model.
198 </xsd:documentation>
199 </xsd:annotation>
200 </xsd:element>
201 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1">
202 <xsd:annotation>
203 <xsd:documentation>
204 The description of the model.
205 </xsd:documentation>
206 </xsd:annotation>
207 </xsd:element>
208 <xsd:element name="title" type="xsd:string" minOccurs="1" maxOccurs="1">
209 <xsd:annotation>
210 <xsd:documentation>
211 The title of the model by which it is officially known.
212 </xsd:documentation>
213 </xsd:annotation>
214 </xsd:element>
215 <xsd:element name="author" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
216 <xsd:annotation>
217 <xsd:documentation>
218 List of authors of the model, only defined by name so far.
219 TBD could be expanded with email, affiliation and so on.
220 </xsd:documentation>
221 </xsd:annotation>
222 </xsd:element>
223 <xsd:element name="version" type="xsd:string" minOccurs="1">
224 <xsd:annotation>
225 <xsd:documentation>
226 Label giving the version of the model.
227 </xsd:documentation>
228 </xsd:annotation>
229 </xsd:element>
230 <xsd:element name="previousVersion" type="xsd:anyURI" minOccurs="0">
231 <xsd:annotation>
232 <xsd:documentation>
233 URI identifying a VO-DML model that is the version from which the current version of model is derived.
234 TBD could be an IVO Identifier once models get properly registered?
235 </xsd:documentation>
236 </xsd:annotation>
237 </xsd:element>
238 <xsd:element name="lastModified" type="xsd:dateTime">
239 <xsd:annotation>
240 <xsd:documentation>
241 Timestamp when the last change to the current model was made.
242 </xsd:documentation>
243 </xsd:annotation>
244 </xsd:element>
245 <xsd:element name="import" type="ModelImport" minOccurs="0" maxOccurs="unbounded">
246 <xsd:annotation>
247 <xsd:documentation>
248 An 'import' element indicates a dependency on an external, predefined VO-DML data model.
249 Types from that model may be used for referencing, extension and assignment to
250 attributes.
251 Types from the external model MUST NOT be used for
252 composition relationships.
253 'identification' relations to elements from that model may be used to indicate some kind of
254 equivalence between
255 elements in the current model and the external elements.
256 </xsd:documentation>
257 <xsd:documentation>
258 TBD We might require that every data model MUST include a version of the IVOA data model
259 to gain access to the standard
260 primitive types and some other types.
261 We may require that that standard model should be included *completely*,
262 i.e. including all its type definitions explicitly.
263 This would be similar to treating it as a UML Profile, rather than an import.
264 This would mean that the most common type assignments for attributes
265 can be checked within the model and not require
266 importing the remote model during validation.
267 </xsd:documentation>
268 </xsd:annotation>
269 </xsd:element>
270 <xsd:element name="primitiveType" type="PrimitiveType" minOccurs="0" maxOccurs="unbounded">
271 <xsd:annotation>
272 <xsd:documentation>
273 Collection of PrimitiveType definitions directly under the model, i.e. not contained in a
274 Package.
275 </xsd:documentation>
276 </xsd:annotation>
277 </xsd:element>
278 <xsd:element name="enumeration" type="Enumeration" minOccurs="0" maxOccurs="unbounded">
279 <xsd:annotation>
280 <xsd:documentation>
281 Collection of Enumeration definitions directly under the model, i.e. not contained in a Package.
282 </xsd:documentation>
283 </xsd:annotation>
284 </xsd:element>
285 <xsd:element name="dataType" type="DataType" minOccurs="0" maxOccurs="unbounded">
286 <xsd:annotation>
287 <xsd:documentation>
288 Collection of DataType definitions directly under the model, i.e. not contained in a Package.
289 </xsd:documentation>
290 </xsd:annotation>
291 </xsd:element>
292 <xsd:element name="objectType" type="ObjectType" minOccurs="0" maxOccurs="unbounded">
293 <xsd:annotation>
294 <xsd:documentation>
295 Collection of ObjectType definitions directly under the model, i.e. not contained in a Package.
296 </xsd:documentation>
297 </xsd:annotation>
298 </xsd:element>
299 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded">
300 <xsd:annotation>
301 <xsd:documentation>
302 The collection of packages which can contain further detailed name spacing to
303 the type definitions in the model.
304 </xsd:documentation>
305 </xsd:annotation>
306 </xsd:element>
307 </xsd:sequence>
308 </xsd:complexType>
309
310
311 <xsd:complexType name="ModelImport">
312 <xsd:annotation>
313 <xsd:documentation>
314 A "proxy" for an external model that is being used by the current model.
315 Defines the url where the VO-DML representation of that model can be retrieved, and
316 replicates its name that MUST be used when making references to
317 elements in that model using a VODMLREF element.
318 </xsd:documentation>
319 </xsd:annotation>
320 <xsd:sequence>
321 <xsd:element name="name" type="ModelName" minOccurs="1">
322 <xsd:annotation>
323 <xsd:documentation>
324 Name by which imported model is used in the current model and its documentation.
325 This name MUST be the same as the 'name' of the model definition in that remote document.
326 For all utypes pointing to elements in the imported model MUST use this name as prefix.
327 </xsd:documentation>
328 </xsd:annotation>
329 </xsd:element>
330 <xsd:element name="version" type="xsd:string" minOccurs="0">
331 <xsd:annotation>
332 <xsd:documentation>
333 Version of the imported model.
334 </xsd:documentation>
335 </xsd:annotation>
336 </xsd:element>
337 <xsd:element name="url" type="xsd:anyURI" minOccurs="1">
338 <xsd:annotation>
339 <xsd:documentation>
340 URL from which the VO-DML model document can be downloaded.
341 Note, could likely be done through a registry once ivoId is known.
342 TBD SHOULD this be a generic URI, or can we insits on URL?
343 </xsd:documentation>
344 </xsd:annotation>
345 </xsd:element>
346 <xsd:element name="documentationURL" type="xsd:anyURI" minOccurs="1">
347 <xsd:annotation>
348 <xsd:documentation>
349 URL where a documentation HTML file for the remote model can be downloaded.
350 This SHOULD be a document that contains anchors for each element thta has as name attribute the vodml-id of that element.
351 I.e. it is assumed that the
352 vodml-id-s of the imported types can be added onto this documentationURL
353 (should end with a #?) so that a direct link to the documentation for a referenced data model element can be found.
354 </xsd:documentation>
355 </xsd:annotation>
356 </xsd:element>
357 </xsd:sequence>
358 </xsd:complexType>
359
360
361 <xsd:complexType name="Package">
362 <xsd:annotation>
363 <xsd:documentation>
364 A Package is a container for type definitions and possible (child-)packages.
365 Names of types only need to be unique within their container (model or package),
366 hence a package provides further name-spacing for type definitions.
367 When
368 deriving physical representations of a model, packages may be mapped to containers in the target
369 meta-model.
370 For example in mapping to XSD they may give rise to separate documents with type definitions and their
371 own targetNamespace. When generating
372 Java classes they may be used to define seprate packages for
373 the classes derived form the types.
374 </xsd:documentation>
375 </xsd:annotation>
376 <xsd:complexContent>
377 <xsd:extension base="ReferableElement">
378 <xsd:annotation>
379 <xsd:documentation>
380 Name of the package is constrained in that
381 there can only be one package with a given name
382 in the container in which the package is defined, i.e. the model or a parent package.
383 TBD we may wish to extend this rule to all children
384 defined in a container, including types.
385 </xsd:documentation>
386 </xsd:annotation>
387 <xsd:sequence>
388 <xsd:element name="primitiveType" type="PrimitiveType" minOccurs="0" maxOccurs="unbounded">
389 <xsd:annotation>
390 <xsd:documentation>
391 Collection of PrimitiveType-s defined in this package.
392 </xsd:documentation>
393 </xsd:annotation>
394 </xsd:element>
395 <xsd:element name="enumeration" type="Enumeration" minOccurs="0" maxOccurs="unbounded">
396 <xsd:annotation>
397 <xsd:documentation>
398 Collection of Enumeration-s defined in this package.
399 </xsd:documentation>
400 </xsd:annotation>
401 </xsd:element>
402 <xsd:element name="dataType" type="DataType" minOccurs="0" maxOccurs="unbounded">
403 <xsd:annotation>
404 <xsd:documentation>
405 Collection of DataType-s defined in this package.
406 </xsd:documentation>
407 </xsd:annotation>
408 </xsd:element>
409 <xsd:element name="objectType" type="ObjectType" minOccurs="0" maxOccurs="unbounded">
410 <xsd:annotation>
411 <xsd:documentation>
412 Collection of ObjectType-s defined in this package.
413 </xsd:documentation>
414 </xsd:annotation>
415 </xsd:element>
416 <xsd:element name="package" type="Package" minOccurs="0" maxOccurs="unbounded">
417 <xsd:annotation>
418 <xsd:documentation>
419 Collection of child Package-s defined in this package.
420 </xsd:documentation>
421 </xsd:annotation>
422 </xsd:element>
423 </xsd:sequence>
424 </xsd:extension>
425 </xsd:complexContent>
426
427 </xsd:complexType>
428
429
430 <xsd:complexType name="Type" abstract="true">
431 <xsd:annotation>
432 <xsd:documentation>
433 Base class of all type definition elements.
434 All Type-s extend ReferenceableElement, i.e. they are referencable.
435 Adds name, description, inheritance and indication of abstractness to ReferencableElement.
436 </xsd:documentation>
437 <xsd:documentation>
438 Name of the type. Must be unique in the collection of all types in a given container
439 (i.e. model or package)
440 </xsd:documentation>
441 </xsd:annotation>
442 <xsd:complexContent>
443 <xsd:extension base="ReferableElement">
444 <xsd:sequence>
445 <xsd:element name="extends" type="ElementRef" minOccurs="0">
446 <xsd:annotation>
447 <xsd:documentation>
448 Reference to a type (called the base-type) that is extended by the current type (called the subtype).
449 This implements the typical is-a inheritance relationship, similar to the extends relations in XSD and Java,
450 the
451 generaliation in UML, or the subclassOf relation in RDF. Note, VO-DML does not support multiple inheritance.
452 Instances of a subtype are automatic instances of a base type.
453 Polymorphism is assumed: When a role (see below) defines a base type
454 as its datatype, instances of any subtype
455 can be uased as value of the role.
456 Roles defined on a base type are inherited by the subtypes.
457 Relations inherited from a basetype can be 'subsetted', which is similar to overriding their definition.
458 See the definiton of this property on the Relation type.
459 </xsd:documentation>
460 </xsd:annotation>
461 </xsd:element>
462 <xsd:element name="constraint" type="Constraint" minOccurs="0" maxOccurs="unbounded">
463 <xsd:annotation>
464 <xsd:documentation>
465 Constraints defining valid instances of the type.
466 May be an AttributeConstraint or an expression in some language.
467 </xsd:documentation>
468 </xsd:annotation>
469 </xsd:element>
470 </xsd:sequence>
471 <xsd:attribute name="abstract" type="xsd:boolean" use="optional" />
472 </xsd:extension>
473 </xsd:complexContent>
474 </xsd:complexType>
475
476 <xsd:complexType name="ObjectType">
477 <xsd:annotation>
478 <xsd:documentation>
479 TBD use description form VO-DML specification document. to ...
480 </xsd:documentation>
481 </xsd:annotation>
482 <xsd:complexContent>
483 <xsd:extension base="Type">
484 <xsd:sequence>
485 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded">
486 <xsd:annotation>
487 <xsd:documentation>
488 TODO
489 </xsd:documentation>
490 </xsd:annotation>
491 </xsd:element>
492 <xsd:element name="composition" type="Composition" minOccurs="0" maxOccurs="unbounded">
493 <xsd:annotation>
494 <xsd:documentation>
495 TODO
496 </xsd:documentation>
497 </xsd:annotation>
498 </xsd:element>
499 <xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded">
500 <xsd:annotation>
501 <xsd:documentation>
502 TODO
503 </xsd:documentation>
504 </xsd:annotation>
505 </xsd:element>
506 </xsd:sequence>
507 </xsd:extension>
508 </xsd:complexContent>
509 </xsd:complexType>
510
511
512 <xsd:complexType name="ValueType" abstract="true">
513 <xsd:annotation>
514 <xsd:documentation>
515 Base class of all valaue types, i.e. those types identified by their value, rather than a separate explicit identifier.
516 These are the types that can be assigned to Attribute-s.
517 </xsd:documentation>
518 </xsd:annotation>
519 <xsd:complexContent>
520 <xsd:extension base="Type">
521 </xsd:extension>
522 </xsd:complexContent>
523 </xsd:complexType>
524
525
526 <xsd:complexType name="PrimitiveType">
527 <xsd:annotation>
528 <xsd:documentation>
529 Atomic/simple type. Defined by a single value. Generally a built in type from the IVOA profile model,
530 or a subclass of one of those types.
531 </xsd:documentation>
532 </xsd:annotation>
533 <xsd:complexContent>
534 <xsd:extension base="ValueType">
535 </xsd:extension>
536 </xsd:complexContent>
537 </xsd:complexType>
538
539 <xsd:complexType name="DataType">
540 <xsd:complexContent>
541 <xsd:extension base="ValueType">
542 <xsd:sequence>
543 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded">
544 <xsd:annotation>
545 <xsd:documentation>
546 TODO
547 </xsd:documentation>
548 </xsd:annotation>
549 </xsd:element>
550 <xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded">
551 <xsd:annotation>
552 <xsd:documentation>
553 TODO
554 </xsd:documentation>
555 </xsd:annotation>
556 </xsd:element>
557 </xsd:sequence>
558 </xsd:extension>
559 </xsd:complexContent>
560 </xsd:complexType>
561
562 <xsd:complexType name="Enumeration">
563 <xsd:annotation>
564 <xsd:documentation>
565 A primitive type with a limited, discrete set of values.
566 May explicitly extend a PrimitiveType. Its values must be compatible with that type then.
567 TBD Should define what it
568 might mean for an enumeraiton to extend another enumeration.
569 Should it restrict the possible values further? Or should it add to the values? Or ...?
570 </xsd:documentation>
571 </xsd:annotation>
572 <xsd:complexContent>
573 <xsd:extension base="PrimitiveType">
574 <xsd:sequence>
575 <xsd:element name="literal" type="EnumLiteral" maxOccurs="unbounded">
576 <xsd:annotation>
577 <xsd:documentation>
578 TODO
579 </xsd:documentation>
580 </xsd:annotation>
581 </xsd:element>
582 </xsd:sequence>
583 </xsd:extension>
584 </xsd:complexContent>
585 </xsd:complexType>
586
587 <xsd:complexType name="EnumLiteral">
588 <xsd:complexContent>
589 <xsd:extension base="ReferableElement">
590 <xsd:sequence>
591 </xsd:sequence>
592 </xsd:extension>
593 </xsd:complexContent>
594 </xsd:complexType>
595
596 <xsd:complexType name="Role" abstract="true">
597 <xsd:annotation>
598 <xsd:documentation>
599 A Role represents the "role a Type plays in the definition of another Type".
600 Generally, instances of structured types contain instances of other types, organised according to some
601 predesigned pattern consisting basically of
602 name-value pairs.
603 The names refer to the particular role to which the values are assigned.
604 These values must have the type corresponding to the role, implemented below using the datatype element.
605 The values may be multiple-valued.
606 Three different types
607 of roles are supported in VO-DML: Attribute, COllection and Reference.
608 Their characteristics are defined below.
609 </xsd:documentation>
610 <xsd:documentation>
611 Role extends ReferencableElement.
612 The 'name' element that is inherited from that type must be unique in the collection of roles
613 defined on the parent type.
614 This uniqueness must extend over the roles available on the type by
615 inheritance.
616 </xsd:documentation>
617 </xsd:annotation>
618
619 <xsd:complexContent>
620 <xsd:extension base="ReferableElement">
621 <xsd:sequence>
622 <xsd:element name="datatype" type="ElementRef">
623 <xsd:annotation>
624 <xsd:documentation>
625 Reference to the type that plays the role represented by this Role.
626 </xsd:documentation>
627 </xsd:annotation>
628 </xsd:element>
629 <xsd:element name="multiplicity" type="Multiplicity">
630 <xsd:annotation>
631 <xsd:documentation>
632 The multiplicity of the role (also called cardinality) indicates whether it must have a
633 value or may be without value, or possibly how many values are allowed.
634 </xsd:documentation>
635 </xsd:annotation>
636 </xsd:element>
637 <xsd:element name="subsets" type="ElementRef" minOccurs="0">
638 <xsd:annotation>
639 <xsd:documentation>
640 Represents the UML subsetted property. Indicates that a particular relation refines the definition
641 of another relation. ONly a relation inherited form a base class can
642 be subsetted. Typical usage is
643 that the base class has a
644 relation to a class A, and the subclass refines this to indicating that
645 the relation should be to a subclass of A.
646
647 The value should identify the subsetted property.
648 TBD IF we are going to use utype-s to refer to elements also inside this
649 document, we should use an
650 appropriate keyref
651 </xsd:documentation>
652 <xsd:documentation>
653 TBD this is a somewhat abstract, but very useful modeling concept.
654 It implements a very common modeling design pattern.
655 It exists in UML2.
656 </xsd:documentation>
657 </xsd:annotation>
658 </xsd:element>
659 </xsd:sequence>
660 </xsd:extension>
661 </xsd:complexContent>
662 </xsd:complexType>
663
664 <xsd:complexType name="Attribute">
665 <xsd:annotation>
666 <xsd:documentation>
667 An Attribute is a Role where the target datatype is a ValueType.
668 It represent "simple" properties of its container type, which can be an ObjectType or a DataType.
669 </xsd:documentation>
670 <xsd:documentation>
671 Must refer to a ValueType.
672 </xsd:documentation>
673 </xsd:annotation>
674 <xsd:complexContent>
675 <xsd:extension base="Role">
676 <xsd:sequence>
677 <xsd:element name="semanticconcept" type="SemanticConcept" minOccurs="0">
678 <xsd:annotation>
679 <xsd:documentation>
680 It is possible to assign a SemanticConcept to an attribute definition.
681 This means that the values of the attribute have to comply with the definition of the
682 SemanticConcept.
683 This can be done in two manners. Either the SemanticConcept
684 gives a link to a semantic vocabulary, in which case the value must be a
685 concept defined in that vocabulary.
686 Or it defines a topConcept, in which case the value must be a concept that is explicitly
687 declared to be (narrower than)
688 that concept, or a concept that is narrower than that concept.
689 FOr details on the interpretation see the VO-DML document.
690 </xsd:documentation>
691 </xsd:annotation>
692 </xsd:element>
693 </xsd:sequence>
694 </xsd:extension>
695 </xsd:complexContent>
696 </xsd:complexType>
697
698
699
700 <xsd:complexType name="SemanticConcept">
701 <xsd:annotation>
702 <xsd:documentation>
703 Type used to indicate on attributes that they take values representing a concept defined in
704 an identified semantic vocabulary (SKOS or RDFS), and/or restricted by being narrower/more specific than an
705 identified "top" concept.
706 </xsd:documentation>
707 </xsd:annotation>
708 <xsd:sequence>
709 <xsd:element name="topConcept" type="xsd:anyURI" minOccurs="0">
710 <xsd:annotation>
711 <xsd:documentation>
712 A URI identifiying a semantic concept that corresponds to the concept in the model.
713 Values of a corresponding attributes must be URI-s identifiying objects that are narrower
714 than the identified concept. This attribute may be null as
715 certain vocabularies may not have a
716 </xsd:documentation>
717 </xsd:annotation>
718 </xsd:element>
719 <xsd:element name="vocabularyURI" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded">
720 <xsd:annotation>
721 <xsd:documentation>
722 If no topConcept is defined, one or more explicit vocabularies can be provided from which the
723 value must be obtained.
724 </xsd:documentation>
725 </xsd:annotation>
726 </xsd:element>
727 </xsd:sequence>
728 </xsd:complexType>
729
730 <xsd:complexType name="Relation" abstract="true">
731 <xsd:annotation>
732 <xsd:documentation>
733 A relation is a Role where the target datatype is an ObjectType.
734 </xsd:documentation>
735 </xsd:annotation>
736 <xsd:complexContent>
737 <xsd:extension base="Role">
738 <xsd:sequence>
739 </xsd:sequence>
740 </xsd:extension>
741 </xsd:complexContent>
742 </xsd:complexType>
743
744 <xsd:complexType name="Reference">
745 <xsd:annotation>
746 <xsd:documentation>
747 A Reference is a Relation that indicates a kind of "usage" relationship
748 between the target ObjectType and the owner of the reference, the "referrer".
749 The referrer can be an ObjectType (typically) but also a DataType.
750 The relation is
751 looser than the composition relationship, acting like a
752 semantically meaningful pointer rather than indicating a component of the referrer.
753 Consequently, in general many referrers can point at the same target instance,
754 and ObjectType-s can
755 be the target in different reference definitions.
756 The lifecycle of the target is not bound to that of the referrer.
757 Often the target instance is used to provide a context for the definition of
758 the referrer. For example a coordinate frame may be
759 referenced to provide context to coordinate values.
760 TBD more needed ...?
761 </xsd:documentation>
762 </xsd:annotation>
763 <xsd:complexContent>
764 <xsd:extension base="Relation">
765 <xsd:annotation>
766 <xsd:documentation>
767 TBD Should have multiplicity 0..1 or 1?
768 </xsd:documentation>
769 </xsd:annotation>
770 </xsd:extension>
771 </xsd:complexContent>
772 </xsd:complexType>
773
774 <xsd:complexType name="Composition">
775 <xsd:annotation>
776 <xsd:documentation>
777 This type implements a composition relation between the parent and child ObjectTypes.
778 Its instances are ONLY used to set the composition field on an ObjectType.
779 It is a rule that an object type can only be the target of a single composition definition.
780 A subclass can be assigned a target to a composition if a
781 baseclass is already assigned such a target, but only if the composition is explicitly 'subsetted'.
782 A composition is assumed to be a set, i.e.
783 a given object (as identified by its identifier!) cannot occur
784 multiple times in the composition.
785 The composition
786 may be ordered, which implies that the order in which objects have been added
787 to
788 the parent is to be preserved. As clients can always do an explicit sort on any of the child objects' attributes,
789 it seems not necessary to add functionality for
790 declaring a composition is
791 sorted on one or more attributes.
792 Through the uniqueInCollection constraint that can be assigned to attributes, a composition can impose the
793 constraint that different objects in the composition
794 must have distinct values of the
795 attribute to which that constraint is assigned.
796 It would be better probably to add the capability to assign such constraints to this composition type.
797 This would
798 also give more flexibility in for example creating explicit (named) keys, or defining
799 multi-attribute uniqueness constraints.
800 </xsd:documentation>
801 </xsd:annotation>
802 <xsd:complexContent>
803 <xsd:extension base="Relation">
804 <xsd:sequence>
805 <xsd:element name="isOrdered" type="xsd:boolean" default="false" minOccurs="0">
806 <xsd:annotation>
807 <xsd:documentation>
808 If true, this composition preserves the ordering of object insertions.
809 </xsd:documentation>
810 </xsd:annotation>
811 </xsd:element>
812 </xsd:sequence>
813 </xsd:extension>
814 </xsd:complexContent>
815 </xsd:complexType>
816
817
818 <xsd:complexType name="Multiplicity">
819 <xsd:annotation>
820 <xsd:documentation>
821 Also called "Cardinality". Indicates how many instances of a datatype can/must be associated to a given role.
822 Unless
823 Follows model in XSD, i.e. with explicit lower bound and upper bound on number of instances.
824 maxOccurs must be gte minOccurs, unless it is negative, in which case it corresponds to unbounded.
825 </xsd:documentation>
826 </xsd:annotation>
827 <xsd:sequence>
828 <xsd:choice>
829 <xsd:element name="minOccurs" type="xsd:nonNegativeInteger" default="0">
830 <xsd:annotation>
831 <xsd:documentation>
832 Lower bound on number of instances/values.
833 </xsd:documentation>
834 </xsd:annotation>
835 </xsd:element>
836 </xsd:choice>
837 <xsd:element name="maxOccurs" type="xsd:int" default="1">
838 <xsd:annotation>
839 <xsd:documentation>
840 When negative, unbounded.
841 </xsd:documentation>
842 </xsd:annotation>
843 </xsd:element>
844 </xsd:sequence>
845 </xsd:complexType>
846
847
848 <xsd:complexType name="Constraint">
849 <xsd:annotation>
850 <xsd:documentation>
851 Constraint represents rules that instances of Type-s must obey to be valid.
852 A generic Constraint only has a 'description' element
853 which describes the constraint in English.
854 In future versions of the language extra elements may be added that give a more formal
855 definition of the constraint. In particular we may add expressions in a language
856 such as OCL or subset thereof tuned to VO-DML.
857 In terms of OCL, VO-DML COnstraint-s are invariants of a Type.
858 </xsd:documentation>
859 </xsd:annotation>
860 <xsd:sequence>
861 <xsd:element name="description" type="xsd:string" minOccurs="0">
862 <xsd:annotation>
863 <xsd:documentation>
864 A natural language description of the constraint.
865 </xsd:documentation>
866 </xsd:annotation>
867 </xsd:element>
868 </xsd:sequence>
869 </xsd:complexType>
870
871
872 <xsd:complexType name="SubsettedRole">
873 <xsd:annotation>
874 <xsd:documentation>
875 A special type of constraint that represents the common pattern where a subtype.
876 would like to restrict certain aspects of a definition of a roles defined on a super type.
877 The constraint explicitly defines the datatype of the identified role. This new datatype MUST
878 be a subtype of the declared datatype of the role that is being constrained. Similarly
879 a new, more restrictive semantic concept may be defined.
880 </xsd:documentation>
881 </xsd:annotation>
882 <xsd:complexContent>
883 <xsd:extension base="Constraint">
884 <xsd:sequence>
885 <xsd:element name="role" type="ElementRef">
886 <xsd:annotation>
887 <xsd:documentation>
888 VODMLREF identifying the constrained Role.
889 This role MUST be available to the type containing this constraint.
890 </xsd:documentation>
891 </xsd:annotation>
892 </xsd:element>
893 <xsd:element name="datatype" type="ElementRef" minOccurs="0">
894 <xsd:annotation>
895 <xsd:documentation>
896 Pointer to datatype that the constrained Role must take.
897 This datatype MUST be a sub-type of the declared datatype of the constrained Role.
898 </xsd:documentation>
899 </xsd:annotation>
900 </xsd:element>
901 <xsd:element name="semanticconcept" type="SemanticConcept" minOccurs="0">
902 <xsd:annotation>
903 <xsd:documentation>
904 Maybe the super type has not defined a semantic concept for the Role, but
905 the subtype needs that. This attribute allows this assignment. But alse when
906 the Role on the super-type already has a semanticconcept with a topConcept
907 defined on it, the subtype may restrict the values to a narrower concept than
908 that assigned to it on the super-type.
909 </xsd:documentation>
910 </xsd:annotation>
911 </xsd:element>
912 </xsd:sequence>
913 </xsd:extension>
914 </xsd:complexContent>
915
916 </xsd:complexType>
917
918 <!-- Begin of element declaration(s) -->
919 <xsd:element name="model" type="Model">
920 <xsd:annotation>
921 <xsd:documentation>
922 Every VO-DML/XML document must start with a 'model' element, no other root elements are supported by this spec.
923 </xsd:documentation>
924 </xsd:annotation>
925 </xsd:element>
926
927
928 </xsd:schema>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26