JAL-1764 add structure view type attribute to project schema
[jalview.git] / schemas / jalview.xsd
index 03c5728..eab6500 100755 (executable)
@@ -1,20 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
-  Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
-  
-  This file is part of Jalview.
-  
-  Jalview is free software: you can redistribute it and/or
-  modify it under the terms of the GNU General Public License 
-  as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-   
-  Jalview is distributed in the hope that it will be useful, but 
-  WITHOUT ANY WARRANTY; without even the implied warranty 
-  of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-  PURPOSE.  See the GNU General Public License for more details.
-  
-  You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * 
+ * This file is part of Jalview.
+ * 
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ *  
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * PURPOSE.  See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
 -->
 <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" xmlns:jvws="www.jalview.org/xml/wsparamset" targetNamespace="www.jalview.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
                <xs:import namespace="www.vamsas.ac.uk/jalview/version2" schemaLocation="vamsas.xsd"/>
@@ -26,7 +27,7 @@
                        <xs:element name="version" type="xs:string" />
                        <xs:element name="vamsasModel" type="vamsas:VAMSAS" />
                        <xs:sequence>
-                               <xs:element name="JSeq" maxOccurs="unbounded">
+                               <xs:element name="JSeq" maxOccurs="unbounded" minOccurs="0">
                                        <xs:complexType>
                                                <xs:sequence>
                                                        <xs:element name="features"
                                                                                                                                                </xs:documentation>
                                                                                                                                        </xs:annotation>
                                                                                                                                </xs:attribute>
+                                                                                                                               <xs:attribute name="type" type="xs:string"
+                                                                                                                                       use="optional">
+                                                                                                                                       <xs:annotation>
+                                                                                                                                               <xs:documentation>
+                                                                                                                                                       An identifier for the viewer type, currently either
+                                                                                                                                                       JMOL or CHIMERA
+                                                                                                                                               </xs:documentation>
+                                                                                                                                       </xs:annotation>
+                                                                                                                               </xs:attribute>
 
                                                                                                                        </xs:extension>
                                                                                                                </xs:simpleContent>
                                <xs:element name="JGroup" minOccurs="0"
                                        maxOccurs="unbounded">
                                        <xs:complexType>
-                                               <xs:sequence>
-                                                       <xs:element name="seq" type="xs:string"
-                                                               maxOccurs="unbounded" />
+            <xs:sequence>
+                                                       <xs:element name="seq" type="xs:string" maxOccurs="unbounded" />
+                                                       <xs:element name="annotationColours" type="jv:AnnotationColourScheme"
+                                                               minOccurs="0" maxOccurs="1" />
                                                </xs:sequence>
                                                <xs:attribute name="start" type="xs:int" />
                                                <xs:attribute name="end" type="xs:int" />
                                                </xs:attribute>
                                        </xs:complexType>
                                </xs:element>
-                               <xs:element name="Viewport" maxOccurs="unbounded">
+                               <xs:element name="Viewport" maxOccurs="unbounded" minOccurs="0">
                                        <xs:complexType>
                                                <xs:sequence>
-                                                       <xs:element name="AnnotationColours"
-                                                               minOccurs="0">
-                                                               <xs:complexType>
-                                                                       <xs:attribute name="aboveThreshold"
-                                                                               type="xs:int" />
-                                                                       <xs:attribute name="annotation"
-                                                                               type="xs:string" />
-                                                                       <xs:attribute name="minColour"
-                                                                               type="xs:int" />
-                                                                       <xs:attribute name="maxColour"
-                                                                               type="xs:int" />
-                                                                       <xs:attribute name="colourScheme"
-                                                                               type="xs:string" />
-                                                                       <xs:attribute name="threshold"
-                                                                               type="xs:float" />
-                                                               </xs:complexType>
+                                                       <xs:element name="AnnotationColours" type="jv:AnnotationColourScheme" 
+                                                               minOccurs="0" maxOccurs="1">
                                                        </xs:element>
                                                        <xs:element name="hiddenColumns"
                                                                minOccurs="0" maxOccurs="unbounded">
                                                        type="xs:boolean" use="optional" default="true" />
                                                <xs:attribute name="showSequenceLogo"
                                                        type="xs:boolean" use="optional" default="false" />
-            <xs:attribute name="normaliseSequenceLogo"
-              type="xs:boolean" use="optional" default="false" />
+                                   <xs:attribute name="normaliseSequenceLogo"
+                                     type="xs:boolean" use="optional" default="false" />
                                                <xs:attribute name="ignoreGapsinConsensus"
                                                        type="xs:boolean" use="optional" default="true" />
-
-                                               <xs:attribute name="startRes" type="xs:int" />
+                                                       <xs:attribute name="startRes" type="xs:int" />
                                                <xs:attribute name="startSeq" type="xs:int" />
                                                <xs:attribute name="fontName" type="xs:string" />
                                                <xs:attribute name="fontSize" type="xs:int" />
                                                                </xs:documentation>
                                                        </xs:annotation>
                                                </xs:attribute>
+                                               <xs:attribute name="complementId" type="xs:string"
+                                                       use="optional">
+                                                       <xs:annotation>
+                                                               <xs:documentation>
+                                                                       The viewport id of this viewport's (cdna/protein) coding complement, if any
+                                                               </xs:documentation>
+                                                       </xs:annotation>
+                                               </xs:attribute>
                                        </xs:complexType>
                                </xs:element>
                                <xs:element name="UserColours" minOccurs="0"
       <xs:attribute name="xpos" type="xs:int"/>
       <xs:attribute name="ypos" type="xs:int"/>
     </xs:attributeGroup>
+  <xs:complexType name="AnnotationColourScheme">
+       <xs:attribute name="aboveThreshold" type="xs:int" />
+       <xs:attribute name="annotation" type="xs:string" />
+       <xs:attribute name="minColour" type="xs:int" />
+       <xs:attribute name="maxColour" type="xs:int" />
+       <xs:attribute name="colourScheme" type="xs:string" />
+       <xs:attribute name="threshold" type="xs:float" />
+       <xs:attribute name="perSequence" type="xs:boolean" use="optional" />
+       <xs:attribute name="predefinedColours" type="xs:boolean"
+               use="optional" />
+  </xs:complexType>
+  
 </xs:schema>