1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by MSD (EMBL OUTSTATION THE EBI WELLCOME TRUST GENOME CAMPUS) -->
3 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
4 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="http://www.vamsas.org"
5 targetNamespace="http://www.vamsas.org" elementFormDefault="qualified"
6 attributeFormDefault="unqualified">
8 <xs:documentation> Vorba ID - Vamsas Object Request Broker Address ID (name needs to be
9 worked on): Suggest it could be of the form documentRoot/datasetName/SequenceUID for a
10 dataset sequence. Alignment sequence: documentRoot/datasetName/AlignmentId/SequenceUID
11 for an aligned form of a dataset sequence </xs:documentation>
13 <xs:element name="VAMSAS">
15 <xs:documentation> contains unassociated trees and a number of analysis sets
20 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
21 <xs:element ref="vamsas:DataSet" minOccurs="0" maxOccurs="unbounded"/>
23 <xs:attribute name="id" type="xs:ID" use="optional">
25 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
28 <xs:attribute name="modifiable" type="vamsas:locks" use="optional">
33 <xs:documentation> Properties. Generally, these are mutable so an application should check
34 them each time. This may change depending on the context of the property
37 <xs:element name="Tree">
40 <xs:documentation> Contains a named collection of trees </xs:documentation>
41 <xs:documentation> TODO: define way of referencing leaves of global tree for any
42 sequence/alignment object. SUggestion 1: Each named tree leafnode has a unique
43 id (which may be unique in combination with trees own vorba ID). Dataset
44 sequences can be tagged with a property "vamsas:tree_leaf" </xs:documentation>
47 <xs:element name="title" type="xs:string" minOccurs="0"/>
48 <xs:element name="newick" maxOccurs="unbounded">
51 <xs:extension base="xs:string">
52 <xs:attribute name="title" type="xs:string" use="optional"/>
53 <xs:attribute name="id" type="xs:ID" use="optional">
55 <xs:documentation> Primary Key for vamsas object referencing
59 <xs:attribute name="modifiable" type="vamsas:locks" use="optional">
65 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
66 <xs:element ref="vamsas:Provenance"/>
68 <xs:attribute name="id" type="xs:ID" use="optional">
70 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
73 <xs:attribute name="modifiable" type="vamsas:locks" use="optional">
77 <xs:element name="property">
81 <xs:documentation> Named and typed property string </xs:documentation>
83 <xs:extension base="xs:string">
84 <xs:attribute name="name" type="xs:string" use="required"/>
85 <xs:attribute name="type" type="xs:string" use="required">
87 <xs:documentation> The type specifies how the property will be parsed.
88 Empty property strings are allowed, and can be used to prototype the
89 input to a document. TODO: specify allowed types </xs:documentation>
96 <xs:element name="link">
99 <xs:documentation> Primitive labelled URI object </xs:documentation>
102 <xs:extension base="xs:string">
103 <xs:attribute name="href" type="xs:anyURI">
105 <xs:documentation>The URI</xs:documentation>
112 <xs:complexType name="rangeType" abstract="true">
114 <xs:documentation> Specify an ordered set of positions and/or regions on the principle
115 dimension of some associated vamsas object </xs:documentation>
116 <xs:documentation> Keeping to jaxb-1.0 specification for the moment - this choice should
117 become a substitution group when we use jaxb-2.0 capable bindings
121 <xs:element name="pos" maxOccurs="unbounded">
123 <xs:documentation> a position within the associated object's coordinate system
127 <xs:attribute name="i" type="xs:int" use="required"/>
130 <xs:element name="seg" maxOccurs="unbounded">
132 <xs:documentation> a region from start to end, with flag for inclusivity of
133 terminii </xs:documentation>
136 <xs:attribute name="start" type="xs:int" use="required"/>
137 <xs:attribute name="end" type="xs:int" use="required"/>
138 <xs:attribute name="inclusive" type="xs:boolean" use="required">
140 <xs:documentation> when false, a consecutive range like 'start=1, end=2'
141 means the region lying after position 1 and before position 2
148 <!-- Do we really need this - a position could be just a seg with start=end and inclusive=true -->
150 <xs:complexType name="rangeAnnotation">
152 <xs:documentation> Annotation for a rangeSpec - values can be attached for the whole
153 specification, and to each position within the spec. following the orientation
154 specified by the ordered set of rangeSpec (pos, seg) elements. </xs:documentation>
157 <xs:extension base="vamsas:rangeType">
159 <xs:element name="label" type="xs:string" minOccurs="0">
161 <xs:documentation> Short, meaningful name for the annotation - if this
162 is absent, then the type string should be used in its place.
166 <xs:element name="description" type="xs:string" minOccurs="0">
168 <xs:documentation> Human readable description of the annotation
172 <xs:element name="status" type="xs:string" minOccurs="0">
174 <xs:documentation> TODO: specify this - we have considered taking the GO
175 evidence codes as a model for assessing a measure of quality to an
176 annotation. </xs:documentation>
179 <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded">
181 <xs:documentation> Annotation Element position maps to ordered positions
182 defined by the sequence of rangeType pos positions or concatenated
183 seg start/end segments. </xs:documentation>
186 <xs:element name="score" minOccurs="0" maxOccurs="unbounded">
188 <xs:documentation> Ordered set of optionally named float values for the
189 whole annotation </xs:documentation>
193 <xs:extension base="xs:float">
194 <xs:attribute name="name" type="xs:string" use="optional"
200 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
201 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
203 <xs:documentation> Note:These are mutable so an application should check
204 them each time. </xs:documentation>
208 <xs:attribute name="id" type="xs:ID" use="optional">
210 <xs:documentation> Primary Key for vamsas object referencing
214 <xs:attribute name="modifiable" type="vamsas:locks" use="optional">
216 <xs:attribute name="group" type="xs:string" use="optional" default="">
218 <xs:documentation> Annotation with the same non-empty group name are grouped
219 together </xs:documentation>
222 <xs:attribute name="type" type="xs:string" use="required">
224 <xs:documentation> A Das Feature has both a type and a Type ID. We go the
225 route of requiring the type string to be taken from a controlled
226 vocabulary if an application expects others to make sense of it. The
227 type may qualified - so uniprot:CHAIN is a valid type name, and
228 considered distinct from someotherDB:CHAIN </xs:documentation>
234 <xs:element name="param">
237 <xs:documentation> Specifies a named and typed value used to perform some data
238 transformation. </xs:documentation>
239 <xs:documentation> LATER: experiment with xml validation of property set prototypes
240 for services </xs:documentation>
244 <xs:documentation> Named and typed property string </xs:documentation>
246 <xs:extension base="xs:string">
247 <xs:attribute name="name" type="xs:string" use="required"/>
248 <xs:attribute name="type" type="xs:string" use="required">
250 <xs:documentation> The type specifies how the property will be parsed.
251 Empty property strings are allowed, and can be used to prototype the
252 input to a document. TODO: specify allowed types </xs:documentation>
259 <xs:element name="input">
262 <xs:documentation> Selects all or part of a collection of vamsas objects as a named
263 input to some transformation process. Many inputs with the same name imply a
264 group input (such as a collection of sequences) </xs:documentation>
267 <xs:extension base="vamsas:rangeType">
268 <xs:attribute name="name" type="xs:string" use="required"/>
269 <xs:attribute name="objRef" type="xs:IDREF" use="optional">
271 <xs:documentation> Reference Frame for rangeType specfication
279 <xs:element name="Provenance">
282 <xs:documentation> Defines the origin and series of operations applied directly to
283 the object that references it. </xs:documentation>
286 <xs:element name="entry" maxOccurs="unbounded">
289 <xs:element name="User" type="xs:string">
291 <xs:documentation> Who </xs:documentation>
294 <xs:element name="App" type="xs:string">
296 <xs:documentation> With which application </xs:documentation>
299 <xs:element name="Action" type="xs:string">
301 <xs:documentation> Did what </xs:documentation>
304 <xs:element name="Date" type="xs:date">
306 <xs:documentation> When </xs:documentation>
309 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
311 <xs:documentation> additional information </xs:documentation>
314 <xs:element ref="vamsas:param" minOccurs="0" maxOccurs="unbounded">
316 <xs:documentation> parameter for the action </xs:documentation>
319 <xs:element ref="vamsas:input" minOccurs="0" maxOccurs="unbounded">
321 <xs:documentation> bioinformatic objects input to action
326 <xs:attribute name="id" type="xs:ID" use="optional">
328 <xs:documentation> Primary Key for vamsas object referencing
337 <xs:element name="DataSet">
340 <xs:documentation> A collection of sequences, alignments, trees and other things.
344 <xs:element name="Sequence" maxOccurs="unbounded">
347 <xs:documentation> a primary or secondary sequence record from which all
348 other sequences may be derived </xs:documentation>
351 <xs:extension base="vamsas:SequenceType">
353 <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
355 <xs:documentation> Store a list of database references
356 for this sequence record - with optional mapping
357 from database sequence to the given sequence record </xs:documentation>
363 <xs:element name="map"
364 minOccurs="0" maxOccurs="unbounded">
365 <xs:annotation><xs:documentation> From: Offset to first
366 position in dataset sequence record that
367 this database entry maps to To: Offset
368 to last position in dataset sequence
369 record that this database entry maps to
370 Start: Offset to first last position in
371 database entry that first (or offset)
372 position in sequence maps to End: Offset
373 to last position in database entry that
374 last (offset) position in sequence maps
375 to </xs:documentation>
379 <xs:extension base="vamsas:mapList">
385 <xs:element ref="vamsas:link" minOccurs="0"
386 maxOccurs="unbounded"/>
387 <xs:element ref="vamsas:property" minOccurs="0"
388 maxOccurs="unbounded"/>
390 <xs:attribute name="source" type="xs:string"
393 <xs:documentation> TODO Database Naming
394 Convention: either start using LSID (so
395 change type to URI) or leave this as an
396 uncontrolled/unspecified string ID
400 <xs:attribute name="version" type="xs:string"
403 <xs:documentation> Version must be specified -
407 <xs:attribute name="accessionId" type="xs:string"
410 <xs:documentation> TODO: make some specification
411 of the database field from which this
412 accessionId is taken from - should that be a
413 special property of the dbRef object ?
417 <xs:attribute name="id" type="xs:ID" use="optional">
419 <xs:documentation> Primary Key for vamsas object
420 referencing </xs:documentation>
426 <xs:attribute name="id" type="xs:ID" use="optional">
428 <xs:documentation> Primary Key for vamsas object referencing
432 <xs:attribute name="dictionary" type="xs:string" use="required">
434 <xs:documentation> symbol class for sequence
442 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
445 <xs:documentation> Annotate over positions and regions of a dataset
446 sequence </xs:documentation>
449 <xs:extension base="vamsas:rangeAnnotation">
451 <xs:element ref="vamsas:Provenance"/>
453 <xs:attribute name="seqRef" type="xs:IDREF" use="required">
455 <xs:documentation> annotation is associated with a
456 particular dataset sequence </xs:documentation>
463 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
466 <xs:element name="AlignmentAnnotation" minOccurs="0"
467 maxOccurs="unbounded">
469 <xs:documentation> This is annotation over the coordinate frame
470 defined by all the columns in the alignment.
475 <xs:extension base="vamsas:rangeAnnotation">
477 <xs:element ref="vamsas:Provenance"/>
479 <xs:attribute name="graph" type="xs:boolean"
482 <xs:documentation> TODO: decide if this flag is
483 redundant - when true it would suggest that
484 the annotationElement values together form a
485 graph </xs:documentation>
492 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
493 <xs:element name="alignmentSequence" maxOccurs="unbounded">
496 <xs:extension base="vamsas:SequenceType">
498 <xs:element name="AlignmentSequenceAnnotation"
499 minOccurs="0" maxOccurs="unbounded">
502 <xs:documentation> Annotate over
503 positions and regions of the
504 ungapped sequence in the context of
505 the alignment </xs:documentation>
510 base="vamsas:rangeAnnotation">
513 ref="vamsas:Provenance"/>
515 <xs:attribute name="graph"
516 type="xs:boolean" use="required">
518 <xs:documentation> TODO:
519 decide if this flag is
520 redundant - when true it
521 would suggest that the
522 annotationElement values
523 together form a graph
530 This replaces the flat list of sequenceFeatures.
531 <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
532 <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
533 </xs:annotation><xs:complexContent>
534 <xs:extension base="vamsas:rangeFeature">
535 <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
536 <xs:annotation><xs:documentation>annotation may be associated with a particular sequence lying within the same reference frame as the rangeType's objRef</xs:documentation></xs:annotation>
539 </xs:complexContent></xs:complexType></xs:element> -->
543 <xs:attribute name="id" type="xs:ID" use="optional">
545 <xs:documentation> Primary Key for vamsas object
546 referencing </xs:documentation>
549 <xs:attribute name="refid" type="xs:IDREF"
552 <xs:documentation> Dataset Sequence from which
553 this alignment sequence is taken from
561 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
563 <xs:documentation> typical properties may be additional
564 alignment score objects </xs:documentation>
567 <xs:element ref="vamsas:Provenance"/>
569 <xs:attribute name="gapChar" type="xs:string" use="required"/>
570 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
571 <xs:attribute name="id" type="xs:ID" use="optional">
573 <xs:documentation> Primary Key for vamsas object referencing
577 <xs:attribute name="modifiable" type="vamsas:locks" use="optional">
582 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
583 <xs:element ref="vamsas:Provenance"/>
585 <xs:attribute name="id" type="xs:ID" use="optional">
587 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
592 <xs:element name="annotationElement">
595 <xs:documentation> per-site symbolic and/or quantitative annotation </xs:documentation>
596 <xs:documentation> SecondaryStructure and display character (from Jalview) have been
597 subsumed into the glyph element </xs:documentation>
600 <xs:element name="description" type="xs:string" minOccurs="0">
602 <xs:documentation> Free text at this position </xs:documentation>
605 <xs:element name="glyph" minOccurs="0" maxOccurs="unbounded">
607 <xs:documentation> Discrete symbol - possibly graphically represented
612 <xs:extension base="xs:string">
613 <xs:attribute name="dict" type="xs:string" use="optional"
616 <xs:documentation> specifies the symbol dictionary for this
617 glyph - eg utf8 (the default), aasecstr_3 or
618 kd_hydrophobicity - the content is not validated so
619 applications must ensure they gracefully deal with
620 invalid entries here </xs:documentation>
621 <xs:documentation> TODO: specify a minimum list of glyph
622 dictionaries to get us started and provide a way for the
623 vamsasClient to validate their content if regexes are
624 specified </xs:documentation>
631 <xs:element name="value" type="xs:float" minOccurs="0" maxOccurs="unbounded">
633 <xs:documentation> Ordered set of float values - an application may treat
634 the values together as a vector with common support for a set of
635 annotation elements - but this is, again, not validated so applications
636 should deal gracefully with varying numbers of dimensions
641 <xs:attribute name="position" type="xs:integer" use="required">
643 <xs:documentation> position with respect to the coordinate frame defined by a
644 rangeType specification </xs:documentation>
647 <xs:attribute name="after" type="xs:boolean" use="optional" default="false">
649 <xs:documentation> true means the annotation element appears between the
650 specified position and the next </xs:documentation>
653 <xs:attribute name="id" type="xs:ID" use="optional">
655 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
660 <xs:complexType name="SequenceType">
662 <xs:element name="sequence" type="xs:string"/>
663 <xs:element name="name" type="xs:string"/>
664 <xs:element name="description" type="xs:string" minOccurs="0"/>
665 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
667 <xs:documentation> additional typed properties </xs:documentation>
670 <xs:element name="mapping" minOccurs="0" maxOccurs="unbounded">
673 <xs:extension base="vamsas:mapList">
674 <xs:attribute name="onto" type="xs:IDREF" use="required">
676 <xs:documentation> object to which the mapping is being mapped
685 <xs:attribute name="start" type="xs:integer" use="required"/>
686 <xs:attribute name="end" type="xs:integer" use="required"/>
688 <xs:element name="ApplicationData">
691 <xs:documentation> Data specific to a particular type and version of vamsas
692 application </xs:documentation>
695 <xs:extension base="vamsas:appData">
697 <xs:element name="User" minOccurs="0" maxOccurs="unbounded">
700 <xs:extension base="vamsas:appData">
702 <xs:documentation> Data available to just a particular
703 user </xs:documentation>
705 <xs:attribute name="fullname" type="xs:string"
707 <xs:attribute name="organization" type="xs:string"
713 <xs:element name="Common" minOccurs="0">
716 <xs:extension base="vamsas:appData"/>
720 <xs:element name="Instance" minOccurs="0" maxOccurs="unbounded">
723 <xs:extension base="vamsas:appData">
725 <xs:documentation> Data available to just a specific
726 instance of the application </xs:documentation>
727 <xs:documentation> VAMSAS/Pierre: Is this data volatile
728 ? Application instances may not be accessible after
729 the session has closed - the user may have to be
730 presented with the option of picking up the data in
731 that instance </xs:documentation>
733 <xs:attribute name="urn" type="xs:string" use="required"/>
739 <xs:attribute name="version" type="xs:string" use="required">
741 <xs:documentation> Version string describing the application specific
742 data storage version used</xs:documentation>
745 <xs:attribute name="name" type="xs:string" use="required">
747 <xs:documentation> Canonical name of application </xs:documentation>
754 <xs:element name="Attachment">
757 <xs:extension base="vamsas:appData">
759 <xs:documentation> General data container to attach a typed data object to
760 any vamsas object </xs:documentation>
762 <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false">
764 <xs:documentation> true implies data will be decompresses with Zip
765 before presenting to application </xs:documentation>
768 <xs:attribute name="type" type="xs:string" use="required">
770 <xs:documentation> Type of arbitrary data - TODO: decide format - use
771 (extended) MIME types ? </xs:documentation>
774 <xs:attribute name="objectref" type="xs:IDREF" use="required">
776 <xs:documentation> Object the arbitrary data is associated with
780 <xs:attribute name="id" type="xs:ID" use="optional">
782 <xs:documentation> Primary Key for vamsas object referencing
790 <xs:complexType name="appData">
792 <xs:element name="data" type="xs:base64Binary"/>
793 <xs:element name="dataReference" type="xs:string"/>
796 <xs:complexType name="mapList">
797 <xs:attribute name="from" type="xs:integer" use="optional" default="0">
799 <xs:documentation> Offset to first position in dataset sequence record that start
800 position on 'onto' maps to </xs:documentation>
803 <xs:attribute name="to" type="xs:integer" use="optional" default="0">
805 <xs:documentation> Offset to last position in dataset sequence record that end
806 position on 'onto' maps to </xs:documentation>
809 <xs:attribute name="start" type="xs:integer" use="required">
811 <xs:documentation> Offset to first position in database entry that first (or offset)
812 position in sequence maps to </xs:documentation>
815 <xs:attribute name="end" type="xs:integer" use="required">
817 <xs:documentation> Offset to last position in database entry that last (offset)
818 position in sequence maps to </xs:documentation>
822 <xs:simpleType name="locks">
825 Contains lock information:
826 locktype:ApplicationHandle
827 locktype is 'local' or 'full'
828 A lock is only valid if the ApplicationHandle resolves to a living application in the vamsas session.
829 A local lock means that the application has locked changes to all local properties on the object.
830 A full lock means that the application has locked changes to all properties on the object, and any objects that it holds references to.
833 <xs:restriction base="xs:string"/>