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