embedded core-file demo for faster loading
[jalview.git] / schemas / JalviewUserColours.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
4   Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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 -->
19 <!-- 
20         Java JAXB binding classes are generated by running command line tool xjc:
21             xjc schemas/jalview.xsd -d src -p jalview.xml.binding.jalview
22         Note this also generates code for included schemas
23 -->
24 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jalview="www.jalview.org/colours" targetNamespace="www.jalview.org/colours">
25         <xs:element name="JalviewUserColours" type="jalview:JalviewUserColours" />
26         <xs:complexType name="JalviewUserColours">
27                 <xs:sequence>
28                         <xs:element name="Version" maxOccurs="1" minOccurs="0" type="xs:string">
29                                 <xs:annotation>
30                                 <xs:documentation>
31                                 Jalview colour scheme document version.
32                                 </xs:documentation>
33                                 </xs:annotation>
34                         </xs:element>
35                         <xs:element name="colour" maxOccurs="unbounded" minOccurs="0">
36                                 <xs:complexType>
37                                     <xs:sequence>
38                                             <xs:element name="attributeName" type="xs:string" minOccurs="0" maxOccurs="2">
39                                                         <xs:annotation>
40                                                                 <xs:documentation>name of feature attribute to colour by, or attribute and sub-attribute</xs:documentation>
41                                                         </xs:annotation>
42                                             </xs:element> 
43                                         </xs:sequence>
44                                         <xs:attribute name="Name" type="xs:string">
45                                                 <xs:annotation>
46                                                         <xs:documentation>Single letter residue code for an alignment colour scheme, or feature type for a feature colour scheme</xs:documentation>
47                                                 </xs:annotation>
48                                         </xs:attribute>
49                                         <xs:attribute name="RGB" type="xs:string" use="required"/>
50                                         <xs:attribute name="minRGB" type="xs:string" use="optional"/>
51                                         <xs:attribute name="noValueColour" use="optional" type="jalview:NoValueColour" default="Min" />
52                                         <xs:attribute name="threshType" use="optional" type="jalview:ThresholdType" />
53                                         <xs:attribute name="threshold" type="xs:float" use="optional"/>
54                                         <xs:attribute name="max" type="xs:float" use="optional"/>
55                                         <xs:attribute name="min" type="xs:float" use="optional"/>
56                                         <xs:attribute name="colourByLabel" type="xs:boolean" use="optional"/>
57                                         <xs:attribute name="autoScale" type="xs:boolean" use="optional"/>
58                                 </xs:complexType>
59                         </xs:element>
60                         <xs:element name="filter" maxOccurs="unbounded" minOccurs="0" >
61                             <xs:complexType>
62                                         <xs:sequence> 
63                                                 <xs:element name="matcherSet" type="jalview:FeatureMatcherSet" />
64                                         </xs:sequence> 
65                                         <xs:attribute name="featureType" type="xs:string" use="required"/>
66                             </xs:complexType>
67                         </xs:element>
68                 </xs:sequence>
69                 <xs:attribute name="schemeName" type="xs:string" use="optional"/>
70         </xs:complexType>
71
72         <xs:complexType name="FeatureMatcherSet"> 
73                 <xs:annotation>
74                         <xs:documentation>A feature match condition, which may be simple or compound</xs:documentation>
75                 </xs:annotation>
76           <xs:choice> 
77             <xs:element name="matchCondition" type="jalview:FeatureMatcher" /> 
78             <xs:element name="compoundMatcher">
79                     <xs:complexType>
80                           <xs:sequence> 
81                               <xs:element name="matcherSet" minOccurs="2" maxOccurs="2" type="jalview:FeatureMatcherSet" /> 
82                           </xs:sequence> 
83                       <xs:attribute name="and" type="xs:boolean" use="required">
84                                   <xs:annotation>
85                                         <xs:documentation>If true, matchers are AND-ed, if false they are OR-ed</xs:documentation>
86                                   </xs:annotation>
87                       </xs:attribute>
88                     </xs:complexType>
89             </xs:element>
90           </xs:choice> 
91         </xs:complexType> 
92         
93         <xs:complexType name="FeatureMatcher"> 
94           <xs:sequence> 
95             <xs:element name="attributeName" type="xs:string" minOccurs="0" maxOccurs="2">
96                         <xs:annotation>
97                                 <xs:documentation>name of feature attribute to filter on, or attribute and sub-attribute</xs:documentation>
98                         </xs:annotation>
99             </xs:element> 
100             <xs:element name="condition" type="xs:string" /> 
101             <xs:element name="value" type="xs:string" /> 
102           </xs:sequence>
103           <xs:attribute name="by" type="jalview:FilterBy" />
104         </xs:complexType>
105
106         <xs:simpleType name="ThresholdType">
107                 <xs:annotation>
108                         <xs:documentation>Whether filter has a threshold, and if so is it
109                                 above or below
110                         </xs:documentation>
111                 </xs:annotation>
112                 <xs:restriction base="xs:string">
113                         <xs:enumeration value="NONE" />
114                         <xs:enumeration value="ABOVE" />
115                         <xs:enumeration value="BELOW" />
116                 </xs:restriction>
117         </xs:simpleType>
118         
119         <xs:simpleType name="FilterBy">
120                 <xs:annotation>
121                         <xs:documentation>Filter may apply to label, score or some feature attribute</xs:documentation>
122                 </xs:annotation>
123                 <xs:restriction base="xs:string">
124               <xs:enumeration value="byLabel" />
125               <xs:enumeration value="byScore" />
126               <xs:enumeration value="byAttribute" />
127             </xs:restriction>   
128         </xs:simpleType>
129         
130         <xs:simpleType name="NoValueColour">
131                 <xs:annotation>
132                         <xs:documentation>Graduated feature colour if no score (or attribute) value</xs:documentation>
133                 </xs:annotation>
134                 <xs:restriction base="xs:string">
135               <xs:enumeration value="None" />
136               <xs:enumeration value="Min" />
137               <xs:enumeration value="Max" />
138             </xs:restriction>   
139         </xs:simpleType>
140 </xs:schema>