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