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