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