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