refactored mapping to mapList type in both DbRef and SeqType object.
[vamsas.git] / schemas / vamsas.xsd
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">
7         <xs:annotation>
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>
12         </xs:annotation>
13         <xs:element name="VAMSAS">
14                 <xs:annotation>
15                         <xs:documentation> contains unassociated trees and a number of analysis sets
16                         </xs:documentation>
17                 </xs:annotation>
18                 <xs:complexType>
19                         <xs:sequence>
20                                 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
21                                 <xs:element ref="vamsas:DataSet" minOccurs="0" maxOccurs="unbounded"/>
22                         </xs:sequence>
23                         <xs:attribute name="id" type="xs:ID" use="optional">
24                                 <xs:annotation>
25                                         <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
26                                 </xs:annotation>
27                         </xs:attribute>
28                         <xs:attribute name="modifiable" type="xs:boolean" use="optional" default="true">
29                                 <xs:annotation>
30                                         <xs:documentation> objects with modifiable=false will not be modified by a
31                                                 vamsas client update </xs:documentation>
32                                 </xs:annotation>
33                         </xs:attribute>
34                 </xs:complexType>
35         </xs:element>
36         <xs:annotation>
37                 <xs:documentation> Properties. Generally, these are mutable so an application should check
38                         them each time. This may change depending on the context of the property
39                 </xs:documentation>
40         </xs:annotation>
41         <xs:element name="Tree">
42                 <xs:complexType>
43                         <xs:annotation>
44                                 <xs:documentation> Contains a named collection of trees </xs:documentation>
45                                 <xs:documentation> TODO: define way of referencing leaves of global tree for any
46                                         sequence/alignment object. SUggestion 1: Each named tree leafnode has a unique
47                                         id (which may be unique in combination with trees own vorba ID). Dataset
48                                         sequences can be tagged with a property "vamsas:tree_leaf" </xs:documentation>
49                         </xs:annotation>
50                         <xs:sequence>
51                                 <xs:element name="title" type="xs:string" minOccurs="0"/>
52                                 <xs:element name="newick" maxOccurs="unbounded">
53                                         <xs:complexType>
54                                                 <xs:simpleContent>
55                                                         <xs:extension base="xs:string">
56                                                                 <xs:attribute name="title" type="xs:string" use="optional"/>
57                                                                 <xs:attribute name="id" type="xs:ID" use="optional">
58                                                                         <xs:annotation>
59                                                                                 <xs:documentation> Primary Key for vamsas object referencing
60                                                                                 </xs:documentation>
61                                                                         </xs:annotation>
62                                                                 </xs:attribute>
63                                                                 <xs:attribute name="modifiable" type="xs:boolean" use="optional"
64                                                                         default="true">
65                                                                         <xs:annotation>
66                                                                                 <xs:documentation> objects with modifiable=false will not be
67                                                                                         modified by a vamsas client update </xs:documentation>
68                                                                         </xs:annotation>
69                                                                 </xs:attribute>
70                                                         </xs:extension>
71                                                 </xs:simpleContent>
72                                         </xs:complexType>
73                                 </xs:element>
74                                 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
75                                 <xs:element ref="vamsas:Provenance"/>
76                         </xs:sequence>
77                         <xs:attribute name="id" type="xs:ID" use="optional">
78                                 <xs:annotation>
79                                         <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
80                                 </xs:annotation>
81                         </xs:attribute>
82                         <xs:attribute name="modifiable" type="xs:boolean" use="optional" default="true">
83                                 <xs:annotation>
84                                         <xs:documentation> objects with modifiable=false will not be modified by a
85                                                 vamsas client update </xs:documentation>
86                                 </xs:annotation>
87                         </xs:attribute>
88                 </xs:complexType>
89         </xs:element>
90         <xs:element name="property">
91                 <xs:complexType>
92                         <xs:simpleContent>
93                                 <xs:annotation>
94                                         <xs:documentation> Named and typed property string </xs:documentation>
95                                 </xs:annotation>
96                                 <xs:extension base="xs:string">
97                                         <xs:attribute name="name" type="xs:string" use="required"/>
98                                         <xs:attribute name="type" type="xs:string" use="required">
99                                                 <xs:annotation>
100                                                         <xs:documentation> The type specifies how the property will be parsed.
101                                                                 Empty property strings are allowed, and can be used to prototype the
102                                                                 input to a document. TODO: specify allowed types </xs:documentation>
103                                                 </xs:annotation>
104                                         </xs:attribute>
105                                 </xs:extension>
106                         </xs:simpleContent>
107                 </xs:complexType>
108         </xs:element>
109         <xs:element name="link">
110                 <xs:complexType>
111                         <xs:annotation>
112                                 <xs:documentation> Primitive labelled URI object </xs:documentation>
113                         </xs:annotation>
114                         <xs:simpleContent>
115                                 <xs:extension base="xs:string">
116                                         <xs:attribute name="href" type="xs:anyURI">
117                                                 <xs:annotation>
118                                                         <xs:documentation>The URI</xs:documentation>
119                                                 </xs:annotation>
120                                         </xs:attribute>
121                                 </xs:extension>
122                         </xs:simpleContent>
123                 </xs:complexType>
124         </xs:element>
125         <xs:complexType name="rangeType" abstract="true">
126                 <xs:annotation>
127                         <xs:documentation> Specify an ordered set of positions and/or regions on the principle
128                                 dimension of some associated vamsas object </xs:documentation>
129                         <xs:documentation> Keeping to jaxb-1.0 specification for the moment - this choice should
130                                 become a substitution group when we use jaxb-2.0 capable bindings
131                         </xs:documentation>
132                 </xs:annotation>
133                 <xs:choice>
134                         <xs:element name="pos" maxOccurs="unbounded">
135                                 <xs:annotation>
136                                         <xs:documentation> a position within the associated object's coordinate system
137                                         </xs:documentation>
138                                 </xs:annotation>
139                                 <xs:complexType>
140                                         <xs:attribute name="i" type="xs:int" use="required"/>
141                                 </xs:complexType>
142                         </xs:element>
143                         <xs:element name="seg" maxOccurs="unbounded">
144                                 <xs:annotation>
145                                         <xs:documentation> a region from start to end, with flag for inclusivity of
146                                                 terminii </xs:documentation>
147                                 </xs:annotation>
148                                 <xs:complexType>
149                                         <xs:attribute name="start" type="xs:int" use="required"/>
150                                         <xs:attribute name="end" type="xs:int" use="required"/>
151                                         <xs:attribute name="inclusive" type="xs:boolean" use="required">
152                                                 <xs:annotation>
153                                                         <xs:documentation> when false, a consecutive range like 'start=1, end=2'
154                                                                 means the region lying after position 1 and before position 2
155                                                         </xs:documentation>
156                                                 </xs:annotation>
157                                         </xs:attribute>
158                                 </xs:complexType>
159                         </xs:element>
160                 </xs:choice>
161                 <!--  Do we really need this - a position could be just a seg with start=end and inclusive=true -->
162         </xs:complexType>
163         <xs:complexType name="rangeAnnotation">
164                 <xs:annotation>
165                         <xs:documentation> Annotation for a rangeSpec - values can be attached for the whole
166                                 specification, and to each position within the spec. following the orientation
167                                 specified by the ordered set of rangeSpec (pos, seg) elements. </xs:documentation>
168                 </xs:annotation>
169                 <xs:complexContent>
170                         <xs:extension base="vamsas:rangeType">
171                                 <xs:sequence>
172                                         <xs:element name="label" type="xs:string" minOccurs="0">
173                                                 <xs:annotation>
174                                                         <xs:documentation> Short, meaningful name for the annotation - if this
175                                                                 is absent, then the type string should be used in its place.
176                                                         </xs:documentation>
177                                                 </xs:annotation>
178                                         </xs:element>
179                                         <xs:element name="description" type="xs:string" minOccurs="0">
180                                                 <xs:annotation>
181                                                         <xs:documentation> Human readable description of the annotation
182                                                         </xs:documentation>
183                                                 </xs:annotation>
184                                         </xs:element>
185                                         <xs:element name="status" type="xs:string" minOccurs="0">
186                                                 <xs:annotation>
187                                                         <xs:documentation> TODO: specify this - we have considered taking the GO
188                                                                 evidence codes as a model for assessing a measure of quality to an
189                                                                 annotation. </xs:documentation>
190                                                 </xs:annotation>
191                                         </xs:element>
192                                         <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded">
193                                                 <xs:annotation>
194                                                         <xs:documentation> Annotation Element position maps to ordered positions
195                                                                 defined by the sequence of rangeType pos positions or concatenated
196                                                                 seg start/end segments. </xs:documentation>
197                                                 </xs:annotation>
198                                         </xs:element>
199                                         <xs:element name="score" minOccurs="0" maxOccurs="unbounded">
200                                                 <xs:annotation>
201                                                         <xs:documentation> Ordered set of optionally named float values for the
202                                                                 whole annotation </xs:documentation>
203                                                 </xs:annotation>
204                                                 <xs:complexType>
205                                                         <xs:simpleContent>
206                                                                 <xs:extension base="xs:float">
207                                                                         <xs:attribute name="name" type="xs:string" use="optional"
208                                                                                 default="score"/>
209                                                                 </xs:extension>
210                                                         </xs:simpleContent>
211                                                 </xs:complexType>
212                                         </xs:element>
213                                         <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
214                                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
215                                                 <xs:annotation>
216                                                         <xs:documentation> Note:These are mutable so an application should check
217                                                                 them each time. </xs:documentation>
218                                                 </xs:annotation>
219                                         </xs:element>
220                                 </xs:sequence>
221                                 <xs:attribute name="id" type="xs:ID" use="optional">
222                                         <xs:annotation>
223                                                 <xs:documentation> Primary Key for vamsas object referencing
224                                                 </xs:documentation>
225                                         </xs:annotation>
226                                 </xs:attribute>
227                                 <xs:attribute name="modifiable" type="xs:boolean" use="optional" default="true">
228                                         <xs:annotation>
229                                                 <xs:documentation> objects with modifiable=false will not be modified by a
230                                                         vamsas client update </xs:documentation>
231                                         </xs:annotation>
232                                 </xs:attribute>
233                                 <xs:attribute name="group" type="xs:string" use="optional" default="">
234                                         <xs:annotation>
235                                                 <xs:documentation> Annotation with the same non-empty group name are grouped
236                                                         together </xs:documentation>
237                                         </xs:annotation>
238                                 </xs:attribute>
239                                 <xs:attribute name="type" type="xs:string" use="required">
240                                         <xs:annotation>
241                                                 <xs:documentation> A Das Feature has both a type and a Type ID. We go the
242                                                         route of requiring the type string to be taken from a controlled
243                                                         vocabulary if an application expects others to make sense of it. The
244                                                         type may qualified - so uniprot:CHAIN is a valid type name, and
245                                                         considered distinct from someotherDB:CHAIN </xs:documentation>
246                                         </xs:annotation>
247                                 </xs:attribute>
248                         </xs:extension>
249                 </xs:complexContent>
250         </xs:complexType>
251         <xs:element name="param">
252                 <xs:complexType>
253                         <xs:annotation>
254                                 <xs:documentation> Specifies a named and typed value used to perform some data
255                                         transformation. </xs:documentation>
256                                 <xs:documentation> LATER: experiment with xml validation of property set prototypes
257                                         for services </xs:documentation>
258                         </xs:annotation>
259                         <xs:simpleContent>
260                                 <xs:annotation>
261                                         <xs:documentation> Named and typed property string </xs:documentation>
262                                 </xs:annotation>
263                                 <xs:extension base="xs:string">
264                                         <xs:attribute name="name" type="xs:string" use="required"/>
265                                         <xs:attribute name="type" type="xs:string" use="required">
266                                                 <xs:annotation>
267                                                         <xs:documentation> The type specifies how the property will be parsed.
268                                                                 Empty property strings are allowed, and can be used to prototype the
269                                                                 input to a document. TODO: specify allowed types </xs:documentation>
270                                                 </xs:annotation>
271                                         </xs:attribute>
272                                 </xs:extension>
273                         </xs:simpleContent>
274                 </xs:complexType>
275         </xs:element>
276         <xs:element name="input">
277                 <xs:complexType>
278                         <xs:annotation>
279                                 <xs:documentation> Selects all or part of a collection of vamsas objects as a named
280                                         input to some transformation process. Many inputs with the same name imply a
281                                         group input (such as a collection of sequences) </xs:documentation>
282                         </xs:annotation>
283                         <xs:complexContent>
284                                 <xs:extension base="vamsas:rangeType">
285                                         <xs:attribute name="name" type="xs:string" use="required"/>
286                                         <xs:attribute name="objRef" type="xs:IDREF" use="optional">
287                                                 <xs:annotation>
288                                                         <xs:documentation> Reference Frame for rangeType specfication
289                                                         </xs:documentation>
290                                                 </xs:annotation>
291                                         </xs:attribute>
292                                 </xs:extension>
293                         </xs:complexContent>
294                 </xs:complexType>
295         </xs:element>
296         <xs:element name="Provenance">
297                 <xs:complexType>
298                         <xs:annotation>
299                                 <xs:documentation> Defines the origin and series of operations applied directly to
300                                         the object that references it. </xs:documentation>
301                         </xs:annotation>
302                         <xs:sequence>
303                                 <xs:element name="entry" maxOccurs="unbounded">
304                                         <xs:complexType>
305                                                 <xs:sequence>
306                                                         <xs:element name="User" type="xs:string">
307                                                                 <xs:annotation>
308                                                                         <xs:documentation> Who </xs:documentation>
309                                                                 </xs:annotation>
310                                                         </xs:element>
311                                                         <xs:element name="App" type="xs:string">
312                                                                 <xs:annotation>
313                                                                         <xs:documentation> With which application </xs:documentation>
314                                                                 </xs:annotation>
315                                                         </xs:element>
316                                                         <xs:element name="Action" type="xs:string">
317                                                                 <xs:annotation>
318                                                                         <xs:documentation> Did what </xs:documentation>
319                                                                 </xs:annotation>
320                                                         </xs:element>
321                                                         <xs:element name="Date" type="xs:date">
322                                                                 <xs:annotation>
323                                                                         <xs:documentation> When </xs:documentation>
324                                                                 </xs:annotation>
325                                                         </xs:element>
326                                                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
327                                                                 <xs:annotation>
328                                                                         <xs:documentation> additional information </xs:documentation>
329                                                                 </xs:annotation>
330                                                         </xs:element>
331                                                         <xs:element ref="vamsas:param" minOccurs="0" maxOccurs="unbounded">
332                                                                 <xs:annotation>
333                                                                         <xs:documentation> parameter for the action </xs:documentation>
334                                                                 </xs:annotation>
335                                                         </xs:element>
336                                                         <xs:element ref="vamsas:input" minOccurs="0" maxOccurs="unbounded">
337                                                                 <xs:annotation>
338                                                                         <xs:documentation> bioinformatic objects input to action
339                                                                         </xs:documentation>
340                                                                 </xs:annotation>
341                                                         </xs:element>
342                                                 </xs:sequence>
343                                                 <xs:attribute name="id" type="xs:ID" use="optional">
344                                                         <xs:annotation>
345                                                                 <xs:documentation> Primary Key for vamsas object referencing
346                                                                 </xs:documentation>
347                                                         </xs:annotation>
348                                                 </xs:attribute>
349                                         </xs:complexType>
350                                 </xs:element>
351                         </xs:sequence>
352                 </xs:complexType>
353         </xs:element>
354         <xs:element name="DataSet">
355                 <xs:complexType>
356                         <xs:annotation>
357                                 <xs:documentation> A collection of sequences, alignments, trees and other things.
358                                 </xs:documentation>
359                         </xs:annotation>
360                         <xs:sequence>
361                                 <xs:element name="Sequence" maxOccurs="unbounded">
362                                         <xs:complexType>
363                                                 <xs:annotation>
364                                                         <xs:documentation> a primary or secondary sequence record from which all
365                                                                 other sequences may be derived </xs:documentation>
366                                                 </xs:annotation>
367                                                 <xs:complexContent>
368                                                         <xs:extension base="vamsas:SequenceType">
369                                                                 <xs:sequence>
370                                                                         <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
371                                                                                 <xs:annotation>
372                                                                                         <xs:documentation> Store a list of database references
373                                                                                                 for this sequence record - with optional mapping
374                                                                                                 from database sequence to the given sequence record </xs:documentation>
375                                                                                         <xs:documentation/>
376                                                                                         <xs:documentation/>
377                                                                                 </xs:annotation>
378                                                                                 <xs:complexType>
379                                                                                         <xs:sequence>
380                                                                                                 <xs:element name="map"
381                                                                                                         minOccurs="0" maxOccurs="unbounded">
382                                                                                                         <xs:annotation><xs:documentation> From: Offset to first
383                                                                                                                 position in dataset sequence record that
384                                                                                                                 this database entry maps to To: Offset
385                                                                                                                 to last position in dataset sequence
386                                                                                                                 record that this database entry maps to
387                                                                                                                 Start: Offset to first last position in
388                                                                                                                 database entry that first (or offset)
389                                                                                                                 position in sequence maps to End: Offset
390                                                                                                                 to last position in database entry that
391                                                                                                                 last (offset) position in sequence maps
392                                                                                                                 to </xs:documentation>
393                                                                                                         </xs:annotation>
394                                                                                                         <xs:complexType>
395                                                                                                                 <xs:complexContent>
396                                                                                                                         <xs:extension base="vamsas:mapList">
397                                                                                                                                 
398                                                                                                                         </xs:extension>
399                                                                                                                 </xs:complexContent>
400                                                                                                         </xs:complexType>                                                                                               
401                                                                                                 </xs:element>
402                                                                                                 <xs:element ref="vamsas:link" minOccurs="0"
403                                                                                                 maxOccurs="unbounded"/>
404                                                                                                 <xs:element ref="vamsas:property" minOccurs="0"
405                                                                                                 maxOccurs="unbounded"/>
406                                                                                         </xs:sequence>
407                                                                                         <xs:attribute name="source" type="xs:string"
408                                                                                                 use="required">
409                                                                                                 <xs:annotation>
410                                                                                                 <xs:documentation> TODO Database Naming
411                                                                                                 Convention: either start using LSID (so
412                                                                                                 change type to URI) or leave this as an
413                                                                                                 uncontrolled/unspecified string ID
414                                                                                                 </xs:documentation>
415                                                                                                 </xs:annotation>
416                                                                                         </xs:attribute>
417                                                                                         <xs:attribute name="version" type="xs:string"
418                                                                                                 use="required">
419                                                                                                 <xs:annotation>
420                                                                                                 <xs:documentation> Version must be specified -
421                                                                                                 </xs:documentation>
422                                                                                                 </xs:annotation>
423                                                                                         </xs:attribute>
424                                                                                         <xs:attribute name="accessionId" type="xs:string"
425                                                                                                 use="required">
426                                                                                                 <xs:annotation>
427                                                                                                 <xs:documentation> TODO: make some specification
428                                                                                                 of the database field from which this
429                                                                                                 accessionId is taken from - should that be a
430                                                                                                 special property of the dbRef object ?
431                                                                                                 </xs:documentation>
432                                                                                                 </xs:annotation>
433                                                                                         </xs:attribute>
434                                                                                         <xs:attribute name="id" type="xs:ID" use="optional">
435                                                                                                 <xs:annotation>
436                                                                                                 <xs:documentation> Primary Key for vamsas object
437                                                                                                 referencing </xs:documentation>
438                                                                                                 </xs:annotation>
439                                                                                         </xs:attribute>
440                                                                                 </xs:complexType>
441                                                                         </xs:element>
442                                                                 </xs:sequence>
443                                                                 <xs:attribute name="id" type="xs:ID" use="optional">
444                                                                         <xs:annotation>
445                                                                                 <xs:documentation> Primary Key for vamsas object referencing
446                                                                                 </xs:documentation>
447                                                                         </xs:annotation>
448                                                                 </xs:attribute>
449                                                                 <xs:attribute name="dictionary" type="xs:string" use="required">
450                                                                         <xs:annotation>
451                                                                                 <xs:documentation> symbol class for sequence
452                                                                                 </xs:documentation>
453                                                                         </xs:annotation>
454                                                                 </xs:attribute>
455                                                         </xs:extension>
456                                                 </xs:complexContent>
457                                         </xs:complexType>
458                                 </xs:element>
459                                 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
460                                         <xs:complexType>
461                                                 <xs:annotation>
462                                                         <xs:documentation> Annotate over positions and regions of a dataset
463                                                                 sequence </xs:documentation>
464                                                 </xs:annotation>
465                                                 <xs:complexContent>
466                                                         <xs:extension base="vamsas:rangeAnnotation">
467                                                                 <xs:sequence>
468                                                                         <xs:element ref="vamsas:Provenance"/>
469                                                                 </xs:sequence>
470                                                                 <xs:attribute name="seqRef" type="xs:IDREF" use="required">
471                                                                         <xs:annotation>
472                                                                                 <xs:documentation> annotation is associated with a
473                                                                                         particular dataset sequence </xs:documentation>
474                                                                         </xs:annotation>
475                                                                 </xs:attribute>
476                                                         </xs:extension>
477                                                 </xs:complexContent>
478                                         </xs:complexType>
479                                 </xs:element>
480                                 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
481                                         <xs:complexType>
482                                                 <xs:sequence>
483                                                         <xs:element name="AlignmentAnnotation" minOccurs="0"
484                                                                 maxOccurs="unbounded">
485                                                                 <xs:annotation>
486                                                                         <xs:documentation> This is annotation over the coordinate frame
487                                                                                 defined by all the columns in the alignment.
488                                                                         </xs:documentation>
489                                                                 </xs:annotation>
490                                                                 <xs:complexType>
491                                                                         <xs:complexContent>
492                                                                                 <xs:extension base="vamsas:rangeAnnotation">
493                                                                                         <xs:sequence>
494                                                                                                 <xs:element ref="vamsas:Provenance"/>
495                                                                                         </xs:sequence>
496                                                                                         <xs:attribute name="graph" type="xs:boolean"
497                                                                                                 use="required">
498                                                                                                 <xs:annotation>
499                                                                                                 <xs:documentation> TODO: decide if this flag is
500                                                                                                 redundant - when true it would suggest that
501                                                                                                 the annotationElement values together form a
502                                                                                                 graph </xs:documentation>
503                                                                                                 </xs:annotation>
504                                                                                         </xs:attribute>
505                                                                                 </xs:extension>
506                                                                         </xs:complexContent>
507                                                                 </xs:complexType>
508                                                         </xs:element>
509                                                         <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
510                                                         <xs:element name="alignmentSequence" maxOccurs="unbounded">
511                                                                 <xs:complexType>
512                                                                         <xs:complexContent>
513                                                                                 <xs:extension base="vamsas:SequenceType">
514                                                                                         <xs:sequence>
515                                                                                                 <xs:element name="AlignmentSequenceAnnotation"
516                                                                                                 minOccurs="0" maxOccurs="unbounded">
517                                                                                                 <xs:complexType>
518                                                                                                 <xs:annotation>
519                                                                                                 <xs:documentation> Annotate over
520                                                                                                 positions and regions of the
521                                                                                                 ungapped sequence in the context of
522                                                                                                 the alignment </xs:documentation>
523                                                                                                 <xs:documentation/>
524                                                                                                 </xs:annotation>
525                                                                                                 <xs:complexContent>
526                                                                                                 <xs:extension
527                                                                                                 base="vamsas:rangeAnnotation">
528                                                                                                 <xs:sequence>
529                                                                                                 <xs:element
530                                                                                                 ref="vamsas:Provenance"/>
531                                                                                                 </xs:sequence>
532                                                                                                 <xs:attribute name="graph"
533                                                                                                 type="xs:boolean" use="required">
534                                                                                                 <xs:annotation>
535                                                                                                 <xs:documentation> TODO:
536                                                                                                 decide if this flag is
537                                                                                                 redundant - when true it
538                                                                                                 would suggest that the
539                                                                                                 annotationElement values
540                                                                                                 together form a graph
541                                                                                                 </xs:documentation>
542                                                                                                 </xs:annotation>
543                                                                                                 </xs:attribute>
544                                                                                                 </xs:extension>
545                                                                                                 </xs:complexContent>
546                                                                                                 <!--                                                            
547                                                                                                                         This replaces the flat list of sequenceFeatures.
548                                                                                                                         <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
549                                                                                                                         <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
550                                                                                                                         </xs:annotation><xs:complexContent>
551                                                                                                                         <xs:extension base="vamsas:rangeFeature">                                                               
552                                                                                                                         <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
553                                                                                                                         <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>
554                                                                                                                         </xs:attribute>
555                                                                                                                         </xs:extension>
556                                                                                                                         </xs:complexContent></xs:complexType></xs:element> -->
557                                                                                                 </xs:complexType>
558                                                                                                 </xs:element>
559                                                                                         </xs:sequence>
560                                                                                         <xs:attribute name="id" type="xs:ID" use="optional">
561                                                                                                 <xs:annotation>
562                                                                                                 <xs:documentation> Primary Key for vamsas object
563                                                                                                 referencing </xs:documentation>
564                                                                                                 </xs:annotation>
565                                                                                         </xs:attribute>
566                                                                                         <xs:attribute name="refid" type="xs:IDREF"
567                                                                                                 use="required">
568                                                                                                 <xs:annotation>
569                                                                                                 <xs:documentation> Dataset Sequence from which
570                                                                                                 this alignment sequence is taken from
571                                                                                                 </xs:documentation>
572                                                                                                 </xs:annotation>
573                                                                                         </xs:attribute>
574                                                                                 </xs:extension>
575                                                                         </xs:complexContent>
576                                                                 </xs:complexType>
577                                                         </xs:element>
578                                                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
579                                                                 <xs:annotation>
580                                                                         <xs:documentation> typical properties may be additional
581                                                                                 alignment score objects </xs:documentation>
582                                                                 </xs:annotation>
583                                                         </xs:element>
584                                                         <xs:element ref="vamsas:Provenance"/>
585                                                 </xs:sequence>
586                                                 <xs:attribute name="gapChar" type="xs:string" use="required"/>
587                                                 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
588                                                 <xs:attribute name="id" type="xs:ID" use="optional">
589                                                         <xs:annotation>
590                                                                 <xs:documentation> Primary Key for vamsas object referencing
591                                                                 </xs:documentation>
592                                                         </xs:annotation>
593                                                 </xs:attribute>
594                                                 <xs:attribute name="modifiable" type="xs:boolean" use="optional"
595                                                         default="true">
596                                                         <xs:annotation>
597                                                                 <xs:documentation> objects with modifiable=false will not be
598                                                                         modified by a vamsas client update </xs:documentation>
599                                                         </xs:annotation>
600                                                 </xs:attribute>
601                                         </xs:complexType>
602                                 </xs:element>
603                                 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
604                                 <xs:element ref="vamsas:Provenance"/>
605                         </xs:sequence>
606                         <xs:attribute name="id" type="xs:ID" use="optional">
607                                 <xs:annotation>
608                                         <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
609                                 </xs:annotation>
610                         </xs:attribute>
611                 </xs:complexType>
612         </xs:element>
613         <xs:element name="annotationElement">
614                 <xs:complexType>
615                         <xs:annotation>
616                                 <xs:documentation> per-site symbolic and/or quantitative annotation </xs:documentation>
617                                 <xs:documentation> SecondaryStructure and display character (from Jalview) have been
618                                         subsumed into the glyph element </xs:documentation>
619                         </xs:annotation>
620                         <xs:sequence>
621                                 <xs:element name="description" type="xs:string" minOccurs="0">
622                                         <xs:annotation>
623                                                 <xs:documentation> Free text at this position </xs:documentation>
624                                         </xs:annotation>
625                                 </xs:element>
626                                 <xs:element name="glyph" minOccurs="0" maxOccurs="unbounded">
627                                         <xs:annotation>
628                                                 <xs:documentation> Discrete symbol - possibly graphically represented
629                                                 </xs:documentation>
630                                         </xs:annotation>
631                                         <xs:complexType>
632                                                 <xs:simpleContent>
633                                                         <xs:extension base="xs:string">
634                                                                 <xs:attribute name="dict" type="xs:string" use="optional"
635                                                                         default="utf8">
636                                                                         <xs:annotation>
637                                                                                 <xs:documentation> specifies the symbol dictionary for this
638                                                                                         glyph - eg utf8 (the default), aasecstr_3 or
639                                                                                         kd_hydrophobicity - the content is not validated so
640                                                                                         applications must ensure they gracefully deal with
641                                                                                         invalid entries here </xs:documentation>
642                                                                                 <xs:documentation> TODO: specify a minimum list of glyph
643                                                                                         dictionaries to get us started and provide a way for the
644                                                                                         vamsasClient to validate their content if regexes are
645                                                                                         specified </xs:documentation>
646                                                                         </xs:annotation>
647                                                                 </xs:attribute>
648                                                         </xs:extension>
649                                                 </xs:simpleContent>
650                                         </xs:complexType>
651                                 </xs:element>
652                                 <xs:element name="value" type="xs:float" minOccurs="0" maxOccurs="unbounded">
653                                         <xs:annotation>
654                                                 <xs:documentation> Ordered set of float values - an application may treat
655                                                         the values together as a vector with common support for a set of
656                                                         annotation elements - but this is, again, not validated so applications
657                                                         should deal gracefully with varying numbers of dimensions
658                                                 </xs:documentation>
659                                         </xs:annotation>
660                                 </xs:element>
661                         </xs:sequence>
662                         <xs:attribute name="position" type="xs:integer" use="required">
663                                 <xs:annotation>
664                                         <xs:documentation> position with respect to the coordinate frame defined by a
665                                                 rangeType specification </xs:documentation>
666                                 </xs:annotation>
667                         </xs:attribute>
668                         <xs:attribute name="after" type="xs:boolean" use="optional" default="false">
669                                 <xs:annotation>
670                                         <xs:documentation> true means the annotation element appears between the
671                                                 specified position and the next </xs:documentation>
672                                 </xs:annotation>
673                         </xs:attribute>
674                         <xs:attribute name="id" type="xs:ID" use="optional">
675                                 <xs:annotation>
676                                         <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
677                                 </xs:annotation>
678                         </xs:attribute>
679                 </xs:complexType>
680         </xs:element>
681         <xs:complexType name="SequenceType">
682                 <xs:sequence>
683                         <xs:element name="sequence" type="xs:string"/>
684                         <xs:element name="name" type="xs:string"/>
685                         <xs:element name="description" type="xs:string" minOccurs="0"/>
686                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
687                                 <xs:annotation>
688                                         <xs:documentation> additional typed properties </xs:documentation>
689                                 </xs:annotation>
690                         </xs:element>
691                         <xs:element name="mapping" minOccurs="0" maxOccurs="unbounded">
692                                 <xs:complexType>
693                                         <xs:complexContent>
694                                                 <xs:extension base="vamsas:mapList">
695                                                         <xs:attribute name="onto" type="xs:IDREF" use="required">
696                                                                 <xs:annotation>
697                                                                         <xs:documentation> object to which the mapping is being mapped
698                                                                         </xs:documentation>
699                                                                 </xs:annotation>
700                                                         </xs:attribute>
701                                                 </xs:extension>
702                                         </xs:complexContent>
703                                 </xs:complexType>
704                         </xs:element>
705                 </xs:sequence>
706                 <xs:attribute name="start" type="xs:integer" use="required"/>
707                 <xs:attribute name="end" type="xs:integer" use="required"/>
708         </xs:complexType>
709         <xs:element name="ApplicationData">
710                 <xs:complexType>
711                         <xs:annotation>
712                                 <xs:documentation> Data specific to a particular type and version of vamsas
713                                         application </xs:documentation>
714                         </xs:annotation>
715                         <xs:complexContent>
716                                 <xs:extension base="vamsas:appData">
717                                         <xs:sequence>
718                                                 <xs:element name="User" minOccurs="0" maxOccurs="unbounded">
719                                                         <xs:complexType>
720                                                                 <xs:complexContent>
721                                                                         <xs:extension base="vamsas:appData">
722                                                                                 <xs:annotation>
723                                                                                         <xs:documentation> Data available to just a particular
724                                                                                                 user </xs:documentation>
725                                                                                 </xs:annotation>
726                                                                                 <xs:attribute name="fullname" type="xs:string"
727                                                                                         use="required"/>
728                                                                                 <xs:attribute name="organization" type="xs:string"
729                                                                                         use="required"/>
730                                                                         </xs:extension>
731                                                                 </xs:complexContent>
732                                                         </xs:complexType>
733                                                 </xs:element>
734                                                 <xs:element name="Common" minOccurs="0">
735                                                         <xs:complexType>
736                                                                 <xs:complexContent>
737                                                                         <xs:extension base="vamsas:appData"/>
738                                                                 </xs:complexContent>
739                                                         </xs:complexType>
740                                                 </xs:element>
741                                                 <xs:element name="Instance" minOccurs="0" maxOccurs="unbounded">
742                                                         <xs:complexType>
743                                                                 <xs:complexContent>
744                                                                         <xs:extension base="vamsas:appData">
745                                                                                 <xs:annotation>
746                                                                                         <xs:documentation> Data available to just a specific
747                                                                                                 instance of the application </xs:documentation>
748                                                                                         <xs:documentation> VAMSAS/Pierre: Is this data volatile
749                                                                                                 ? Application instances may not be accessible after
750                                                                                                 the session has closed - the user may have to be
751                                                                                                 presented with the option of picking up the data in
752                                                                                                 that instance </xs:documentation>
753                                                                                 </xs:annotation>
754                                                                                 <xs:attribute name="urn" type="xs:string" use="required"/>
755                                                                         </xs:extension>
756                                                                 </xs:complexContent>
757                                                         </xs:complexType>
758                                                 </xs:element>
759                                         </xs:sequence>
760                                         <xs:attribute name="version" type="xs:string" use="required">
761                                                 <xs:annotation>
762                                                         <xs:documentation> Version string describing the application specific
763                                                                 data storage version used</xs:documentation>
764                                                 </xs:annotation>
765                                         </xs:attribute>
766                                         <xs:attribute name="name" type="xs:string" use="required">
767                                                 <xs:annotation>
768                                                         <xs:documentation> Canonical name of application </xs:documentation>
769                                                 </xs:annotation>
770                                         </xs:attribute>
771                                 </xs:extension>
772                         </xs:complexContent>
773                 </xs:complexType>
774         </xs:element>
775         <xs:element name="Attachment">
776                 <xs:complexType>
777                         <xs:complexContent>
778                                 <xs:extension base="vamsas:appData">
779                                         <xs:annotation>
780                                                 <xs:documentation> General data container to attach a typed data object to
781                                                         any vamsas object </xs:documentation>
782                                         </xs:annotation>
783                                         <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false">
784                                                 <xs:annotation>
785                                                         <xs:documentation> true implies data will be decompresses with Zip
786                                                                 before presenting to application </xs:documentation>
787                                                 </xs:annotation>
788                                         </xs:attribute>
789                                         <xs:attribute name="type" type="xs:string" use="required">
790                                                 <xs:annotation>
791                                                         <xs:documentation> Type of arbitrary data - TODO: decide format - use
792                                                                 (extended) MIME types ? </xs:documentation>
793                                                 </xs:annotation>
794                                         </xs:attribute>
795                                         <xs:attribute name="objectref" type="xs:IDREF" use="required">
796                                                 <xs:annotation>
797                                                         <xs:documentation> Object the arbitrary data is associated with
798                                                         </xs:documentation>
799                                                 </xs:annotation>
800                                         </xs:attribute>
801                                         <xs:attribute name="id" type="xs:ID" use="optional">
802                                                 <xs:annotation>
803                                                         <xs:documentation> Primary Key for vamsas object referencing
804                                                         </xs:documentation>
805                                                 </xs:annotation>
806                                         </xs:attribute>
807                                 </xs:extension>
808                         </xs:complexContent>
809                 </xs:complexType>
810         </xs:element>
811         <xs:complexType name="appData">
812                 <xs:choice>
813                         <xs:element name="data" type="xs:base64Binary"/>
814                         <xs:element name="dataReference" type="xs:string"/>
815                 </xs:choice>
816         </xs:complexType>
817         <xs:complexType name="mapList">
818                 <xs:attribute name="from" type="xs:integer" use="optional" default="0">
819                         <xs:annotation>
820                                 <xs:documentation> Offset to first position in dataset sequence record that start
821                                         position on 'onto' maps to </xs:documentation>
822                         </xs:annotation>
823                 </xs:attribute>
824                 <xs:attribute name="to" type="xs:integer" use="optional" default="0">
825                         <xs:annotation>
826                                 <xs:documentation> Offset to last position in dataset sequence record that end
827                                         position on 'onto' maps to </xs:documentation>
828                         </xs:annotation>
829                 </xs:attribute>
830                 <xs:attribute name="start" type="xs:integer" use="required">
831                         <xs:annotation>
832                                 <xs:documentation> Offset to first position in database entry that first (or offset)
833                                         position in sequence maps to </xs:documentation>
834                         </xs:annotation>
835                 </xs:attribute>
836                 <xs:attribute name="end" type="xs:integer" use="required">
837                         <xs:annotation>
838                                 <xs:documentation> Offset to last position in database entry that last (offset)
839                                         position in sequence maps to </xs:documentation>
840                         </xs:annotation>
841                 </xs:attribute>
842         </xs:complexType>
843 </xs:schema>