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