JAL-1503 update version in GPL header
[jalview.git] / schemas / vamsas.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
4  * Copyright (C) 2014 The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19 -->
20 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
21 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="www.vamsas.ac.uk/jalview/version2" targetNamespace="www.vamsas.ac.uk/jalview/version2" elementFormDefault="qualified" attributeFormDefault="unqualified">
22         <xs:complexType name="VAMSAS">
23                 <xs:sequence>
24                         <xs:element name="Tree" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
25                         <xs:element ref="vamsas:SequenceSet" minOccurs="0" maxOccurs="unbounded"/>
26                 </xs:sequence>
27         </xs:complexType>
28         <xs:complexType name="mapListType">
29                 <xs:annotation>
30                         <xs:documentation> 
31                                 developed after mapRangeType from http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
32                         </xs:documentation>
33                         <xs:documentation>
34                                 This effectively represents a java.util.MapList object
35                         </xs:documentation>
36                 </xs:annotation>
37                 <xs:sequence>
38                         <xs:element name="mapListFrom" minOccurs="0" maxOccurs="unbounded">
39                                 <xs:annotation>
40                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
41                                 </xs:annotation>
42                                 <xs:complexType>
43                                         <xs:attribute name="start" type="xs:int" use="required"/>
44                                         <xs:attribute name="end" type="xs:int" use="required"/>
45                                 </xs:complexType>
46                         </xs:element>                                   
47                         <xs:element name="mapListTo" minOccurs="0" maxOccurs="unbounded">
48                                 <xs:annotation>
49                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
50                                 </xs:annotation>
51                                 <xs:complexType>
52                                         <xs:attribute name="start" type="xs:int" use="required"/>
53                                         <xs:attribute name="end" type="xs:int" use="required"/>
54                                 </xs:complexType>
55                         </xs:element>                                   
56                 </xs:sequence>
57                 <xs:attribute name="mapFromUnit" type="xs:positiveInteger" use="required">
58                         <xs:annotation>
59                                 <xs:documentation>number of dictionary symbol widths involved in each
60                                         mapped position on this sequence (for example, 3 for a dna sequence exon
61                                         region that is being mapped to a protein sequence). This is optional,
62                                         since the unit can be usually be inferred from the dictionary type of
63                                         each sequence involved in the mapping. </xs:documentation>
64                         </xs:annotation>
65                 </xs:attribute>
66                 <xs:attribute name="mapToUnit" type="xs:positiveInteger" use="required">
67                         <xs:annotation>
68                                 <xs:documentation>number of dictionary symbol widths involved in each
69                                         mapped position on this sequence (for example, 3 for a dna sequence exon
70                                         region that is being mapped to a protein sequence). This is optional,
71                                         since the unit can be usually be inferred from the dictionary type of
72                                         each sequence involved in the mapping. </xs:documentation>
73                         </xs:annotation>
74                 </xs:attribute>
75         </xs:complexType>
76         <xs:element name="Mapping">
77                 <xs:complexType>
78                         <xs:annotation>
79                                 <xs:documentation>
80                                         Represent the jalview.datamodel.Mapping object - it also provides
81                                         a way of storing sequences that are mapped 'to' without adding them
82                                         to the sequence set (which will mean they are then added to the alignment too).
83                                 </xs:documentation>
84                         </xs:annotation>
85                         <xs:complexContent>
86                                 <xs:extension base="vamsas:mapListType">
87                                         <xs:sequence>
88                                                 <xs:choice minOccurs="0" maxOccurs="1">
89                                                         <xs:element ref="vamsas:Sequence"/>
90                                                         <xs:element name="dseqFor">
91                                                                 <xs:simpleType>
92                                                                         <xs:restriction base="xs:string">
93                                                                                 <xs:annotation>
94                                                                                         <xs:documentation>The sequence whose dataset sequence is to be referenced here</xs:documentation>
95                                                                                 </xs:annotation>
96                                                                         </xs:restriction>
97                                                                 </xs:simpleType>
98                                                         </xs:element>
99                                                 </xs:choice>
100                                         </xs:sequence>
101                                 </xs:extension>
102                         </xs:complexContent>    
103                 </xs:complexType>
104         </xs:element>
105         <xs:element name="AlcodonFrame">
106                 <xs:complexType>
107                         <xs:sequence>
108                                 <xs:element name="alcodon" minOccurs="0" maxOccurs="unbounded">
109                                         <xs:complexType>
110                                                 <xs:annotation>
111                                                         <xs:documentation>
112                                                                 specifies a series of aligned codons from an associated DNA sequence alignment that when translated correspond to columns of a peptide alignment.
113                                                                 Element may have either all pos1,2,3 attributes specified, or none at all (indicating a gapped column with no translated peptide).
114                                                         </xs:documentation>
115                                                 </xs:annotation>
116                                                 <xs:attribute name="pos1" type="xs:integer" use="optional"/>
117                                                 <xs:attribute name="pos2" type="xs:integer" use="optional"/>
118                                                 <xs:attribute name="pos3" type="xs:integer" use="optional"/>
119                                         </xs:complexType>
120                                 </xs:element>
121                                 <xs:element name="alcodMap" minOccurs="0" maxOccurs="unbounded">
122                                         <xs:complexType>
123                                                 <xs:sequence>
124                                                         <xs:element ref="vamsas:Mapping" maxOccurs="1" minOccurs="1">
125                                                                 <xs:annotation>
126                                                                         <xs:documentation>
127                                                                                 a Mapping entry and an associated protein sequence
128                                                                         </xs:documentation>
129                                                                 </xs:annotation>
130                                                         </xs:element>
131                                                 </xs:sequence>
132                                                 <xs:attribute name="dnasq" type="xs:string" use="required">
133                                                         <xs:annotation>
134                                                                 <xs:documentation>
135                                                                         internal jalview id for the dnasq for this mapping.
136                                                                 </xs:documentation>
137                                                         </xs:annotation>
138                                                 </xs:attribute>
139                                         </xs:complexType>
140                                         
141                                 </xs:element>
142                                 
143                         </xs:sequence>
144                 </xs:complexType>
145         </xs:element>
146         <xs:element name="Sequence">
147                 <xs:complexType>
148                         <xs:complexContent>
149                                 <xs:extension base="vamsas:SequenceType">
150                                         <xs:sequence>
151                                                 <xs:element name="DBRef" minOccurs="0" maxOccurs="unbounded">
152                                                         <xs:complexType>
153                                                                 <xs:sequence>
154                                                                         <xs:element ref="vamsas:Mapping" minOccurs="0" maxOccurs="1"/>
155                                                                 </xs:sequence>                                                                                                  
156                                                                 <xs:attribute name="source" type="xs:string"/>
157                                                                 <xs:attribute name="version" type="xs:string"/>
158                                                                 <xs:attribute name="accessionId" type="xs:string"/>
159                                                         </xs:complexType>
160                                                 </xs:element>
161                                         </xs:sequence>
162                                         <xs:attribute name="dsseqid" type="xs:string" use="optional">
163                                                 <xs:annotation>
164                                                         <xs:documentation>
165                                                                 dataset sequence id for this sequence. Will be created as union of sequences.
166                                                         </xs:documentation>
167                                                 </xs:annotation>
168                                         </xs:attribute>
169                                 </xs:extension>
170                         </xs:complexContent>
171                 </xs:complexType>
172         </xs:element>
173         <xs:element name="Annotation">
174                 <xs:complexType>
175                         <xs:sequence>
176                                 <xs:element ref="vamsas:annotationElement" minOccurs="0"
177                                         maxOccurs="unbounded" />
178                                 <xs:element name="label" type="xs:string" />
179                                 <xs:element name="description" type="xs:string"
180                                         minOccurs="0" />
181                                 <xs:element name="thresholdLine" minOccurs="0">
182                                         <xs:complexType>
183                                                 <xs:attribute name="label" type="xs:string" />
184                                                 <xs:attribute name="value" type="xs:float" />
185                                                 <xs:attribute name="colour" type="xs:int" />
186                                         </xs:complexType>
187                                 </xs:element>
188                         </xs:sequence>
189                         <xs:attribute name="graph" type="xs:boolean" use="required" />
190                         <xs:attribute name="graphType" type="xs:int" use="optional" />
191                         <xs:attribute name="sequenceRef" type="xs:string"
192                                 use="optional" />
193                         <xs:attribute name="groupRef" type="xs:string"
194                                 use="optional" />
195                         <xs:attribute name="graphColour" type="xs:int"
196                                 use="optional" />
197                         <xs:attribute name="graphGroup" type="xs:int"
198                                 use="optional" />
199                         <xs:attribute name="graphHeight" type="xs:int" use="optional">
200                         <xs:annotation><xs:documentation>height in pixels for the graph if this is a graph-type annotation.</xs:documentation></xs:annotation></xs:attribute>
201                         <xs:attribute name="id" type="xs:string" use="optional" />
202                         <xs:attribute name="scoreOnly" type="xs:boolean"
203                                 use="optional" default="false" />
204                         <xs:attribute name="score" type="xs:double" use="optional" />
205                         <xs:attribute name="visible" type="xs:boolean"
206                                 use="optional" />
207                         <xs:attribute name="centreColLabels" type="xs:boolean"
208                                 use="optional" />
209                         <xs:attribute name="scaleColLabels" type="xs:boolean"
210                                 use="optional" />
211                         <xs:attribute name="showAllColLabels" type="xs:boolean"
212                                 use="optional" />
213
214
215                         <xs:attribute name="autoCalculated" type="xs:boolean" use="optional" default="false">
216                         <xs:annotation><xs:documentation>is an autocalculated annotation row</xs:documentation>
217                         </xs:annotation></xs:attribute>
218                         <xs:attribute name="belowAlignment" type="xs:boolean" use="optional" default="true">
219                         <xs:annotation><xs:documentation>is to be shown below the alignment - introduced in Jalview 2.8 for visualizing T-COFFEE alignment scores</xs:documentation></xs:annotation></xs:attribute>
220                         <xs:attribute name="calcId" type="xs:string" use="optional">
221                         <xs:annotation><xs:documentation>Optional string identifier used to group sets of annotation produced by a particular calculation. Values are opaque strings but have semantic meaning to Jalview's renderer, data importer and calculation system.</xs:documentation></xs:annotation>
222                         </xs:attribute>
223                 </xs:complexType>
224         </xs:element>   
225         <xs:element name="SequenceSet">
226                 <xs:complexType>
227                         <xs:sequence>
228                                 <xs:element ref="vamsas:Sequence" minOccurs="0" maxOccurs="unbounded"/>
229                                 <xs:element ref="vamsas:Annotation" minOccurs="0" maxOccurs="unbounded"/>
230                                 <xs:element name="sequenceSetProperties" minOccurs="0" maxOccurs="unbounded">
231                                         <xs:complexType>
232                                                 <xs:attribute name="key" type="xs:string"/>
233                                                 <xs:attribute name="value" type="xs:string"/>
234                                         </xs:complexType>
235                                 </xs:element>
236                                 <xs:element ref="vamsas:AlcodonFrame" minOccurs="0" maxOccurs="unbounded"/>
237                         </xs:sequence>
238                         <xs:attribute name="gapChar" type="xs:string" use="required"/>
239                         <xs:attribute name="datasetId" type="xs:string" use="optional">
240                                 <xs:annotation>
241                                         <xs:documentation>
242                                                 reference to set where jalview will gather the dataset sequences for all sequences in the set. 
243                                         </xs:documentation>
244                                 </xs:annotation>
245                         </xs:attribute>
246                 </xs:complexType>
247         </xs:element>
248         <xs:element name="annotationElement">
249                 <xs:complexType>
250                         <xs:sequence>
251                                 <xs:element name="displayCharacter" type="xs:string" minOccurs="0"/>
252                                 <xs:element name="description" type="xs:string" minOccurs="0"/>
253                                 <xs:element name="secondaryStructure" minOccurs="0">
254                                         <xs:simpleType>
255                                                 <xs:restriction base="xs:string">
256                                                         <xs:length value="1"/>
257                                                 </xs:restriction>
258                                         </xs:simpleType>
259                                 </xs:element>
260                                 <xs:element name="value" type="xs:float" minOccurs="0"/>
261                         </xs:sequence>
262                         <xs:attribute name="position" type="xs:int" use="required"/>
263                         <xs:attribute name="colour" type="xs:int" use="optional"/>
264                 </xs:complexType>
265         </xs:element>
266         <xs:complexType name="SequenceType">
267                 <xs:sequence>
268                         <xs:element name="sequence" type="xs:string" minOccurs="0"/>
269                         <xs:element name="name" type="xs:string" minOccurs="0"/>
270                 </xs:sequence>
271                 <xs:attribute name="id" type="xs:string"/>
272                 <xs:attribute name="description" type="xs:string"/>
273         </xs:complexType>
274 </xs:schema>