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