bcc0438f6675a63f8189f2dfc10a110a0a6e137b
[jalview.git] / schemas / jalview.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="www.vamsas.ac.uk/jalview/version2" xmlns:jalview="www.jalview.org/colours" xmlns:jv="www.jalview.org" targetNamespace="www.jalview.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
3                 <xs:import namespace="www.vamsas.ac.uk/jalview/version2" schemaLocation="vamsas.xsd"/>
4         <xs:import namespace="www.jalview.org/colours" schemaLocation="JalviewUserColours.xsd"/>
5         <xs:complexType name="JalviewModel">
6                 <xs:sequence>
7                         <xs:element name="creationDate" type="xs:dateTime"/>
8                         <xs:element name="version" type="xs:string"/>
9                         <xs:element name="vamsasModel" type="vamsas:VAMSAS"/>
10                         <xs:sequence>
11                                 <xs:element name="JSeq" maxOccurs="unbounded">
12                                         <xs:complexType>
13                                                 <xs:sequence>
14                                                         <xs:element name="features" type="jv:feature" minOccurs="0" maxOccurs="unbounded"/>
15                                                         <xs:element name="pdbids" minOccurs="0" maxOccurs="unbounded">
16                                                                 <xs:complexType>
17                                                                         <xs:complexContent>
18                                                                                 <xs:extension base="jv:pdbentry">
19                                                                                         <xs:sequence>
20                                                                                                 <xs:element name="structureState" minOccurs="0" maxOccurs="unbounded">
21                                                                                                         <xs:complexType>
22                                                                                                                 <xs:simpleContent>
23                                                                                                                         <xs:extension base="xs:string">
24                                                                                                                                 <xs:attribute name="visible" type="xs:boolean"/>
25                                                                                                                                 <xs:attribute name="xpos" type="xs:int"/>
26                                                                                                                                 <xs:attribute name="ypos" type="xs:int"/>
27                                                                                                                                 <xs:attribute name="width" type="xs:int"/>
28                                                                                                                                 <xs:attribute name="height" type="xs:int"/>
29                                                                                                                                 <xs:attribute name="viewId" type="xs:string" use="optional">
30                                                                                                                                         <xs:annotation>
31                                                                                                                                                 <xs:documentation>additional identifier which properly disambiguates
32                                                                                                                                                 the structure view from any other view with the same attributes. This is not an ID,
33                                                                                                                                                 because it is possible to have many references to the same physical structure view
34                                                                                                                                                 from different sequences in an alignment. A structureState element citing the same
35                                                                                                                                                 viewId will appear for each instance.</xs:documentation>
36                                                                                                                                         </xs:annotation>
37                                                                                                                                 </xs:attribute>
38                                                                                                                                         
39                                                                                                                                 
40                                                                                                                         </xs:extension>
41                                                                                                                 </xs:simpleContent>
42                                                                                                         </xs:complexType>
43                                                                                                 </xs:element>
44                                                                                         </xs:sequence>
45                                                                                 </xs:extension>
46                                                                         </xs:complexContent>
47                                                                 </xs:complexType>
48                                                         </xs:element>
49                                                         <xs:element name="hiddenSequences" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
50                                                 </xs:sequence>
51                                                 <xs:attribute name="colour" type="xs:int" use="optional"/>
52                                                 <xs:attribute name="start" type="xs:int" use="required"/>
53                                                 <xs:attribute name="end" type="xs:int" use="required"/>
54                                                 <xs:attribute name="id" type="xs:string" use="required"/>
55                                                 <xs:attribute name="hidden" type="xs:boolean"/>
56                                         </xs:complexType>
57                                 </xs:element>
58                                 <xs:element name="JGroup" minOccurs="0" maxOccurs="unbounded">
59                                         <xs:complexType>
60                                                 <xs:sequence>
61                                                         <xs:element name="seq" type="xs:string" maxOccurs="unbounded"/>
62                                                 </xs:sequence>
63                                                 <xs:attribute name="start" type="xs:int"/>
64                                                 <xs:attribute name="end" type="xs:int"/>
65                                                 <xs:attribute name="name" type="xs:string"/>
66                                                 <xs:attribute name="colour" type="xs:string"/>
67                                                 <xs:attribute name="consThreshold" type="xs:int"/>
68                                                 <xs:attribute name="pidThreshold" type="xs:int"/>
69                                                 <xs:attribute name="outlineColour" type="xs:int"/>
70                                                 <xs:attribute name="displayBoxes" type="xs:boolean"/>
71                                                 <xs:attribute name="displayText" type="xs:boolean"/>
72                                                 <xs:attribute name="colourText" type="xs:boolean"/>
73                                                 <xs:attribute name="textCol1" type="xs:int"/>
74                                                 <xs:attribute name="textCol2" type="xs:int"/>
75                                                 <xs:attribute name="textColThreshold" type="xs:int"/>
76                                                 <xs:attribute name="showUnconserved" type="xs:boolean" use="optional"/>
77                                                 
78                                         </xs:complexType>
79                                 </xs:element>
80                                 <xs:element name="Viewport" maxOccurs="unbounded">
81                                         <xs:complexType>
82                                                 <xs:sequence>
83                                                         <xs:element name="AnnotationColours" minOccurs="0">
84                                                                 <xs:complexType>
85                                                                         <xs:attribute name="aboveThreshold" type="xs:int"/>
86                                                                         <xs:attribute name="annotation" type="xs:string"/>
87                                                                         <xs:attribute name="minColour" type="xs:int"/>
88                                                                         <xs:attribute name="maxColour" type="xs:int"/>
89                                                                         <xs:attribute name="colourScheme" type="xs:string"/>
90                                                                         <xs:attribute name="threshold" type="xs:float"/>
91                                                                 </xs:complexType>
92                                                         </xs:element>
93                                                         <xs:element name="hiddenColumns" minOccurs="0" maxOccurs="unbounded">
94                                                                 <xs:complexType>
95                                                                         <xs:attribute name="start" type="xs:int"/>
96                                                                         <xs:attribute name="end" type="xs:int"/>
97                                                                 </xs:complexType>
98                                                         </xs:element>
99                                                 </xs:sequence>
100                                                 <xs:attribute name="conservationSelected" type="xs:boolean"/>
101                                                 <xs:attribute name="pidSelected" type="xs:boolean"/>
102                                                 <xs:attribute name="bgColour" type="xs:string"/>
103                                                 <xs:attribute name="consThreshold" type="xs:int"/>
104                                                 <xs:attribute name="pidThreshold" type="xs:int"/>
105                                                 <xs:attribute name="title" type="xs:string"/>
106                                                 <xs:attribute name="showFullId" type="xs:boolean"/>
107                                                 <xs:attribute name="rightAlignIds" type="xs:boolean"/>
108                                                 <xs:attribute name="showText" type="xs:boolean"/>
109                                                 <xs:attribute name="showColourText" type="xs:boolean"/>
110                                                 <xs:attribute name="showUnconserved" type="xs:boolean" use="optional"/>
111                                                 <xs:attribute name="showBoxes" type="xs:boolean"/>
112                                                 <xs:attribute name="wrapAlignment" type="xs:boolean"/>
113                                                 <xs:attribute name="renderGaps" type="xs:boolean"/>
114                                                 <xs:attribute name="showSequenceFeatures" type="xs:boolean"/>
115                                                 <xs:attribute name="showAnnotation" type="xs:boolean"/>
116                                                 <xs:attribute name="xpos" type="xs:int"/>
117                                                 <xs:attribute name="ypos" type="xs:int"/>
118                                                 <xs:attribute name="width" type="xs:int"/>
119                                                 <xs:attribute name="height" type="xs:int"/>
120                                                 <xs:attribute name="startRes" type="xs:int"/>
121                                                 <xs:attribute name="startSeq" type="xs:int"/>
122                                                 <xs:attribute name="fontName" type="xs:string"/>
123                                                 <xs:attribute name="fontSize" type="xs:int"/>
124                                                 <xs:attribute name="fontStyle" type="xs:int"/>
125                                                 <xs:attribute name="viewName" type="xs:string"/>
126                                                 <xs:attribute name="sequenceSetId" type="xs:string"/>
127                                                 <xs:attribute name="gatheredViews" type="xs:boolean"/>
128                                                 <xs:attribute name="textCol1" type="xs:int"/>
129                                                 <xs:attribute name="textCol2" type="xs:int"/>
130                                                 <xs:attribute name="textColThreshold" type="xs:int"/>
131                                                 <xs:attribute name="id" type="xs:ID" use="optional">
132                                                         <xs:annotation>
133                                                                 <xs:documentation>
134                                                                         unique id used by jalview to synchronize between stored and instantiated views
135                                                                 </xs:documentation>
136                                                         </xs:annotation>
137                                                 </xs:attribute>
138                                         </xs:complexType>
139                                 </xs:element>
140                                 <xs:element name="UserColours" minOccurs="0" maxOccurs="unbounded">
141                                         <xs:complexType>
142                                                 <xs:sequence>
143                                                         <xs:element name="UserColourScheme" type="jalview:JalviewUserColours"/>
144                                                 </xs:sequence>
145                                                 <xs:attribute name="id" type="xs:string"/>
146                                         </xs:complexType>
147                                 </xs:element>
148                                 <xs:element name="tree" minOccurs="0" maxOccurs="unbounded">
149                                         <xs:complexType>
150                                                 <xs:sequence minOccurs="0">
151                                                         <xs:element name="title" type="xs:string"/>
152                                                         <xs:element name="newick" type="xs:string"/>
153                                                 </xs:sequence>
154                                                 <xs:attribute name="width" type="xs:int"/>
155                                                 <xs:attribute name="height" type="xs:int"/>
156                                                 <xs:attribute name="xpos" type="xs:int"/>
157                                                 <xs:attribute name="ypos" type="xs:int"/>
158                                                 <xs:attribute name="fontName" type="xs:string"/>
159                                                 <xs:attribute name="fontSize" type="xs:int"/>
160                                                 <xs:attribute name="fontStyle" type="xs:int"/>
161                                                 <xs:attribute name="threshold" type="xs:float"/>
162                                                 <xs:attribute name="showBootstrap" type="xs:boolean"/>
163                                                 <xs:attribute name="showDistances" type="xs:boolean"/>
164                                                 <xs:attribute name="markUnlinked" type="xs:boolean"/>
165                                                 <xs:attribute name="fitToWindow" type="xs:boolean"/>
166                                                 <xs:attribute name="currentTree" type="xs:boolean"/>
167                                                 <xs:attribute name="id" type="xs:ID" use="optional">
168                                                         <xs:annotation><xs:documentation>Tree ID added for binding tree visualization settings to vamsas document trees in jalview 2.4.1</xs:documentation></xs:annotation>
169                                                 </xs:attribute>
170                                         </xs:complexType>
171                                 </xs:element>
172                                 <xs:element name="FeatureSettings" minOccurs="0">
173                                         <xs:complexType>
174                                                 <xs:sequence>
175                                                         <xs:element name="setting" minOccurs="0" maxOccurs="unbounded">
176                                                                 <xs:complexType>
177                                                                         <xs:attribute name="type" type="xs:string" use="required"/>
178                                                                         <xs:attribute name="colour" type="xs:int" use="required"/>
179                                                                         <xs:attribute name="display" type="xs:boolean" use="required"/>
180                                                                         <xs:attribute name="order" type="xs:float" use="optional"/>
181                                                                         <xs:attribute name="mincolour" type="xs:int" use="optional">
182                                                                         <xs:annotation><xs:documentation>Optional minimum colour for graduated feature colour</xs:documentation>
183                                                                         </xs:annotation></xs:attribute>
184                                                                         <xs:attribute name="threshold" type="xs:float" use="optional">
185                                                                         <xs:annotation><xs:documentation>threshold value for graduated feature colour</xs:documentation>
186                                                                         </xs:annotation></xs:attribute>
187                                                                         <xs:attribute name="threshstate" type="xs:int" use="optional">
188                                                                         <xs:annotation><xs:documentation>threshold type for graduated feature colour</xs:documentation>
189                                                                         </xs:annotation></xs:attribute>
190                                                         </xs:complexType>
191                                                         </xs:element>
192                                                         <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
193                                                                 <xs:complexType>
194                                                                         <xs:attribute name="name" type="xs:string" use="required"/>
195                                                                         <xs:attribute name="display" type="xs:boolean" use="required"/>
196                                                                 </xs:complexType>
197                                                         </xs:element>
198                                                 </xs:sequence>
199                                         </xs:complexType>
200                                 </xs:element>
201                         </xs:sequence>
202                 </xs:sequence>
203         </xs:complexType>
204         <xs:complexType name="feature">
205                 <xs:sequence>
206                         <xs:element name="otherData" minOccurs="0" maxOccurs="unbounded">
207                                 <xs:complexType>
208                                         <xs:attribute name="key" type="xs:string" use="required"/>
209                                         <xs:attribute name="value" type="xs:string" use="required"/>
210                                 </xs:complexType>
211                         </xs:element>
212                 </xs:sequence>
213                 <xs:attribute name="begin" type="xs:int" use="required"/>
214                 <xs:attribute name="end" type="xs:int" use="required"/>
215                 <xs:attribute name="type" type="xs:string" use="required"/>
216                 <xs:attribute name="description" type="xs:string" use="optional"/>
217                 <xs:attribute name="status" type="xs:string" use="optional"/>
218                 <xs:attribute name="featureGroup" type="xs:string" use="optional"/>
219                 <xs:attribute name="score" type="xs:float" use="optional"/>
220         </xs:complexType>
221         <xs:complexType name="pdbentry">
222                 <xs:sequence minOccurs="0" maxOccurs="unbounded">
223                         <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
224                                 <xs:complexType>
225                                         <xs:attribute name="name" type="xs:string" use="required"/>
226                                         <xs:attribute name="value" type="xs:string" use="required"/>
227                                 </xs:complexType>
228                         </xs:element>
229                 </xs:sequence>
230                 <xs:attribute name="id" type="xs:string" use="required"/>
231                 <xs:attribute name="type" type="xs:string" use="optional"/>
232                 <xs:attribute name="file" type="xs:string"/>
233         </xs:complexType>
234 </xs:schema>