still refactoring the rangeType and features/annotation elements.
[vamsas.git] / schemas / vamsas.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by MSD (EMBL OUTSTATION THE EBI WELLCOME TRUST GENOME CAMPUS) -->
3 <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by lj (jl) -->
4 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="http://www.vamsas.org" targetNamespace="http://www.vamsas.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
5         <xs:complexType name="rangeType">
6                 <xs:annotation>
7                         <xs:documentation>Specify positions and/or regions on the principle dimension of some associated vamsas object
8                         TODO: this is abstract. should provide context to scope the range of ids for each use</xs:documentation>
9                 <xs:documentation>Keeping to jaxb-1.0 specification for the moment - this choice should become a substitution group when we use jaxb-2.0 capable bindings
10                 </xs:documentation></xs:annotation>
11                 <!--  Do we really need this - a position could be just a seg with start=end and inclusive=true -->
12                 <xs:choice>
13                         <xs:element name="pos" maxOccurs="unbounded" minOccurs="1">
14                                 <xs:annotation><xs:documentation>a position within the associated object's coordinate system</xs:documentation></xs:annotation>
15                                 <xs:complexType>
16                                         <xs:attribute name="i" type="xs:int" use="required"/>
17                                 </xs:complexType>
18                         </xs:element>
19                         <xs:element name="seg" maxOccurs="unbounded" minOccurs="1">
20                                 <xs:annotation><xs:documentation>a region from start to end, with flag for inclusivity of terminii</xs:documentation></xs:annotation>
21                                 <xs:complexType>
22                                         <xs:attribute name="start" type="xs:int" use="required"/>
23                                         <xs:attribute name="end" type="xs:int" use="required"/>
24                                         <xs:attribute name="inclusive" type="xs:boolean" use="required"><xs:annotation><xs:documentation>when false, a consecutive range like 'start=1, end=2' means the region lying after position 1 and before position 2</xs:documentation></xs:annotation></xs:attribute>
25                                 </xs:complexType>
26                         </xs:element>
27                 </xs:choice>
28         </xs:complexType>
29         <xs:element name="VAMSAS">
30                 <xs:annotation><xs:documentation>contains unassociated trees and a number of analysis sets</xs:documentation></xs:annotation>
31                 <xs:complexType>
32                         <xs:sequence>
33                                 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
34                                 <xs:element ref="vamsas:DataSet" minOccurs="0" maxOccurs="unbounded"/>
35                         </xs:sequence>
36                         <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
37                         </xs:attribute>
38                         <xs:attribute name="modifiable" type="xs:boolean" default="true" use="optional"><xs:annotation><xs:documentation>objects with modifiable=false will not be modified by a vamsas client update</xs:documentation></xs:annotation>
39                         </xs:attribute>
40                 </xs:complexType>
41         </xs:element>
42         <xs:annotation>
43                 <xs:documentation> Properties. Generally, these are mutable so an application should check them each time. This may change depending on the context of the property</xs:documentation>
44         </xs:annotation>        
45         <xs:element name="Tree">
46                 <xs:complexType>
47                         <xs:annotation><xs:documentation>Contains a named collection of trees TODO: define way of referencing leaves of global tree for any sequence/alignment object</xs:documentation></xs:annotation>
48                         <xs:sequence>
49                                 <xs:element name="title" type="xs:string" minOccurs="0"/>
50                                 <xs:element name="newick" maxOccurs="unbounded">
51                                         <xs:complexType>
52                                                 <xs:simpleContent>
53                                                         <xs:extension base="xs:string">
54                                                                 <xs:attribute name="title" type="xs:string" use="optional"/>
55                                                                 <xs:attribute name="id" type="xs:ID"  use="optional">
56                                                                         <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
57                                                                 </xs:attribute>
58                                                                 <xs:attribute name="modifiable" type="xs:boolean" default="true"  use="optional"><xs:annotation><xs:documentation>objects with modifiable=false will not be modified by a vamsas client update</xs:documentation></xs:annotation>
59                                                                 </xs:attribute>
60                                                         </xs:extension>
61                                                 </xs:simpleContent>
62                                         </xs:complexType>
63                                 </xs:element>
64                                 <xs:element ref="vamsas:property" maxOccurs="unbounded" minOccurs="0"/>
65                                 <xs:element ref="vamsas:Provenance"/>
66                         </xs:sequence>
67                         <xs:attribute name="id" type="xs:ID"  use="optional">                   <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
68                         </xs:attribute>
69                         <xs:attribute name="modifiable" type="xs:boolean" default="true" use="optional"><xs:annotation><xs:documentation>objects with modifiable=false will not be modified by a vamsas client update</xs:documentation></xs:annotation>
70                         </xs:attribute>
71                         </xs:complexType>
72         </xs:element>
73         <xs:element name="property">
74                 <xs:complexType><xs:simpleContent>
75                         <xs:annotation><xs:documentation>Named and typed property string</xs:documentation></xs:annotation>
76                         <xs:extension base="xs:string">
77                                 <xs:attribute name="name" type="xs:string" use="required"/>
78                                         <xs:attribute name="type" type="xs:string" use="required"><xs:annotation><xs:documentation>The type specifies how the property will be parsed. Empty property strings are allowed, and can be used to prototype the input to a document. TODO: specify allowed types</xs:documentation></xs:annotation></xs:attribute>
79                         </xs:extension>
80                 </xs:simpleContent></xs:complexType>
81         </xs:element>
82         <xs:complexType name="rangeAnnotation">
83                 <xs:annotation>
84                         <xs:documentation>provenance contains source of annotation</xs:documentation>
85                         <xs:documentation>polymorphism for having collection of single points,
86                                 or ordered set of regions with polarity (start.lt.end or end.lt.start)</xs:documentation>
87                 </xs:annotation>
88                 <xs:complexContent>
89                         <xs:extension base="vamsas:rangeType">
90                                 <xs:sequence>
91                                         <xs:element name="description" type="xs:string" minOccurs="0"/>
92                                         <xs:element name="status" type="xs:string" minOccurs="0"/>
93                                         <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded"/>
94                                         <xs:element ref="vamsas:Provenance" maxOccurs="1" minOccurs="1"/>
95                                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"><xs:annotation>
96                                                 <xs:documentation>Note:These are mutable so an application should check them each time.</xs:documentation>
97                                         </xs:annotation></xs:element>
98                                 </xs:sequence>
99                                 <xs:attribute name="id" type="xs:ID" use="optional">
100                                                         <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
101                                 </xs:attribute>
102                                 <xs:attribute name="modifiable" type="xs:boolean" default="true" use="optional">
103                                 <xs:annotation><xs:documentation>objects with modifiable=false will not be modified by a vamsas client update</xs:documentation></xs:annotation>
104                                 </xs:attribute>
105                                 <xs:attribute name="group" type="xs:string" use="optional">
106                                 <xs:annotation><xs:documentation>Annotation with the same non-empty group name are grouped together</xs:documentation></xs:annotation></xs:attribute>
107                                 <xs:attribute name="type" type="xs:string" use="required"/>
108                                 
109                         </xs:extension>
110                 </xs:complexContent>
111         </xs:complexType>
112         <xs:element name="param"><xs:complexType>
113                         <xs:annotation>
114                                 <xs:documentation>
115                                         Specifies a named and typed value used to perform some data transformation.
116                                 </xs:documentation>
117                                 <xs:documentation>
118                                         LATER: experiment with xml validation of property set prototypes for services</xs:documentation></xs:annotation>
119                         <xs:simpleContent>
120                                 <xs:annotation><xs:documentation>Named and typed property string</xs:documentation></xs:annotation>
121                                 <xs:extension base="xs:string">
122                                         <xs:attribute name="name" type="xs:string" use="required"/>
123                                         <xs:attribute name="type" type="xs:string" use="required"><xs:annotation><xs:documentation>The type specifies how the property will be parsed. Empty property strings are allowed, and can be used to prototype the input to a document. TODO: specify allowed types</xs:documentation></xs:annotation></xs:attribute>
124                                 </xs:extension>
125                         </xs:simpleContent>
126         </xs:complexType></xs:element>
127         <xs:element name="input"><xs:complexType>
128                         <xs:annotation>
129                                 <xs:documentation>
130                                         Selects all or part of a collection of vamsas objects as a named input to some transformation process. 
131                                 </xs:documentation>
132                         </xs:annotation>
133                         <xs:complexContent>
134                                 <xs:extension base="vamsas:rangeType">
135                                         <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
136                                         <xs:attribute name="objRef" type="xs:IDREF" use="optional"><xs:annotation><xs:documentation>Reference Frame for rangeType specfication</xs:documentation></xs:annotation></xs:attribute>
137                                 </xs:extension>
138                         </xs:complexContent>
139                 </xs:complexType>
140         </xs:element>
141         
142         <xs:element name="Provenance">
143                 <xs:complexType>
144                         <xs:annotation>
145                                 <xs:documentation>
146                                         Defines the origin and series of operations applied directly to the object that references it.
147                                 </xs:documentation>
148                         </xs:annotation>
149                         <xs:sequence>
150                                 <xs:element name="entry" maxOccurs="unbounded">
151                                         <xs:complexType>
152                                                 <xs:sequence>
153                                                         <xs:element name="User" type="xs:string"><xs:annotation><xs:documentation>Who</xs:documentation></xs:annotation></xs:element>
154                                                         <xs:element name="App" type="xs:string"><xs:annotation><xs:documentation>With which application</xs:documentation></xs:annotation></xs:element>                                                 
155                                                         <xs:element name="Action" type="xs:string"><xs:annotation><xs:documentation>Did what</xs:documentation></xs:annotation></xs:element>
156                                                         <xs:element name="Date" type="xs:date"><xs:annotation><xs:documentation>When</xs:documentation></xs:annotation></xs:element>
157                                                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"><xs:annotation><xs:documentation>additional information</xs:documentation></xs:annotation></xs:element>
158                                                         <xs:element ref="vamsas:param" minOccurs="0" maxOccurs="unbounded"><xs:annotation><xs:documentation>parameter for the action</xs:documentation></xs:annotation></xs:element>
159                                                         <xs:element ref="vamsas:input" minOccurs="0" maxOccurs="unbounded"><xs:annotation><xs:documentation>bioinformatic objects input to action</xs:documentation></xs:annotation></xs:element>
160                                                 </xs:sequence>
161                                                 <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
162                                                 </xs:attribute>
163                                         </xs:complexType>
164                                 </xs:element>
165                         </xs:sequence>
166                 </xs:complexType>
167         </xs:element>
168         <xs:element name="DataSet">
169                 <xs:complexType>
170                         <xs:annotation><xs:documentation>A collection of sequences, alignments, trees and other things.</xs:documentation></xs:annotation>
171                         <xs:sequence>
172                                 <xs:element name="Sequence" maxOccurs="unbounded">
173                                         <xs:complexType>
174                                                 <xs:annotation><xs:documentation>a primary or secondary sequence record from which all other sequences may be derived</xs:documentation></xs:annotation>
175                                                 <xs:complexContent>
176                                                         <xs:extension base="vamsas:SequenceType">
177                                                                 <xs:sequence>
178                                                                         <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
179                                                                                 <xs:complexType>
180                                                                                         <xs:sequence>
181                                                                                                 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
182                                                                                         </xs:sequence>
183                                                                                         <xs:attribute name="source" type="xs:string"/>
184                                                                                         <xs:attribute name="version" type="xs:string"/>
185                                                                                         <xs:attribute name="accessionId" type="xs:string"/>
186                                                                                         <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
187                                                                                         </xs:attribute>
188                                                                                 </xs:complexType>
189                                                                         </xs:element>
190                                                                 </xs:sequence>
191                                                                 <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
192                                                                 </xs:attribute>
193                                                                 <xs:attribute name="dictionary" type="xs:string" use="required"><xs:annotation><xs:documentation>symbol class for sequence</xs:documentation></xs:annotation></xs:attribute>
194                                                         </xs:extension>
195                                                 </xs:complexContent>
196                                         </xs:complexType>
197                                 </xs:element>
198                                 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
199                                         <xs:complexType>
200                                                 <xs:annotation><xs:documentation>Annotate over positions and regions of dataset sequences</xs:documentation>
201                                                 </xs:annotation>
202                                                 <xs:complexContent>
203                                                         <xs:extension base="vamsas:rangeAnnotation">
204                                                                 <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
205                                                                         <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>
206                                                                 </xs:attribute>
207                                                         </xs:extension>
208                                                 </xs:complexContent>
209                                         </xs:complexType>
210                                 </xs:element>
211                                 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
212                                         <xs:complexType>
213                                                 <xs:sequence>
214                                                         <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
215                                                                 <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
216                                                         </xs:annotation><xs:complexContent>
217                                                                 <xs:extension base="vamsas:rangeAnnotation">                                                            
218                                                                         <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
219                                                                         <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>
220                                                                 </xs:attribute>
221                                                                 </xs:extension>
222                                                         </xs:complexContent></xs:complexType></xs:element> 
223                                                         <xs:element name="AlignmentAnnotations" minOccurs="0" maxOccurs="unbounded">
224                                                                 <xs:annotation>
225                                                                         <xs:documentation>
226                                                                                 TODO: hard to distinguish this from the alignment features element. Do we merge them and leave the applications
227                                                                         </xs:documentation>
228                                                                 </xs:annotation>
229                                                                 <xs:complexType>
230                                                                         <xs:sequence>
231                                                                                 <xs:element ref="vamsas:annotationElement" maxOccurs="unbounded"/>
232                                                                                 <xs:element name="label" type="xs:string"/>
233                                                                                 <xs:element name="description" type="xs:string"/>
234                                                                                 <xs:element ref="vamsas:Provenance"/>
235                                                                         </xs:sequence>
236                                                                         <xs:attribute name="graph" type="xs:boolean" use="required"/>
237                                                                         <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
238                                                                         </xs:attribute>
239                                                                 </xs:complexType>
240                                                         </xs:element>
241                                                         <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
242                                                         <xs:element name="alignmentSequence" maxOccurs="unbounded">
243                                                                 <xs:complexType>
244                                                                         <xs:complexContent>
245                                                                                 <xs:extension base="vamsas:SequenceType">
246                                                                                         <xs:sequence>
247                                                                                                 <xs:element name="AlignmentSequenceFeature" type="vamsas:rangeAnnotation" minOccurs="0" maxOccurs="unbounded">
248                                                                                                         <xs:annotation>
249                                                                                                         <xs:documentation>Annotate over positions and regions of the ungapped sequences in the alignment</xs:documentation>
250                                                                                                                 <xs:documentation>TODO: have to remove id rangeSpec or require it to be the same as dataset sequence reference</xs:documentation>
251                                                                                                 </xs:annotation>
252                                                                                                 </xs:element> 
253                                                                                         </xs:sequence>
254                                                                                         <xs:attribute name="id" type="xs:ID" use="optional">
255                                                                                                 <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
256                                                                                         </xs:attribute>
257                                                                                         <xs:attribute name="refid" type="xs:IDREF" use="required"><xs:annotation><xs:documentation>Dataset Sequence from which this alignment sequence is taken from</xs:documentation></xs:annotation></xs:attribute>
258                                                                                 </xs:extension>
259                                                                         </xs:complexContent>
260                                                                 </xs:complexType>
261                                                         </xs:element>
262                                                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"><xs:annotation>
263                                                                 <xs:documentation>typical properties may be alignment score objects </xs:documentation>
264                                                         </xs:annotation></xs:element>
265                                                         <xs:element ref="vamsas:Provenance"/>
266                                                 </xs:sequence>
267                                                 <xs:attribute name="gapChar" type="xs:string" use="required"/>
268                                                 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
269                                                 <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
270                                                 </xs:attribute>
271                                                 <xs:attribute name="modifiable" type="xs:boolean" default="true" use="optional"><xs:annotation><xs:documentation>objects with modifiable=false will not be modified by a vamsas client update</xs:documentation></xs:annotation>
272                                                 </xs:attribute>
273                                         </xs:complexType>
274                                 </xs:element>
275                                 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
276                                 <xs:element ref="vamsas:Provenance"/>
277                         </xs:sequence>
278                         <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
279                         </xs:attribute>
280                 </xs:complexType>
281         </xs:element>
282         <xs:element name="annotationElement">
283                 <xs:complexType>
284                         <xs:annotation><xs:documentation>per-site symbolic and/or quantitative annotation</xs:documentation>
285                         <xs:documentation>SecondaryStructure and display character (from Jalview) have been subsumed into the glyph element</xs:documentation></xs:annotation>
286                         <xs:sequence>
287                                 
288                                 <xs:element name="description" type="xs:string" minOccurs="0">
289                                 <xs:annotation><xs:documentation>Free text at this position</xs:documentation></xs:annotation>
290                                 </xs:element>
291                                 <xs:element name="glyph" minOccurs="0" maxOccurs="unbounded">
292                                         <xs:annotation><xs:documentation>Discrete symbol - possibly graphically represented</xs:documentation></xs:annotation>
293                                         <xs:complexType>
294                                         <xs:simpleContent>
295                                         <xs:extension base="xs:string">
296                                                 <xs:attribute name="dict" type="xs:string" default="utf8" use="optional">
297                                                 <xs:annotation><xs:documentation>specifies the symbol dictionary for this glyph - eg utf8 (the default), aasecstr_3 or kd_hydrophobicity - the content is not validated so applications must ensure they gracefully deal with invalid entries here</xs:documentation>
298                                                 <xs:documentation>TODO: specify a minimum list of glyph dictionaries to get us started and provide a way for the vamsasClient to validate their content if regexes are specified</xs:documentation></xs:annotation></xs:attribute>
299                                 </xs:extension>
300                                 </xs:simpleContent>
301                                 </xs:complexType>                       
302                                 </xs:element>
303                                 <xs:element name="value" type="xs:float" minOccurs="0" maxOccurs="unbounded">
304                                 <xs:annotation><xs:documentation>Ordered set of float values - an application may treat the values together as a vector with common support for a set of annotation elements - but this is, again, not validated so applications should deal gracefully with varying numbers of dimensions
305                                 </xs:documentation></xs:annotation></xs:element>
306                         </xs:sequence>
307                         <xs:attribute name="position" type="xs:integer" use="required"><xs:annotation><xs:documentation>position with respect to the coordinate frame defined by a rangeType specification</xs:documentation></xs:annotation></xs:attribute>
308                         <xs:attribute name="after" type="xs:boolean" use="optional" default="false"><xs:annotation><xs:documentation>true means the annotation element appears between the specified position and the next</xs:documentation></xs:annotation></xs:attribute>
309                         <xs:attribute name="id" type="xs:ID" use="optional">                    <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
310                         </xs:attribute>
311                 </xs:complexType>
312         </xs:element>
313         <xs:complexType name="SequenceType">
314                 <xs:sequence>
315                         <xs:element name="sequence" type="xs:string" minOccurs="1" maxOccurs="1"/>
316                         <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
317                         <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
318                         <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"><xs:annotation><xs:documentation>additional typed properties</xs:documentation></xs:annotation></xs:element>
319                 </xs:sequence>
320                 <xs:attribute name="start" type="xs:integer" use="required"/>
321                 <xs:attribute name="end" type="xs:integer" use="required"/>
322         </xs:complexType>
323         <xs:element name="ApplicationData">
324                 <xs:complexType>
325                         <xs:annotation>
326                                 <xs:documentation>Data specific to a particular type and version of vamsas application</xs:documentation>
327                         </xs:annotation>
328                         <xs:complexContent>
329                                 <xs:extension base="vamsas:appData">
330                                         <xs:sequence>
331                                                 <xs:element name="User" maxOccurs="unbounded" minOccurs="0">
332                                                         <xs:complexType>
333                                                                 <xs:complexContent>
334                                                                         <xs:extension base="vamsas:appData">
335                                                                                 <xs:annotation><xs:documentation>Data available to just a particular user</xs:documentation></xs:annotation>
336                                                                                 <xs:attribute name="fullname" type="xs:string" use="required"/>
337                                                                                 <xs:attribute name="organization" type="xs:string" use="required"/>
338                                                                         </xs:extension>
339                                                                 </xs:complexContent>
340                                                         </xs:complexType>
341                                                 </xs:element>
342                                                 <xs:element name="Common" maxOccurs="1" minOccurs="0">
343                                                         <xs:complexType>
344                                                                 <xs:complexContent>
345                                                                         <xs:extension base="vamsas:appData">                                                                    </xs:extension>
346                                                                 </xs:complexContent>
347                                                         </xs:complexType>
348                                                 </xs:element>
349                                                 <xs:element name="Instance" maxOccurs="unbounded" minOccurs="0">
350                                                         <xs:complexType>
351                                                                 <xs:complexContent>
352                                                                         <xs:extension base="vamsas:appData">
353                                                                                 <xs:annotation>
354                                                                                         <xs:documentation>Data available to just a specific instance of the application</xs:documentation>
355                                                                                         <xs:documentation>VAMSAS/Pierre: Is this data volatile ?  Application instances may not be accessible after the session has closed - the user may have to be presented with the option of picking up the data in that instance</xs:documentation>
356                                                                                 </xs:annotation>
357                                                                                 <xs:attribute name="urn" type="xs:string" use="required"/>
358                                                                         </xs:extension>
359                                                                 </xs:complexContent>
360                                                         </xs:complexType>
361                                                 </xs:element>
362                                         </xs:sequence>
363                                         <xs:attribute name="version" type="xs:string" use="required"/>
364                                         <xs:attribute name="name" type="xs:string" use="required"/>
365                                 </xs:extension>
366                         </xs:complexContent>
367                 </xs:complexType>
368         </xs:element>
369         <xs:element name="Attachment">
370         <xs:complexType>
371         <xs:complexContent>
372           <xs:extension base="vamsas:appData">
373           <xs:annotation>
374           <xs:documentation>General data container to attach a typed data object to any vamsas object</xs:documentation>
375           </xs:annotation>
376           <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false"><xs:annotation><xs:documentation>true implies data will be decompresses with Zip before presenting to application</xs:documentation></xs:annotation></xs:attribute>
377           <xs:attribute name="type" type="xs:string" use="required"><xs:annotation><xs:documentation>Type of arbitrary data - TODO: decide format - use (extended) MIME types ?</xs:documentation></xs:annotation></xs:attribute>
378           <xs:attribute name="objectref" type="xs:IDREF" use="required"><xs:annotation><xs:documentation>Object the arbitrary data is associated with</xs:documentation></xs:annotation></xs:attribute>
379           <xs:attribute name="id" type="xs:ID" use="optional">                  <xs:annotation><xs:documentation>Primary Key for vamsas object referencing</xs:documentation></xs:annotation>
380                         </xs:attribute>
381           </xs:extension>         
382         </xs:complexContent>
383         </xs:complexType>
384         </xs:element>
385         <xs:complexType name="appData">
386                 <xs:choice>
387                         <xs:element name="data" type="xs:base64Binary"/>
388                         <xs:element name="dataReference" type="xs:string"/>
389                 </xs:choice>
390         </xs:complexType>
391 </xs:schema>