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