added id for RangeAnnotation types.
[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 v2005 rel. 3 U (http://www.altova.com) by lj (jl) -->
4 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
5         xmlns:vamsas="http://www.vamsas.org"
6         targetNamespace="http://www.vamsas.org" elementFormDefault="qualified"
7         attributeFormDefault="unqualified">
8         <xs:annotation>
9                 <xs:documentation>
10                         Vorba ID - Vamsas Object Request Broker Address ID (name
11                         needs to be worked on): Suggest it could be of the form
12                         documentRoot/datasetName/SequenceUID for a dataset sequence.
13                         Alignment sequence:
14                         documentRoot/datasetName/AlignmentId/SequenceUID for an
15                         aligned form of a dataset sequence
16
17                 </xs:documentation>
18         </xs:annotation>
19         <xs:element name="VAMSAS">
20                 <xs:annotation>
21                         <xs:documentation>
22                                 contains unassociated trees and a number of analysis
23                                 sets
24                         </xs:documentation>
25                 </xs:annotation>
26                 <xs:complexType>
27                         <xs:sequence>
28                                 <xs:element ref="vamsas:Tree" minOccurs="0"
29                                         maxOccurs="unbounded" />
30                                 <xs:element ref="vamsas:DataSet" minOccurs="0"
31                                         maxOccurs="unbounded" />
32                         </xs:sequence>
33                         <xs:attribute name="id" type="xs:ID" use="optional">
34                                 <xs:annotation>
35                                         <xs:documentation>
36                                                 Primary Key for vamsas object referencing
37                                         </xs:documentation>
38                                 </xs:annotation>
39                         </xs:attribute>
40                         <xs:attribute name="modifiable" type="xs:boolean"
41                                 default="true" use="optional">
42                                 <xs:annotation>
43                                         <xs:documentation>
44                                                 objects with modifiable=false will not be
45                                                 modified by a vamsas client update
46                                         </xs:documentation>
47                                 </xs:annotation>
48                         </xs:attribute>
49                 </xs:complexType>
50         </xs:element>
51         <xs:annotation>
52                 <xs:documentation>
53                         Properties. Generally, these are mutable so an application
54                         should check them each time. This may change depending on
55                         the context of the property
56                 </xs:documentation>
57         </xs:annotation>
58         <xs:element name="Tree">
59                 <xs:complexType>
60                         <xs:annotation>
61                                 <xs:documentation>
62                                         Contains a named collection of trees
63                                 </xs:documentation>
64                                 <xs:documentation>
65                                  TODO: define
66                                         way of referencing leaves of global tree for any
67                                         sequence/alignment object.
68                                 SUggestion 1: Each named tree leafnode has a unique id (which may be unique in combination with trees own vorba ID). 
69                                 Dataset sequences can be tagged with a property "vamsas:tree_leaf"
70                                 </xs:documentation>
71                         </xs:annotation>
72                         <xs:sequence>
73                                 <xs:element name="title" type="xs:string" minOccurs="0" />
74                                 <xs:element name="newick" maxOccurs="unbounded">
75                                         <xs:complexType>
76                                                 <xs:simpleContent>
77                                                         <xs:extension base="xs:string">
78                                                                 <xs:attribute name="title"
79                                                                         type="xs:string" use="optional" />
80                                                                 <xs:attribute name="id" type="xs:ID"
81                                                                         use="optional">
82                                                                         <xs:annotation>
83                                                                                 <xs:documentation>
84                                                                                         Primary Key for vamsas
85                                                                                         object referencing
86                                                                                 </xs:documentation>
87                                                                         </xs:annotation>
88                                                                 </xs:attribute>
89                                                                 <xs:attribute name="modifiable"
90                                                                         type="xs:boolean" default="true" use="optional">
91                                                                         <xs:annotation>
92                                                                                 <xs:documentation>
93                                                                                         objects with
94                                                                                         modifiable=false will not be
95                                                                                         modified by a vamsas client
96                                                                                         update
97                                                                                 </xs:documentation>
98                                                                         </xs:annotation>
99                                                                 </xs:attribute>
100                                                         </xs:extension>
101                                                 </xs:simpleContent>
102                                         </xs:complexType>
103                                 </xs:element>
104                                 <xs:element ref="vamsas:property" maxOccurs="unbounded"
105                                         minOccurs="0" />
106                                 <xs:element ref="vamsas:Provenance" />
107                         </xs:sequence>
108                         <xs:attribute name="id" type="xs:ID" use="optional">
109                                 <xs:annotation>
110                                         <xs:documentation>
111                                                 Primary Key for vamsas object referencing
112                                         </xs:documentation>
113                                 </xs:annotation>
114                         </xs:attribute>
115                         <xs:attribute name="modifiable" type="xs:boolean"
116                                 default="true" use="optional">
117                                 <xs:annotation>
118                                         <xs:documentation>
119                                                 objects with modifiable=false will not be
120                                                 modified by a vamsas client update
121                                         </xs:documentation>
122                                 </xs:annotation>
123                         </xs:attribute>
124                 </xs:complexType>
125         </xs:element>
126         <xs:element name="property">
127                 <xs:complexType>
128                         <xs:simpleContent>
129                                 <xs:annotation>
130                                         <xs:documentation>
131                                                 Named and typed property string
132                                         </xs:documentation>
133                                 </xs:annotation>
134                                 <xs:extension base="xs:string">
135                                         <xs:attribute name="name" type="xs:string"
136                                                 use="required" />
137                                         <xs:attribute name="type" type="xs:string"
138                                                 use="required">
139                                                 <xs:annotation>
140                                                         <xs:documentation>
141                                                                 The type specifies how the property will
142                                                                 be parsed. Empty property strings are
143                                                                 allowed, and can be used to prototype
144                                                                 the input to a document. TODO: specify
145                                                                 allowed types
146                                                         </xs:documentation>
147                                                 </xs:annotation>
148                                         </xs:attribute>
149                                 </xs:extension>
150                         </xs:simpleContent>
151                 </xs:complexType>
152         </xs:element>
153         <xs:element name="link">
154         <xs:complexType>
155                 <xs:annotation>
156                         <xs:documentation>
157                                 Primitive labelled URI object
158                         </xs:documentation>
159                 </xs:annotation>
160                 <xs:simpleContent>
161                         <xs:extension base="xs:string">
162                                 <xs:attribute name="href" type="xs:anyURI">
163                                         <xs:annotation>
164                                                 <xs:documentation>The URI</xs:documentation>
165                                         </xs:annotation>
166                                 </xs:attribute>
167                         </xs:extension>
168                 </xs:simpleContent>
169         </xs:complexType>
170         </xs:element>
171         <xs:complexType name="rangeType" abstract="true">
172                 <xs:annotation>
173                         <xs:documentation>
174                                 Specify an ordered set of positions and/or regions on the principle
175                                 dimension of some associated vamsas object
176                         </xs:documentation>
177                         <xs:documentation>
178                                 Keeping to jaxb-1.0 specification for the moment - this
179                                 choice should become a substitution group when we use
180                                 jaxb-2.0 capable bindings
181                         </xs:documentation>
182                 </xs:annotation>
183                 <!--  Do we really need this - a position could be just a seg with start=end and inclusive=true -->
184                 <xs:choice>
185                         <xs:element name="pos" maxOccurs="unbounded"
186                                 minOccurs="1">
187                                 <xs:annotation>
188                                         <xs:documentation>
189                                                 a position within the associated object's
190                                                 coordinate system
191                                         </xs:documentation>
192                                 </xs:annotation>
193                                 <xs:complexType>
194                                         <xs:attribute name="i" type="xs:int" use="required" />
195                                 </xs:complexType>
196                         </xs:element>
197                         <xs:element name="seg" maxOccurs="unbounded"
198                                 minOccurs="1">
199                                 <xs:annotation>
200                                         <xs:documentation>
201                                                 a region from start to end, with flag for
202                                                 inclusivity of terminii
203                                         </xs:documentation>
204                                 </xs:annotation>
205                                 <xs:complexType>
206                                         <xs:attribute name="start" type="xs:int"
207                                                 use="required" />
208                                         <xs:attribute name="end" type="xs:int"
209                                                 use="required" />
210                                         <xs:attribute name="inclusive" type="xs:boolean"
211                                                 use="required">
212                                                 <xs:annotation>
213                                                         <xs:documentation>
214                                                                 when false, a consecutive range like
215                                                                 'start=1, end=2' means the region lying
216                                                                 after position 1 and before position 2
217                                                         </xs:documentation>
218                                                 </xs:annotation>
219                                         </xs:attribute>
220                                 </xs:complexType>
221                         </xs:element>
222                 </xs:choice>
223         </xs:complexType>
224         <xs:complexType name="rangeAnnotation">
225                 <xs:annotation>
226                         <xs:documentation>
227                                 Annotation for a rangeSpec - values can be attached for the whole specification, and to each position within the spec. following the orientation specified by the ordered set of rangeSpec (pos, seg) elements.
228                         </xs:documentation>
229                 </xs:annotation>
230                 <xs:complexContent>
231                         <xs:extension base="vamsas:rangeType">
232                                 <xs:sequence>
233                                         <xs:element name="label" type="xs:string"
234                                                 minOccurs="0" >
235                                                 <xs:annotation>
236                                                 <xs:documentation>
237                                                         Short, meaningful name for the annotation - if this is absent, then the type string should be used in its place.
238                                                 </xs:documentation>
239                                                 </xs:annotation>
240                                                 </xs:element>
241                                         <xs:element name="description" type="xs:string"
242                                                 minOccurs="0" >
243                                                 <xs:annotation>
244                                                 <xs:documentation>
245                                                         Human readable description of the annotation
246                                                 </xs:documentation>
247                                                 </xs:annotation>
248                                                 </xs:element>
249                                         <xs:element name="status" type="xs:string"
250                                                 minOccurs="0" >
251                                                 <xs:annotation><xs:documentation>
252                                                         TODO: specify this - we have considered taking the GO evidence codes as a model for assessing a measure of quality to an annotation.
253                                                 </xs:documentation></xs:annotation>
254                                                 </xs:element>
255                                         <xs:element ref="vamsas:annotationElement"
256                                                 minOccurs="0" maxOccurs="unbounded">
257                                                 <xs:annotation>
258                                                         <xs:documentation>
259                                                                 Annotation Element position maps to
260                                                                 ordered positions defined by the
261                                                                 sequence of rangeType pos positions or
262                                                                 concatenated seg start/end segments.
263                                                         </xs:documentation>
264                                                 </xs:annotation>
265                                         </xs:element>
266                                         <xs:element name="score" minOccurs="0"
267                                                 maxOccurs="unbounded">
268                                                 <xs:annotation>
269                                                         <xs:documentation>
270                                                                 Ordered set of optionally named float
271                                                                 values for the whole annotation
272                                                         </xs:documentation>
273                                                 </xs:annotation>
274                                                 <xs:complexType>
275                                                         <xs:simpleContent>
276                                                                 <xs:extension base="xs:float">
277                                                                         <xs:attribute name="name"
278                                                                                 type="xs:string" use="optional" default="score">
279                                                                         </xs:attribute>
280                                                                 </xs:extension>
281                                                         </xs:simpleContent>
282                                                 </xs:complexType>
283                                         </xs:element>
284                                         <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded" />
285                                         <xs:element ref="vamsas:property" minOccurs="0"
286                                                 maxOccurs="unbounded">
287                                                 <xs:annotation>
288                                                         <xs:documentation>
289                                                                 Note:These are mutable so an application
290                                                                 should check them each time.
291                                                         </xs:documentation>
292                                                 </xs:annotation>
293                                         </xs:element>
294                                 </xs:sequence>
295                                 <xs:attribute name="id" type="xs:ID" use="optional">
296                                         <xs:annotation>
297                                                 <xs:documentation>
298                                                         Primary Key for vamsas object referencing
299                                                 </xs:documentation>
300                                         </xs:annotation>
301                                 </xs:attribute>
302                                 <xs:attribute name="modifiable" type="xs:boolean"
303                                         default="true" use="optional">
304                                         <xs:annotation>
305                                                 <xs:documentation>
306                                                         objects with modifiable=false will not be
307                                                         modified by a vamsas client update
308                                                 </xs:documentation>
309                                         </xs:annotation>
310                                 </xs:attribute>
311                                 <xs:attribute name="group" type="xs:string"
312                                         use="optional" default="">
313                                         <xs:annotation>
314                                                 <xs:documentation>
315                                                         Annotation with the same non-empty group
316                                                         name are grouped together
317                                                 </xs:documentation>
318                                         </xs:annotation>
319                                 </xs:attribute>
320                                 <xs:attribute name="type" type="xs:string"
321                                         use="required">
322                                         <xs:annotation>
323                                                 <xs:documentation>
324                                                         A Das Feature has both a type and a Type ID.
325                                                         We go the route of requiring the type string
326                                                         to be taken from a controlled vocabulary if
327                                                         an application expects others to make sense
328                                                         of it. 
329                                                         The type may qualified - so uniprot:CHAIN is a valid type name, 
330                                                         and considered distinct from someotherDB:CHAIN
331                                                 </xs:documentation>
332                                         </xs:annotation>
333                                 </xs:attribute>
334                         </xs:extension>
335                 </xs:complexContent>
336         </xs:complexType>
337         <xs:element name="param">
338                 <xs:complexType>
339                         <xs:annotation>
340                                 <xs:documentation>
341                                         Specifies a named and typed value used to perform
342                                         some data transformation.
343                                 </xs:documentation>
344                                 <xs:documentation>
345                                         LATER: experiment with xml validation of property
346                                         set prototypes for services
347                                 </xs:documentation>
348                         </xs:annotation>
349                         <xs:simpleContent>
350                                 <xs:annotation>
351                                         <xs:documentation>
352                                                 Named and typed property string
353                                         </xs:documentation>
354                                 </xs:annotation>
355                                 <xs:extension base="xs:string">
356                                         <xs:attribute name="name" type="xs:string"
357                                                 use="required" />
358                                         <xs:attribute name="type" type="xs:string"
359                                                 use="required">
360                                                 <xs:annotation>
361                                                         <xs:documentation>
362                                                                 The type specifies how the property will
363                                                                 be parsed. Empty property strings are
364                                                                 allowed, and can be used to prototype
365                                                                 the input to a document. TODO: specify
366                                                                 allowed types
367                                                         </xs:documentation>
368                                                 </xs:annotation>
369                                         </xs:attribute>
370                                 </xs:extension>
371                         </xs:simpleContent>
372                 </xs:complexType>
373         </xs:element>
374         <xs:element name="input">
375                 <xs:complexType>
376                         <xs:annotation>
377                                 <xs:documentation>
378                                         Selects all or part of a collection of vamsas
379                                         objects as a named input to some transformation
380                                         process. Many inputs with the same name imply a
381                                         group input (such as a collection of sequences)
382                                 </xs:documentation>
383                         </xs:annotation>
384                         <xs:complexContent>
385
386                                 <xs:extension base="vamsas:rangeType">
387                                         <xs:attribute name="name" type="xs:string"
388                                                 use="required">
389                                         </xs:attribute>
390                                         <xs:attribute name="objRef" type="xs:IDREF"
391                                                 use="optional">
392                                                 <xs:annotation>
393                                                         <xs:documentation>
394                                                                 Reference Frame for rangeType
395                                                                 specfication
396                                                         </xs:documentation>
397                                                 </xs:annotation>
398                                         </xs:attribute>
399                                 </xs:extension>
400                         </xs:complexContent>
401                 </xs:complexType>
402         </xs:element>
403
404         <xs:element name="Provenance">
405                 <xs:complexType>
406                         <xs:annotation>
407                                 <xs:documentation>
408                                         Defines the origin and series of operations applied
409                                         directly to the object that references it.
410                                 </xs:documentation>
411                         </xs:annotation>
412                         <xs:sequence>
413                                 <xs:element name="entry" maxOccurs="unbounded">
414                                         <xs:complexType>
415                                                 <xs:sequence>
416                                                         <xs:element name="User" type="xs:string">
417                                                                 <xs:annotation>
418                                                                         <xs:documentation>
419                                                                                 Who
420                                                                         </xs:documentation>
421                                                                 </xs:annotation>
422                                                         </xs:element>
423                                                         <xs:element name="App" type="xs:string">
424                                                                 <xs:annotation>
425                                                                         <xs:documentation>
426                                                                                 With which application
427                                                                         </xs:documentation>
428                                                                 </xs:annotation>
429                                                         </xs:element>
430                                                         <xs:element name="Action"
431                                                                 type="xs:string">
432                                                                 <xs:annotation>
433                                                                         <xs:documentation>
434                                                                                 Did what
435                                                                         </xs:documentation>
436                                                                 </xs:annotation>
437                                                         </xs:element>
438                                                         <xs:element name="Date" type="xs:date">
439                                                                 <xs:annotation>
440                                                                         <xs:documentation>
441                                                                                 When
442                                                                         </xs:documentation>
443                                                                 </xs:annotation>
444                                                         </xs:element>
445                                                         <xs:element ref="vamsas:property"
446                                                                 minOccurs="0" maxOccurs="unbounded">
447                                                                 <xs:annotation>
448                                                                         <xs:documentation>
449                                                                                 additional information
450                                                                         </xs:documentation>
451                                                                 </xs:annotation>
452                                                         </xs:element>
453                                                         <xs:element ref="vamsas:param" minOccurs="0"
454                                                                 maxOccurs="unbounded">
455                                                                 <xs:annotation>
456                                                                         <xs:documentation>
457                                                                                 parameter for the action
458                                                                         </xs:documentation>
459                                                                 </xs:annotation>
460                                                         </xs:element>
461                                                         <xs:element ref="vamsas:input" minOccurs="0"
462                                                                 maxOccurs="unbounded">
463                                                                 <xs:annotation>
464                                                                         <xs:documentation>
465                                                                                 bioinformatic objects input to
466                                                                                 action
467                                                                         </xs:documentation>
468                                                                 </xs:annotation>
469                                                         </xs:element>
470                                                 </xs:sequence>
471                                                 <xs:attribute name="id" type="xs:ID"
472                                                         use="optional">
473                                                         <xs:annotation>
474                                                                 <xs:documentation>
475                                                                         Primary Key for vamsas object
476                                                                         referencing
477                                                                 </xs:documentation>
478                                                         </xs:annotation>
479                                                 </xs:attribute>
480                                         </xs:complexType>
481                                 </xs:element>
482                         </xs:sequence>
483                 </xs:complexType>
484         </xs:element>
485         <xs:element name="DataSet">
486                 <xs:complexType>
487                         <xs:annotation>
488                                 <xs:documentation>
489                                         A collection of sequences, alignments, trees and
490                                         other things.
491                                 </xs:documentation>
492                         </xs:annotation>
493                         <xs:sequence>
494                                 <xs:element name="Sequence" maxOccurs="unbounded">
495                                         <xs:complexType>
496                                                 <xs:annotation>
497                                                         <xs:documentation>
498                                                                 a primary or secondary sequence record
499                                                                 from which all other sequences may be
500                                                                 derived
501                                                         </xs:documentation>
502                                                 </xs:annotation>
503                                                 <xs:complexContent>
504                                                         <xs:extension base="vamsas:SequenceType">
505                                                                 <xs:sequence>
506                                                                         <xs:element name="dbRef"
507                                                                                 minOccurs="0" maxOccurs="unbounded">
508                                                                                 <xs:annotation>
509                                                                                         <xs:documentation>
510                                                                                                 Store a list of database
511                                                                                                 references for this
512                                                                                                 sequence record - with
513                                                                                                 optional mapping from
514                                                                                                 database sequence to the
515                                                                                                 given sequence record
516                                                                                         </xs:documentation>
517                                                                                         <xs:documentation></xs:documentation>
518                                                                                         <xs:documentation></xs:documentation>
519                                                                                 </xs:annotation>
520                                                                                 <xs:complexType>
521                                                                                         <xs:sequence>
522                                                                                                 <xs:element name="map"
523                                                                                                         minOccurs="0" maxOccurs="unbounded">
524                                                                                                         <xs:complexType>
525                                                                                                                 <xs:attribute
526                                                                                                                         name="from" type="xs:integer" default="0"
527                                                                                                                         use="optional">
528                                                                                                                         <xs:annotation>
529                                                                                                                                 <xs:documentation>
530                                                                                                                                         Offset
531                                                                                                                                         to
532                                                                                                                                         first
533                                                                                                                                         position
534                                                                                                                                         in
535                                                                                                                                         dataset
536                                                                                                                                         sequence
537                                                                                                                                         record
538                                                                                                                                         that
539                                                                                                                                         this
540                                                                                                                                         database
541                                                                                                                                         entry
542                                                                                                                                         maps
543                                                                                                                                         to
544                                                                                                                                 </xs:documentation>
545                                                                                                                         </xs:annotation>
546                                                                                                                 </xs:attribute>
547                                                                                                                 <xs:attribute
548                                                                                                                         name="to" type="xs:integer" default="0" use="optional">
549                                                                                                                         <xs:annotation>
550                                                                                                                                 <xs:documentation>
551                                                                                                                                         Offset
552                                                                                                                                         to
553                                                                                                                                         last
554                                                                                                                                         position
555                                                                                                                                         in
556                                                                                                                                         dataset
557                                                                                                                                         sequence
558                                                                                                                                         record
559                                                                                                                                         that
560                                                                                                                                         this
561                                                                                                                                         database
562                                                                                                                                         entry
563                                                                                                                                         maps
564                                                                                                                                         to
565                                                                                                                                 </xs:documentation>
566                                                                                                                         </xs:annotation>
567                                                                                                                 </xs:attribute>
568                                                                                                                 <xs:attribute
569                                                                                                                         name="start" type="xs:integer" use="required">
570                                                                                                                 <xs:annotation>
571                                                                                                                         <xs:documentation>
572                                                                                                                                 Offset
573                                                                                                                                 to first
574                                                                                                                                 last
575                                                                                                                                 position
576                                                                                                                                 in
577                                                                                                                                 database
578                                                                                                                                 entry
579                                                                                                                                 that
580                                                                                                                                 first
581                                                                                                                                 (or
582                                                                                                                                 offset)
583                                                                                                                                 position
584                                                                                                                                 in
585                                                                                                                                 sequence
586                                                                                                                                 maps to
587                                                                                                                         </xs:documentation>
588                                                                                                                 </xs:annotation>
589                                                                                                                 </xs:attribute>
590                                                                                                                 <xs:attribute
591                                                                                                                         name="end" type="xs:integer" use="required">
592                                                                                                                 <xs:annotation>
593                                                                                                                         <xs:documentation>
594                                                                                                                                 Offset
595                                                                                                                                 to last
596                                                                                                                                 position
597                                                                                                                                 in
598                                                                                                                                 database
599                                                                                                                                 entry
600                                                                                                                                 that
601                                                                                                                                 last
602                                                                                                                                 (offset)
603                                                                                                                                 position
604                                                                                                                                 in
605                                                                                                                                 sequence
606                                                                                                                                 maps to
607                                                                                                                         </xs:documentation>
608                                                                                                                 </xs:annotation>
609                                                                                                                 </xs:attribute>
610                                                                                                         </xs:complexType>
611                                                                                                 </xs:element>
612                                                                                                 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
613                                                                                                 <xs:element
614                                                                                                         ref="vamsas:property" minOccurs="0" maxOccurs="unbounded" />
615                                                                                         </xs:sequence>
616                                                                                         <xs:attribute name="source"
617                                                                                                 type="xs:string" use="required">
618                                                                                                 <xs:annotation>
619                                                                                                         <xs:documentation>
620                                                                                                                 TODO Database
621                                                                                                                 Naming
622                                                                                                                 Convention:
623                                                                                                                 either start
624                                                                                                                 using LSID (so
625                                                                                                                 change type to
626                                                                                                                 URI) or leave
627                                                                                                                 this as an
628                                                                                                                 uncontrolled/unspecified
629                                                                                                                 string ID
630                                                                                                         </xs:documentation>
631                                                                                                 </xs:annotation>
632                                                                                         </xs:attribute>
633                                                                                         <xs:attribute name="version"
634                                                                                                 type="xs:string" use="required">
635                                                                                                 <xs:annotation>
636                                                                                                         <xs:documentation>
637                                                                                                                 Version must be
638                                                                                                                 specified -
639                                                                                                         </xs:documentation>
640                                                                                                 </xs:annotation>
641                                                                                         </xs:attribute>
642                                                                                         <xs:attribute
643                                                                                                 name="accessionId" type="xs:string" use="required">
644                                                                                                 <xs:annotation>
645                                                                                                         <xs:documentation>
646                                                                                                                 TODO: make some
647                                                                                                                 specification of
648                                                                                                                 the database
649                                                                                                                 field from which
650                                                                                                                 this accessionId
651                                                                                                                 is taken from -
652                                                                                                                 should that be a
653                                                                                                                 special property
654                                                                                                                 of the dbRef
655                                                                                                                 object ?
656                                                                                                         </xs:documentation>
657                                                                                                 </xs:annotation>
658                                                                                         </xs:attribute>
659                                                                                         <xs:attribute name="id"
660                                                                                                 type="xs:ID" use="optional">
661                                                                                                 <xs:annotation>
662                                                                                                         <xs:documentation>
663                                                                                                                 Primary Key for
664                                                                                                                 vamsas object
665                                                                                                                 referencing
666                                                                                                         </xs:documentation>
667                                                                                                 </xs:annotation>
668                                                                                         </xs:attribute>
669                                                                                 </xs:complexType>
670                                                                         </xs:element>
671                                                                 </xs:sequence>
672                                                                 <xs:attribute name="id" type="xs:ID"
673                                                                         use="optional">
674                                                                         <xs:annotation>
675                                                                                 <xs:documentation>
676                                                                                         Primary Key for vamsas
677                                                                                         object referencing
678                                                                                 </xs:documentation>
679                                                                         </xs:annotation>
680                                                                 </xs:attribute>
681                                                                 <xs:attribute name="dictionary"
682                                                                         type="xs:string" use="required">
683                                                                         <xs:annotation>
684                                                                                 <xs:documentation>
685                                                                                         symbol class for sequence
686                                                                                 </xs:documentation>
687                                                                         </xs:annotation>
688                                                                 </xs:attribute>
689                                                         </xs:extension>
690                                                 </xs:complexContent>
691                                         </xs:complexType>
692                                 </xs:element>
693                                 <xs:element name="DataSetAnnotations" minOccurs="0"
694                                         maxOccurs="unbounded">
695                                         <xs:complexType>
696                                                 <xs:annotation>
697                                                         <xs:documentation>
698                                                                 Annotate over positions and regions of a
699                                                                 dataset sequence
700                                                         </xs:documentation>
701                                                 </xs:annotation>
702                                                 <xs:complexContent>
703                                                         <xs:extension
704                                                                 base="vamsas:rangeAnnotation">
705                                                                 <xs:sequence>
706                                                                         <xs:element ref="vamsas:Provenance"
707                                                                                 maxOccurs="1" minOccurs="1" />
708                                                                 </xs:sequence>
709                                                                 <xs:attribute name="seqRef"
710                                                                         type="xs:IDREF" use="required">
711                                                                         <xs:annotation>
712                                                                                 <xs:documentation>
713                                                                                         annotation is associated
714                                                                                         with a particular dataset
715                                                                                         sequence
716                                                                                 </xs:documentation>
717                                                                         </xs:annotation>
718                                                                 </xs:attribute>
719                                                         </xs:extension>
720                                                 </xs:complexContent>
721                                         </xs:complexType>
722                                 </xs:element>
723                                 <xs:element name="Alignment" minOccurs="0"
724                                         maxOccurs="unbounded">
725                                         <xs:complexType>
726                                                 <xs:sequence>
727                                                         <xs:element name="AlignmentAnnotation"
728                                                                 minOccurs="0" maxOccurs="unbounded">
729                                                                 <xs:annotation>
730                                                                         <xs:documentation>
731                                                                                 This is annotation over the
732                                                                                 coordinate frame defined by all
733                                                                                 the columns in the alignment.
734                                                                         </xs:documentation>
735                                                                 </xs:annotation>
736                                                                 <xs:complexType>
737                                                                         <xs:complexContent>
738                                                                                 <xs:extension
739                                                                                         base="vamsas:rangeAnnotation">
740                                                                                         <xs:sequence>
741                                                                                                 <xs:element
742                                                                                                         ref="vamsas:Provenance" minOccurs="1" maxOccurs="1" />
743                                                                                         </xs:sequence>
744                                                                                         <xs:attribute name="graph"
745                                                                                                 type="xs:boolean" use="required">
746                                                                                                 <xs:annotation>
747                                                                                                         <xs:documentation>
748                                                                                                                 TODO: decide if
749                                                                                                                 this flag is
750                                                                                                                 redundant - when
751                                                                                                                 true it would
752                                                                                                                 suggest that the
753                                                                                                                 annotationElement
754                                                                                                                 values together
755                                                                                                                 form a graph
756                                                                                                         </xs:documentation>
757                                                                                                 </xs:annotation>
758                                                                                         </xs:attribute>
759                                                                                 </xs:extension>
760                                                                         </xs:complexContent>
761                                                                 </xs:complexType>
762                                                         </xs:element>
763                                                         <xs:element ref="vamsas:Tree" minOccurs="0"
764                                                                 maxOccurs="unbounded" />
765                                                         <xs:element name="alignmentSequence"
766                                                                 maxOccurs="unbounded">
767                                                                 <xs:complexType>
768                                                                         <xs:complexContent>
769                                                                                 <xs:extension
770                                                                                         base="vamsas:SequenceType">
771                                                                                         <xs:sequence>
772                                                                                                 <xs:element
773                                                                                                         name="AlignmentSequenceAnnotation" minOccurs="0"
774                                                                                                         maxOccurs="unbounded">
775                                                                                                         <xs:complexType>
776                                                                                                                 <xs:annotation>
777                                                                                                                         <xs:documentation>
778                                                                                                                                 Annotate
779                                                                                                                                 over
780                                                                                                                                 positions
781                                                                                                                                 and
782                                                                                                                                 regions
783                                                                                                                                 of the
784                                                                                                                                 ungapped
785                                                                                                                                 sequence
786                                                                                                                                 in the
787                                                                                                                                 context
788                                                                                                                                 of the
789                                                                                                                                 alignment
790                                                                                                                         </xs:documentation>
791                                                                                                                         <xs:documentation></xs:documentation>
792                                                                                                                 </xs:annotation>
793                                                                                                                 <xs:complexContent>
794                                                                                                                         <xs:extension
795                                                                                                                                 base="vamsas:rangeAnnotation">
796                                                                                                                                 <xs:sequence>
797                                                                                                                                         <xs:element
798                                                                                                                                                 ref="vamsas:Provenance" minOccurs="1" maxOccurs="1" />
799                                                                                                                                 </xs:sequence>
800                                                                                                                                 <xs:attribute name="id"
801                                                                                                                                         type="xs:ID" use="optional">
802                                                                                                                                         <xs:annotation>
803                                                                                                                                                 <xs:documentation>
804                                                                                                                                                         Primary Key for
805                                                                                                                                                         vamsas object
806                                                                                                                                                         referencing
807                                                                                                                                                 </xs:documentation>
808                                                                                                                                         </xs:annotation>
809                                                                                                                                 </xs:attribute>
810                                                                                                                                 <xs:attribute
811                                                                                                                                         name="graph" type="xs:boolean" use="required">
812                                                                                                                                         <xs:annotation>
813                                                                                                                                                 <xs:documentation>
814                                                                                                                                                         TODO:
815                                                                                                                                                         decide
816                                                                                                                                                         if
817                                                                                                                                                         this
818                                                                                                                                                         flag
819                                                                                                                                                         is
820                                                                                                                                                         redundant
821                                                                                                                                                         -
822                                                                                                                                                         when
823                                                                                                                                                         true
824                                                                                                                                                         it
825                                                                                                                                                         would
826                                                                                                                                                         suggest
827                                                                                                                                                         that
828                                                                                                                                                         the
829                                                                                                                                                         annotationElement
830                                                                                                                                                         values
831                                                                                                                                                         together
832                                                                                                                                                         form
833                                                                                                                                                         a
834                                                                                                                                                         graph
835                                                                                                                                                 </xs:documentation>
836                                                                                                                                         </xs:annotation>
837                                                                                                                                 </xs:attribute>
838                                                                                                                         </xs:extension>
839                                                                                                                 </xs:complexContent>
840
841                                                                                                                 <!--                                                            
842                                                                                                                         This replaces the flat list of sequenceFeatures.
843                                                                                                                         <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
844                                                                                                                         <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
845                                                                                                                         </xs:annotation><xs:complexContent>
846                                                                                                                         <xs:extension base="vamsas:rangeFeature">                                                               
847                                                                                                                         <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
848                                                                                                                         <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>
849                                                                                                                         </xs:attribute>
850                                                                                                                         </xs:extension>
851                                                                                                                         </xs:complexContent></xs:complexType></xs:element> -->
852                                                                                                         </xs:complexType>
853                                                                                                 </xs:element>
854                                                                                         </xs:sequence>
855                                                                                         <xs:attribute name="id"
856                                                                                                 type="xs:ID" use="optional">
857                                                                                                 <xs:annotation>
858                                                                                                         <xs:documentation>
859                                                                                                                 Primary Key for
860                                                                                                                 vamsas object
861                                                                                                                 referencing
862                                                                                                         </xs:documentation>
863                                                                                                 </xs:annotation>
864                                                                                         </xs:attribute>
865                                                                                         <xs:attribute name="refid"
866                                                                                                 type="xs:IDREF" use="required">
867                                                                                                 <xs:annotation>
868                                                                                                         <xs:documentation>
869                                                                                                                 Dataset Sequence
870                                                                                                                 from which this
871                                                                                                                 alignment
872                                                                                                                 sequence is
873                                                                                                                 taken from
874                                                                                                         </xs:documentation>
875                                                                                                 </xs:annotation>
876                                                                                         </xs:attribute>
877                                                                                 </xs:extension>
878                                                                         </xs:complexContent>
879                                                                 </xs:complexType>
880                                                         </xs:element>
881                                                         <xs:element ref="vamsas:property"
882                                                                 minOccurs="0" maxOccurs="unbounded">
883                                                                 <xs:annotation>
884                                                                         <xs:documentation>
885                                                                                 typical properties may be
886                                                                                 additional alignment score
887                                                                                 objects
888                                                                         </xs:documentation>
889                                                                 </xs:annotation>
890                                                         </xs:element>
891                                                         <xs:element ref="vamsas:Provenance" />
892                                                 </xs:sequence>
893                                                 <xs:attribute name="gapChar" type="xs:string"
894                                                         use="required" />
895                                                 <xs:attribute name="aligned" type="xs:boolean"
896                                                         use="optional" />
897                                                 <xs:attribute name="id" type="xs:ID"
898                                                         use="optional">
899                                                         <xs:annotation>
900                                                                 <xs:documentation>
901                                                                         Primary Key for vamsas object
902                                                                         referencing
903                                                                 </xs:documentation>
904                                                         </xs:annotation>
905                                                 </xs:attribute>
906                                                 <xs:attribute name="modifiable"
907                                                         type="xs:boolean" default="true" use="optional">
908                                                         <xs:annotation>
909                                                                 <xs:documentation>
910                                                                         objects with modifiable=false will
911                                                                         not be modified by a vamsas client
912                                                                         update
913                                                                 </xs:documentation>
914                                                         </xs:annotation>
915                                                 </xs:attribute>
916                                         </xs:complexType>
917                                 </xs:element>
918                                 <xs:element ref="vamsas:Tree" minOccurs="0"
919                                         maxOccurs="unbounded" />
920                                 <xs:element ref="vamsas:Provenance" />
921                         </xs:sequence>
922                         <xs:attribute name="id" type="xs:ID" use="optional">
923                                 <xs:annotation>
924                                         <xs:documentation>
925                                                 Primary Key for vamsas object referencing
926                                         </xs:documentation>
927                                 </xs:annotation>
928                         </xs:attribute>
929                 </xs:complexType>
930         </xs:element>
931         <xs:element name="annotationElement">
932                 <xs:complexType>
933                         <xs:annotation>
934                                 <xs:documentation>
935                                         per-site symbolic and/or quantitative annotation
936                                 </xs:documentation>
937                                 <xs:documentation>
938                                         SecondaryStructure and display character (from
939                                         Jalview) have been subsumed into the glyph element
940                                 </xs:documentation>
941                         </xs:annotation>
942                         <xs:sequence>
943
944                                 <xs:element name="description" type="xs:string"
945                                         minOccurs="0">
946                                         <xs:annotation>
947                                                 <xs:documentation>
948                                                         Free text at this position
949                                                 </xs:documentation>
950                                         </xs:annotation>
951                                 </xs:element>
952                                 <xs:element name="glyph" minOccurs="0"
953                                         maxOccurs="unbounded">
954                                         <xs:annotation>
955                                                 <xs:documentation>
956                                                         Discrete symbol - possibly graphically
957                                                         represented
958                                                 </xs:documentation>
959                                         </xs:annotation>
960                                         <xs:complexType>
961                                                 <xs:simpleContent>
962                                                         <xs:extension base="xs:string">
963                                                                 <xs:attribute name="dict"
964                                                                         type="xs:string" default="utf8" use="optional">
965                                                                         <xs:annotation>
966                                                                                 <xs:documentation>
967                                                                                         specifies the symbol
968                                                                                         dictionary for this glyph -
969                                                                                         eg utf8 (the default),
970                                                                                         aasecstr_3 or
971                                                                                         kd_hydrophobicity - the
972                                                                                         content is not validated so
973                                                                                         applications must ensure
974                                                                                         they gracefully deal with
975                                                                                         invalid entries here
976                                                                                 </xs:documentation>
977                                                                                 <xs:documentation>
978                                                                                         TODO: specify a minimum list
979                                                                                         of glyph dictionaries to get
980                                                                                         us started and provide a way
981                                                                                         for the vamsasClient to
982                                                                                         validate their content if
983                                                                                         regexes are specified
984                                                                                 </xs:documentation>
985                                                                         </xs:annotation>
986                                                                 </xs:attribute>
987                                                         </xs:extension>
988                                                 </xs:simpleContent>
989                                         </xs:complexType>
990                                 </xs:element>
991                                 <xs:element name="value" type="xs:float" minOccurs="0"
992                                         maxOccurs="unbounded">
993                                         <xs:annotation>
994                                                 <xs:documentation>
995                                                         Ordered set of float values - an application
996                                                         may treat the values together as a vector
997                                                         with common support for a set of annotation
998                                                         elements - but this is, again, not validated
999                                                         so applications should deal gracefully with
1000                                                         varying numbers of dimensions
1001                                                 </xs:documentation>
1002                                         </xs:annotation>
1003                                 </xs:element>
1004                         </xs:sequence>
1005                         <xs:attribute name="position" type="xs:integer"
1006                                 use="required">
1007                                 <xs:annotation>
1008                                         <xs:documentation>
1009                                                 position with respect to the coordinate frame
1010                                                 defined by a rangeType specification
1011                                         </xs:documentation>
1012                                 </xs:annotation>
1013                         </xs:attribute>
1014                         <xs:attribute name="after" type="xs:boolean" use="optional"
1015                                 default="false">
1016                                 <xs:annotation>
1017                                         <xs:documentation>
1018                                                 true means the annotation element appears
1019                                                 between the specified position and the next
1020                                         </xs:documentation>
1021                                 </xs:annotation>
1022                         </xs:attribute>
1023                         <xs:attribute name="id" type="xs:ID" use="optional">
1024                                 <xs:annotation>
1025                                         <xs:documentation>
1026                                                 Primary Key for vamsas object referencing
1027                                         </xs:documentation>
1028                                 </xs:annotation>
1029                         </xs:attribute>
1030                 </xs:complexType>
1031         </xs:element>
1032         <xs:complexType name="SequenceType">
1033                 <xs:sequence>
1034                         <xs:element name="sequence" type="xs:string" minOccurs="1"
1035                                 maxOccurs="1" />
1036                         <xs:element name="name" type="xs:string" minOccurs="1"
1037                                 maxOccurs="1" />
1038                         <xs:element name="description" type="xs:string"
1039                                 minOccurs="0" maxOccurs="1" />
1040                         <xs:element ref="vamsas:property" minOccurs="0"
1041                                 maxOccurs="unbounded">
1042                                 <xs:annotation>
1043                                         <xs:documentation>
1044                                                 additional typed properties
1045                                         </xs:documentation>
1046                                 </xs:annotation>
1047                         </xs:element>
1048                 </xs:sequence>
1049                 <xs:attribute name="start" type="xs:integer" use="required" />
1050                 <xs:attribute name="end" type="xs:integer" use="required" />
1051         </xs:complexType>
1052         <xs:element name="ApplicationData">
1053                 <xs:complexType>
1054                         <xs:annotation>
1055                                 <xs:documentation>
1056                                         Data specific to a particular type and version of
1057                                         vamsas application
1058                                 </xs:documentation>
1059                         </xs:annotation>
1060                         <xs:complexContent>
1061                                 <xs:extension base="vamsas:appData">
1062                                         <xs:sequence>
1063                                                 <xs:element name="User" maxOccurs="unbounded"
1064                                                         minOccurs="0">
1065                                                         <xs:complexType>
1066                                                                 <xs:complexContent>
1067                                                                         <xs:extension
1068                                                                                 base="vamsas:appData">
1069                                                                                 <xs:annotation>
1070                                                                                         <xs:documentation>
1071                                                                                                 Data available to just a
1072                                                                                                 particular user
1073                                                                                         </xs:documentation>
1074                                                                                 </xs:annotation>
1075                                                                                 <xs:attribute name="fullname"
1076                                                                                         type="xs:string" use="required" />
1077                                                                                 <xs:attribute
1078                                                                                         name="organization" type="xs:string" use="required" />
1079                                                                         </xs:extension>
1080                                                                 </xs:complexContent>
1081                                                         </xs:complexType>
1082                                                 </xs:element>
1083                                                 <xs:element name="Common" maxOccurs="1"
1084                                                         minOccurs="0">
1085                                                         <xs:complexType>
1086                                                                 <xs:complexContent>
1087                                                                         <xs:extension
1088                                                                                 base="vamsas:appData">
1089                                                                         </xs:extension>
1090                                                                 </xs:complexContent>
1091                                                         </xs:complexType>
1092                                                 </xs:element>
1093                                                 <xs:element name="Instance"
1094                                                         maxOccurs="unbounded" minOccurs="0">
1095                                                         <xs:complexType>
1096                                                                 <xs:complexContent>
1097                                                                         <xs:extension
1098                                                                                 base="vamsas:appData">
1099                                                                                 <xs:annotation>
1100                                                                                         <xs:documentation>
1101                                                                                                 Data available to just a
1102                                                                                                 specific instance of the
1103                                                                                                 application
1104                                                                                         </xs:documentation>
1105                                                                                         <xs:documentation>
1106                                                                                                 VAMSAS/Pierre: Is this
1107                                                                                                 data volatile ?
1108                                                                                                 Application instances
1109                                                                                                 may not be accessible
1110                                                                                                 after the session has
1111                                                                                                 closed - the user may
1112                                                                                                 have to be presented
1113                                                                                                 with the option of
1114                                                                                                 picking up the data in
1115                                                                                                 that instance
1116                                                                                         </xs:documentation>
1117                                                                                 </xs:annotation>
1118                                                                                 <xs:attribute name="urn"
1119                                                                                         type="xs:string" use="required" />
1120                                                                         </xs:extension>
1121                                                                 </xs:complexContent>
1122                                                         </xs:complexType>
1123                                                 </xs:element>
1124                                         </xs:sequence>
1125                                         <xs:attribute name="version" type="xs:string"
1126                                                 use="required" ><xs:annotation><xs:documentation>
1127                                                         Version string describing the application specific data storage version used</xs:documentation></xs:annotation></xs:attribute>
1128                                         <xs:attribute name="name" type="xs:string"
1129                                                 use="required" >
1130                                                 <xs:annotation><xs:documentation>
1131                                                         Canonical name of application
1132                                                 </xs:documentation>
1133                                                 </xs:annotation>
1134                                                 </xs:attribute>
1135                                 </xs:extension>
1136                         </xs:complexContent>
1137                 </xs:complexType>
1138         </xs:element>
1139         <xs:element name="Attachment">
1140                 <xs:complexType>
1141                         <xs:complexContent>
1142                                 <xs:extension base="vamsas:appData">
1143                                         <xs:annotation>
1144                                                 <xs:documentation>
1145                                                         General data container to attach a typed
1146                                                         data object to any vamsas object
1147                                                 </xs:documentation>
1148                                         </xs:annotation>
1149                                         <xs:attribute name="compressed" type="xs:boolean"
1150                                                 use="optional" default="false">
1151                                                 <xs:annotation>
1152                                                         <xs:documentation>
1153                                                                 true implies data will be decompresses
1154                                                                 with Zip before presenting to
1155                                                                 application
1156                                                         </xs:documentation>
1157                                                 </xs:annotation>
1158                                         </xs:attribute>
1159                                         <xs:attribute name="type" type="xs:string"
1160                                                 use="required">
1161                                                 <xs:annotation>
1162                                                         <xs:documentation>
1163                                                                 Type of arbitrary data - TODO: decide
1164                                                                 format - use (extended) MIME types ?
1165                                                         </xs:documentation>
1166                                                 </xs:annotation>
1167                                         </xs:attribute>
1168                                         <xs:attribute name="objectref" type="xs:IDREF"
1169                                                 use="required">
1170                                                 <xs:annotation>
1171                                                         <xs:documentation>
1172                                                                 Object the arbitrary data is associated
1173                                                                 with
1174                                                         </xs:documentation>
1175                                                 </xs:annotation>
1176                                         </xs:attribute>
1177                                         <xs:attribute name="id" type="xs:ID"
1178                                                 use="optional">
1179                                                 <xs:annotation>
1180                                                         <xs:documentation>
1181                                                                 Primary Key for vamsas object
1182                                                                 referencing
1183                                                         </xs:documentation>
1184                                                 </xs:annotation>
1185                                         </xs:attribute>
1186                                 </xs:extension>
1187                         </xs:complexContent>
1188                 </xs:complexType>
1189         </xs:element>
1190         <xs:complexType name="appData">
1191                 <xs:choice>
1192                         <xs:element name="data" type="xs:base64Binary" />
1193                         <xs:element name="dataReference" type="xs:string" />
1194                 </xs:choice>
1195         </xs:complexType>
1196 </xs:schema>