JAL-4020 class reformatting
[jalview.git] / schemas / jalview.xsd
index 258ee3b..1d2235e 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) 
-       * Copyright (C) 2015 The Jalview Authors * * This file is part of 
+<!-- * 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) 
        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. -->
+<!-- 
+       Java JAXB binding classes are generated by running command line tool xjc:
+           xjc schemas/jalview.xsd -d src -p jalview.xml.binding.jalview
+       Note this also generates code for included schemas
+-->
 <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"
@@ -21,6 +26,7 @@
                schemaLocation="JalviewUserColours.xsd" />
        <xs:import namespace="www.jalview.org/xml/wsparamset"
                schemaLocation="JalviewWsParamSet.xsd" />
+       <xs:element name="JalviewModel" type="jv:JalviewModel" />
        <xs:complexType name="JalviewModel">
                <xs:sequence>
                        <xs:element name="creationDate" type="xs:dateTime" />
                                                                </xs:documentation>
                                                        </xs:annotation>
                                                </xs:attribute>
+                                               <xs:attribute name="showComplementFeatures" type="xs:boolean" use="optional" default="false" />
+                                               <xs:attribute name="showComplementFeaturesOnTop" type="xs:boolean" use="optional" default="false" />
                                        </xs:complexType>
                                </xs:element>
                                <xs:element name="UserColours" minOccurs="0" maxOccurs="unbounded">
                                                        </xs:annotation>
                                                </xs:attribute>
                                                <xs:attributeGroup ref="jv:swingwindow" />
+                                               <xs:attribute name="linkToAllViews" use="optional" default="false" type="xs:boolean" />
+                                       </xs:complexType>
+                               </xs:element>
+                               <xs:element name="PcaViewer" minOccurs="0" maxOccurs="unbounded">
+                                       <xs:complexType>
+                                               <xs:sequence>
+                                                       <xs:element name="sequencePoint" minOccurs="1" maxOccurs="unbounded">
+                                                               <xs:complexType>
+                                                                       <xs:attribute name="sequenceRef" type="xs:string" />
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="axis" minOccurs="3" maxOccurs="3">
+                                                               <xs:annotation>
+                                                                       <xs:documentation>
+                                                                               endpoints of X, Y and Z axes in that order
+                                                                       </xs:documentation>
+                                                               </xs:annotation>
+                                                               <xs:complexType>
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="seqPointMin">
+                                                               <xs:complexType>
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="seqPointMax">
+                                                               <xs:complexType>
+                                                                       <xs:attributeGroup ref="jv:position" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <xs:element name="pcaData" type="jv:PcaDataType" />
+                                               </xs:sequence>
+                                               <xs:attribute name="title" type="xs:string" />
+                                               <xs:attribute name="scoreModelName" type="xs:string" />
+                                               <xs:attribute name="xDim" type="xs:int" />
+                                               <xs:attribute name="yDim" type="xs:int" />
+                                               <xs:attribute name="zDim" type="xs:int" />
+                                               <xs:attribute name="bgColour" type="xs:int" />
+                                               <xs:attribute name="scaleFactor" type="xs:float" />
+                                               <xs:attribute name="showLabels" type="xs:boolean" />
+                                               <xs:attribute name="linkToAllViews" type="xs:boolean" />
+                                               <xs:attributeGroup ref="jv:SimilarityParams" />
+                                               <xs:attributeGroup ref="jv:swingwindow" />
                                        </xs:complexType>
                                </xs:element>
                                <xs:element name="FeatureSettings" minOccurs="0">
                                                <xs:sequence>
                                                        <xs:element name="setting" minOccurs="0" maxOccurs="unbounded">
                                                                <xs:complexType>
+                                                                       <xs:sequence>
+                                                                           <xs:element name="attributeName" type="xs:string" minOccurs="0" maxOccurs="2">
+                                                                                       <xs:annotation>
+                                                                                               <xs:documentation>name of feature attribute to colour by, or attribute and sub-attribute</xs:documentation>
+                                                                                       </xs:annotation>
+                                                                           </xs:element> 
+                                                                               <xs:element name="matcherSet" minOccurs="0" type="jalview:FeatureMatcherSet">
+                                                                                       <xs:annotation>
+                                                                                               <xs:documentation>optional filter(s) applied to the feature type</xs:documentation>
+                                                                                       </xs:annotation>
+                                                                               </xs:element>
+                                                                       </xs:sequence>
                                                                        <xs:attribute name="type" type="xs:string" use="required" />
                                                                        <xs:attribute name="colour" type="xs:int" use="required" />
                                                                        <xs:attribute name="display" type="xs:boolean"
                                                                                        </xs:documentation>
                                                                                </xs:annotation>
                                                                        </xs:attribute>
+                                                                       <xs:attribute name="noValueColour" use="optional" type="jalview:NoValueColour" default="Min" />
                                                                        <xs:attribute name="threshold" type="xs:float"
                                                                                use="optional">
                                                                                <xs:annotation>
                        <xs:element name="otherData" minOccurs="0" maxOccurs="unbounded">
                                <xs:complexType>
                                        <xs:attribute name="key" type="xs:string" use="required" />
+                                       <xs:attribute name="key2" type="xs:string" use="optional">
+                                               <xs:annotation>
+                                                       <xs:documentation>key2 may be used for a sub-attribute of key</xs:documentation>
+                                               </xs:annotation>
+                                       </xs:attribute>
                                        <xs:attribute name="value" type="xs:string" use="required" />
                                </xs:complexType>
                        </xs:element>
                <xs:attribute name="predefinedColours" type="xs:boolean"
                        use="optional" />
        </xs:complexType>
-
+       <xs:attributeGroup name="SimilarityParams">
+               <xs:annotation>
+                       <xs:documentation>
+                               parameters that condition a similarity score calculation
+                       </xs:documentation>
+               </xs:annotation>
+               <xs:attribute name="includeGaps" type="xs:boolean" />
+               <xs:attribute name="matchGaps" type="xs:boolean" />
+               <xs:attribute name="includeGappedColumns" type="xs:boolean" />
+               <xs:attribute name="denominateByShortestLength" type="xs:boolean" />
+       </xs:attributeGroup>
+       <xs:attributeGroup name="position">
+               <xs:attribute name="xPos" type="xs:float" />
+               <xs:attribute name="yPos" type="xs:float" />
+               <xs:attribute name="zPos" type="xs:float" />
+       </xs:attributeGroup>
+       <xs:complexType name="PcaDataType">
+               <xs:annotation>
+                       <xs:documentation>
+                               The results of a PCA calculation
+                       </xs:documentation>
+               </xs:annotation>
+               <xs:sequence>
+                       <xs:element name="pairwiseMatrix" type="jv:DoubleMatrix" />
+                       <xs:element name="tridiagonalMatrix" type="jv:DoubleMatrix" />
+                       <xs:element name="eigenMatrix" type="jv:DoubleMatrix" />
+               </xs:sequence>
+       </xs:complexType>
+       <xs:complexType name="DoubleVector">
+               <xs:sequence>
+                       <xs:element name="v" type="xs:double" minOccurs="0" maxOccurs="unbounded" />
+               </xs:sequence>
+       </xs:complexType>
+       <xs:complexType name="DoubleMatrix">
+               <xs:sequence>
+                       <xs:element name="row" type="jv:DoubleVector" minOccurs="0" maxOccurs="unbounded" />
+                       <xs:element name="D" minOccurs="0" type="jv:DoubleVector" />
+                       <xs:element name="E" minOccurs="0" type="jv:DoubleVector" />
+               </xs:sequence>
+               <xs:attribute name="rows"  type="xs:int" />
+               <xs:attribute name="columns" type="xs:int" />
+       </xs:complexType>
 </xs:schema>