Save graph threshold and annotation colours
authoramwaterhouse <Andrew Waterhouse>
Wed, 5 Apr 2006 15:52:01 +0000 (15:52 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 5 Apr 2006 15:52:01 +0000 (15:52 +0000)
schemas/jalview.xsd
schemas/vamsas.xsd
src/jalview/schemabinding/version2/Annotation.java
src/jalview/schemabinding/version2/AnnotationColours.java [new file with mode: 0755]
src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java [new file with mode: 0755]
src/jalview/schemabinding/version2/AnnotationDescriptor.java
src/jalview/schemabinding/version2/ThresholdLine.java [new file with mode: 0755]
src/jalview/schemabinding/version2/ThresholdLineDescriptor.java [new file with mode: 0755]
src/jalview/schemabinding/version2/Viewport.java
src/jalview/schemabinding/version2/ViewportDescriptor.java

index 2bedcd6..cc7ffdc 100755 (executable)
@@ -1,12 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"\r
-                                xmlns:vamsas="www.vamsas.ac.uk/jalview/version2"\r
-                                xmlns:jalview="www.jalview.org/colours"\r
-                                xmlns:jv="www.jalview.org" \r
-                                targetNamespace="www.jalview.org" elementFormDefault="qualified" attributeFormDefault="unqualified">\r
-                                \r
-       <xs:import schemaLocation="vamsas.xsd" namespace="www.vamsas.ac.uk/jalview/version2"/>\r
-       <xs:import schemaLocation="JalviewUserColours.xsd" namespace="www.jalview.org/colours"/>\r
+<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">\r
+       <xs:import namespace="www.vamsas.ac.uk/jalview/version2" schemaLocation="vamsas.xsd"/>\r
+       <xs:import namespace="www.jalview.org/colours" schemaLocation="JalviewUserColours.xsd"/>\r
        <xs:complexType name="JalviewModel">\r
                <xs:sequence>\r
                        <xs:element name="creationDate" type="xs:dateTime"/>\r
                                <xs:element name="JSeq" maxOccurs="unbounded">\r
                                        <xs:complexType>\r
                                                <xs:sequence>\r
-                                                        <xs:element name="features" type="jv:feature" minOccurs="0" maxOccurs="unbounded"/>\r
-                                                        <xs:element name="pdbids" type="jv:pdbentry" minOccurs="0" maxOccurs="unbounded"/>\r
-                                             </xs:sequence>\r
-                                             \r
-                                                   <xs:attribute name="colour" type="xs:int" use="optional"/>\r
-                                                       <xs:attribute name="start" type="xs:int" use="required"/>\r
-                                                       <xs:attribute name="end" type="xs:int" use="required"/>\r
-                                                       <xs:attribute name="id" type="xs:int" use="required"/>\r
-                                               </xs:complexType>\r
+                                                       <xs:element name="features" type="jv:feature" minOccurs="0" maxOccurs="unbounded"/>\r
+                                                       <xs:element name="pdbids" type="jv:pdbentry" minOccurs="0" maxOccurs="unbounded"/>\r
+                                               </xs:sequence>\r
+                                               <xs:attribute name="colour" type="xs:int" use="optional"/>\r
+                                               <xs:attribute name="start" type="xs:int" use="required"/>\r
+                                               <xs:attribute name="end" type="xs:int" use="required"/>\r
+                                               <xs:attribute name="id" type="xs:int" use="required"/>\r
+                                       </xs:complexType>\r
                                </xs:element>\r
                                <xs:element name="JGroup" minOccurs="0" maxOccurs="unbounded">\r
                                        <xs:complexType>\r
-                                               <xs:sequence minOccurs="1">\r
-                                                       <xs:element name="seq" maxOccurs="unbounded" type="xs:int"/>\r
+                                               <xs:sequence>\r
+                                                       <xs:element name="seq" type="xs:int" maxOccurs="unbounded"/>\r
                                                </xs:sequence>\r
                                                <xs:attribute name="start" type="xs:int"/>\r
                                                <xs:attribute name="end" type="xs:int"/>\r
                                </xs:element>\r
                                <xs:element name="Viewport" maxOccurs="unbounded">\r
                                        <xs:complexType>\r
+                                               <xs:sequence>\r
+                                                       <xs:element name="AnnotationColours" minOccurs="0">\r
+                                                               <xs:complexType>\r
+                                                                       <xs:attribute name="aboveThreshold" type="xs:int"/>\r
+                                                                       <xs:attribute name="annotation" type="xs:string"/>\r
+                                                                       <xs:attribute name="minColour" type="xs:int"/>\r
+                                                                       <xs:attribute name="maxColour" type="xs:int"/>\r
+                                                                       <xs:attribute name="colourScheme" type="xs:string"/>\r
+                                                                       <xs:attribute name="threshold" type="xs:float"/>\r
+                                                               </xs:complexType>\r
+                                                       </xs:element>\r
+                                               </xs:sequence>\r
                                                <xs:attribute name="conservationSelected" type="xs:boolean"/>\r
                                                <xs:attribute name="pidSelected" type="xs:boolean"/>\r
                                                <xs:attribute name="bgColour" type="xs:string"/>\r
@@ -75,7 +81,7 @@
                                </xs:element>\r
                                <xs:element name="UserColours" minOccurs="0" maxOccurs="unbounded">\r
                                        <xs:complexType>\r
-                                               <xs:sequence minOccurs="1">\r
+                                               <xs:sequence>\r
                                                        <xs:element name="UserColourScheme" type="jalview:JalviewUserColours"/>\r
                                                </xs:sequence>\r
                                                <xs:attribute name="id" type="xs:string"/>\r
@@ -83,7 +89,7 @@
                                </xs:element>\r
                                <xs:element name="tree" minOccurs="0" maxOccurs="unbounded">\r
                                        <xs:complexType>\r
-                                               <xs:sequence minOccurs="0" maxOccurs="1">\r
+                                               <xs:sequence minOccurs="0">\r
                                                        <xs:element name="title" type="xs:string"/>\r
                                                        <xs:element name="newick" type="xs:string"/>\r
                                                </xs:sequence>\r
                                                <xs:attribute name="currentTree" type="xs:boolean"/>\r
                                        </xs:complexType>\r
                                </xs:element>\r
-                               \r
-                               <xs:element name="FeatureSettings" minOccurs="0" maxOccurs="1">\r
-                                               <xs:complexType>\r
-                               <xs:sequence>\r
-                                       <xs:element name="setting" minOccurs="0" maxOccurs="unbounded">\r
-                                               <xs:complexType>\r
-                                                       <xs:attribute name="type" type="xs:string" use="required"/>\r
-                                                       <xs:attribute name="colour" type="xs:int" use="required"/>\r
-                                                       <xs:attribute name="display" type="xs:boolean" use="required"/>\r
-                                               </xs:complexType>\r
-                                       </xs:element>\r
-                               </xs:sequence>\r
-                               </xs:complexType>\r
+                               <xs:element name="FeatureSettings" minOccurs="0">\r
+                                       <xs:complexType>\r
+                                               <xs:sequence>\r
+                                                       <xs:element name="setting" minOccurs="0" maxOccurs="unbounded">\r
+                                                               <xs:complexType>\r
+                                                                       <xs:attribute name="type" type="xs:string" use="required"/>\r
+                                                                       <xs:attribute name="colour" type="xs:int" use="required"/>\r
+                                                                       <xs:attribute name="display" type="xs:boolean" use="required"/>\r
+                                                               </xs:complexType>\r
+                                                       </xs:element>\r
+                                               </xs:sequence>\r
+                                       </xs:complexType>\r
                                </xs:element>\r
-                               \r
                        </xs:sequence>\r
                </xs:sequence>\r
        </xs:complexType>\r
-       \r
        <xs:complexType name="feature">\r
                <xs:attribute name="begin" type="xs:int" use="required"/>\r
                <xs:attribute name="end" type="xs:int" use="required"/>\r
                <xs:attribute name="status" type="xs:string" use="optional"/>\r
                <xs:attribute name="featureGroup" type="xs:string" use="optional"/>\r
        </xs:complexType>\r
-               \r
        <xs:complexType name="pdbentry">\r
                <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
                        <xs:element name="property" minOccurs="0" maxOccurs="unbounded">\r
                <xs:attribute name="id" type="xs:string" use="required"/>\r
                <xs:attribute name="type" type="xs:string" use="optional"/>\r
        </xs:complexType>\r
-       \r
 </xs:schema>\r
index a7f731a..1a4e57e 100755 (executable)
                                                                        <xs:element ref="vamsas:annotationElement" maxOccurs="unbounded"/>\r
                                                                        <xs:element name="label" type="xs:string"/>\r
                                                                        <xs:element name="description" type="xs:string"/>\r
+                                                                       <xs:element name="thresholdLine" minOccurs="0">\r
+                                                                               <xs:complexType>\r
+                                                                                       <xs:attribute name="label" type="xs:string"/>\r
+                                                                                       <xs:attribute name="value" type="xs:float"/>\r
+                                                                                       <xs:attribute name="colour" type="xs:int"/>\r
+                                                                               </xs:complexType>\r
+                                                                       </xs:element>\r
                                                                </xs:sequence>\r
                                                                <xs:attribute name="graph" type="xs:boolean" use="required"/>\r
                                                                <xs:attribute name="graphType" type="xs:int" use="optional"/>\r
index 54811be..6003b86 100755 (executable)
@@ -70,6 +70,11 @@ public class Annotation implements java.io.Serializable {
      */\r
     private java.lang.String _description;\r
 \r
+    /**\r
+     * Field _thresholdLine\r
+     */\r
+    private jalview.schemabinding.version2.ThresholdLine _thresholdLine;\r
+\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -235,6 +240,17 @@ public class Annotation implements java.io.Serializable {
     } //-- java.lang.String getLabel() \r
 \r
     /**\r
+     * Returns the value of field 'thresholdLine'.\r
+     * \r
+     * @return ThresholdLine\r
+     * @return the value of field 'thresholdLine'.\r
+     */\r
+    public jalview.schemabinding.version2.ThresholdLine getThresholdLine()\r
+    {\r
+        return this._thresholdLine;\r
+    } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine() \r
+\r
+    /**\r
      * Method hasGraph\r
      * \r
      * \r
@@ -405,6 +421,16 @@ public class Annotation implements java.io.Serializable {
     } //-- void setLabel(java.lang.String) \r
 \r
     /**\r
+     * Sets the value of field 'thresholdLine'.\r
+     * \r
+     * @param thresholdLine the value of field 'thresholdLine'.\r
+     */\r
+    public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine)\r
+    {\r
+        this._thresholdLine = thresholdLine;\r
+    } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine) \r
+\r
+    /**\r
      * Method unmarshal\r
      * \r
      * \r
diff --git a/src/jalview/schemabinding/version2/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java
new file mode 100755 (executable)
index 0000000..b2af2c4
--- /dev/null
@@ -0,0 +1,385 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.schemabinding.version2;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class AnnotationColours.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AnnotationColours implements java.io.Serializable {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _aboveThreshold\r
+     */\r
+    private int _aboveThreshold;\r
+\r
+    /**\r
+     * keeps track of state for field: _aboveThreshold\r
+     */\r
+    private boolean _has_aboveThreshold;\r
+\r
+    /**\r
+     * Field _annotation\r
+     */\r
+    private java.lang.String _annotation;\r
+\r
+    /**\r
+     * Field _minColour\r
+     */\r
+    private int _minColour;\r
+\r
+    /**\r
+     * keeps track of state for field: _minColour\r
+     */\r
+    private boolean _has_minColour;\r
+\r
+    /**\r
+     * Field _maxColour\r
+     */\r
+    private int _maxColour;\r
+\r
+    /**\r
+     * keeps track of state for field: _maxColour\r
+     */\r
+    private boolean _has_maxColour;\r
+\r
+    /**\r
+     * Field _colourScheme\r
+     */\r
+    private java.lang.String _colourScheme;\r
+\r
+    /**\r
+     * Field _threshold\r
+     */\r
+    private float _threshold;\r
+\r
+    /**\r
+     * keeps track of state for field: _threshold\r
+     */\r
+    private boolean _has_threshold;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public AnnotationColours() {\r
+        super();\r
+    } //-- jalview.schemabinding.version2.AnnotationColours()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method deleteAboveThreshold\r
+     * \r
+     */\r
+    public void deleteAboveThreshold()\r
+    {\r
+        this._has_aboveThreshold= false;\r
+    } //-- void deleteAboveThreshold() \r
+\r
+    /**\r
+     * Method deleteMaxColour\r
+     * \r
+     */\r
+    public void deleteMaxColour()\r
+    {\r
+        this._has_maxColour= false;\r
+    } //-- void deleteMaxColour() \r
+\r
+    /**\r
+     * Method deleteMinColour\r
+     * \r
+     */\r
+    public void deleteMinColour()\r
+    {\r
+        this._has_minColour= false;\r
+    } //-- void deleteMinColour() \r
+\r
+    /**\r
+     * Method deleteThreshold\r
+     * \r
+     */\r
+    public void deleteThreshold()\r
+    {\r
+        this._has_threshold= false;\r
+    } //-- void deleteThreshold() \r
+\r
+    /**\r
+     * Returns the value of field 'aboveThreshold'.\r
+     * \r
+     * @return int\r
+     * @return the value of field 'aboveThreshold'.\r
+     */\r
+    public int getAboveThreshold()\r
+    {\r
+        return this._aboveThreshold;\r
+    } //-- int getAboveThreshold() \r
+\r
+    /**\r
+     * Returns the value of field 'annotation'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'annotation'.\r
+     */\r
+    public java.lang.String getAnnotation()\r
+    {\r
+        return this._annotation;\r
+    } //-- java.lang.String getAnnotation() \r
+\r
+    /**\r
+     * Returns the value of field 'colourScheme'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'colourScheme'.\r
+     */\r
+    public java.lang.String getColourScheme()\r
+    {\r
+        return this._colourScheme;\r
+    } //-- java.lang.String getColourScheme() \r
+\r
+    /**\r
+     * Returns the value of field 'maxColour'.\r
+     * \r
+     * @return int\r
+     * @return the value of field 'maxColour'.\r
+     */\r
+    public int getMaxColour()\r
+    {\r
+        return this._maxColour;\r
+    } //-- int getMaxColour() \r
+\r
+    /**\r
+     * Returns the value of field 'minColour'.\r
+     * \r
+     * @return int\r
+     * @return the value of field 'minColour'.\r
+     */\r
+    public int getMinColour()\r
+    {\r
+        return this._minColour;\r
+    } //-- int getMinColour() \r
+\r
+    /**\r
+     * Returns the value of field 'threshold'.\r
+     * \r
+     * @return float\r
+     * @return the value of field 'threshold'.\r
+     */\r
+    public float getThreshold()\r
+    {\r
+        return this._threshold;\r
+    } //-- float getThreshold() \r
+\r
+    /**\r
+     * Method hasAboveThreshold\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasAboveThreshold()\r
+    {\r
+        return this._has_aboveThreshold;\r
+    } //-- boolean hasAboveThreshold() \r
+\r
+    /**\r
+     * Method hasMaxColour\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasMaxColour()\r
+    {\r
+        return this._has_maxColour;\r
+    } //-- boolean hasMaxColour() \r
+\r
+    /**\r
+     * Method hasMinColour\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasMinColour()\r
+    {\r
+        return this._has_minColour;\r
+    } //-- boolean hasMinColour() \r
+\r
+    /**\r
+     * Method hasThreshold\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasThreshold()\r
+    {\r
+        return this._has_threshold;\r
+    } //-- boolean hasThreshold() \r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Sets the value of field 'aboveThreshold'.\r
+     * \r
+     * @param aboveThreshold the value of field 'aboveThreshold'.\r
+     */\r
+    public void setAboveThreshold(int aboveThreshold)\r
+    {\r
+        this._aboveThreshold = aboveThreshold;\r
+        this._has_aboveThreshold = true;\r
+    } //-- void setAboveThreshold(int) \r
+\r
+    /**\r
+     * Sets the value of field 'annotation'.\r
+     * \r
+     * @param annotation the value of field 'annotation'.\r
+     */\r
+    public void setAnnotation(java.lang.String annotation)\r
+    {\r
+        this._annotation = annotation;\r
+    } //-- void setAnnotation(java.lang.String) \r
+\r
+    /**\r
+     * Sets the value of field 'colourScheme'.\r
+     * \r
+     * @param colourScheme the value of field 'colourScheme'.\r
+     */\r
+    public void setColourScheme(java.lang.String colourScheme)\r
+    {\r
+        this._colourScheme = colourScheme;\r
+    } //-- void setColourScheme(java.lang.String) \r
+\r
+    /**\r
+     * Sets the value of field 'maxColour'.\r
+     * \r
+     * @param maxColour the value of field 'maxColour'.\r
+     */\r
+    public void setMaxColour(int maxColour)\r
+    {\r
+        this._maxColour = maxColour;\r
+        this._has_maxColour = true;\r
+    } //-- void setMaxColour(int) \r
+\r
+    /**\r
+     * Sets the value of field 'minColour'.\r
+     * \r
+     * @param minColour the value of field 'minColour'.\r
+     */\r
+    public void setMinColour(int minColour)\r
+    {\r
+        this._minColour = minColour;\r
+        this._has_minColour = true;\r
+    } //-- void setMinColour(int) \r
+\r
+    /**\r
+     * Sets the value of field 'threshold'.\r
+     * \r
+     * @param threshold the value of field 'threshold'.\r
+     */\r
+    public void setThreshold(float threshold)\r
+    {\r
+        this._threshold = threshold;\r
+        this._has_threshold = true;\r
+    } //-- void setThreshold(float) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
diff --git a/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java b/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java
new file mode 100755 (executable)
index 0000000..c3c06e6
--- /dev/null
@@ -0,0 +1,406 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.schemabinding.version2;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.mapping.AccessMode;\r
+import org.exolab.castor.xml.TypeValidator;\r
+import org.exolab.castor.xml.XMLFieldDescriptor;\r
+import org.exolab.castor.xml.validators.*;\r
+\r
+/**\r
+ * Class AnnotationColoursDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field nsPrefix\r
+     */\r
+    private java.lang.String nsPrefix;\r
+\r
+    /**\r
+     * Field nsURI\r
+     */\r
+    private java.lang.String nsURI;\r
+\r
+    /**\r
+     * Field xmlName\r
+     */\r
+    private java.lang.String xmlName;\r
+\r
+    /**\r
+     * Field identity\r
+     */\r
+    private org.exolab.castor.xml.XMLFieldDescriptor identity;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public AnnotationColoursDescriptor() {\r
+        super();\r
+        nsURI = "www.jalview.org";\r
+        xmlName = "AnnotationColours";\r
+        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
+        org.exolab.castor.xml.XMLFieldHandler              handler        = null;\r
+        org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
+        //-- initialize attribute descriptors\r
+        \r
+        //-- _aboveThreshold\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                AnnotationColours target = (AnnotationColours) object;\r
+                if(!target.hasAboveThreshold())\r
+                    return null;\r
+                return new java.lang.Integer(target.getAboveThreshold());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    AnnotationColours target = (AnnotationColours) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteAboveThreshold();\r
+                        return;\r
+                    }\r
+                    target.setAboveThreshold( ((java.lang.Integer)value).intValue());\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _aboveThreshold\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            IntegerValidator typeValidator= new IntegerValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _annotation\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", org.exolab.castor.xml.NodeType.Attribute);\r
+        desc.setImmutable(true);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                AnnotationColours target = (AnnotationColours) object;\r
+                return target.getAnnotation();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    AnnotationColours target = (AnnotationColours) object;\r
+                    target.setAnnotation( (java.lang.String) value);\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _annotation\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            StringValidator typeValidator = new StringValidator();\r
+            typeValidator.setWhiteSpace("preserve");\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _minColour\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                AnnotationColours target = (AnnotationColours) object;\r
+                if(!target.hasMinColour())\r
+                    return null;\r
+                return new java.lang.Integer(target.getMinColour());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    AnnotationColours target = (AnnotationColours) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteMinColour();\r
+                        return;\r
+                    }\r
+                    target.setMinColour( ((java.lang.Integer)value).intValue());\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _minColour\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            IntegerValidator typeValidator= new IntegerValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _maxColour\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                AnnotationColours target = (AnnotationColours) object;\r
+                if(!target.hasMaxColour())\r
+                    return null;\r
+                return new java.lang.Integer(target.getMaxColour());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    AnnotationColours target = (AnnotationColours) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteMaxColour();\r
+                        return;\r
+                    }\r
+                    target.setMaxColour( ((java.lang.Integer)value).intValue());\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _maxColour\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            IntegerValidator typeValidator= new IntegerValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _colourScheme\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", org.exolab.castor.xml.NodeType.Attribute);\r
+        desc.setImmutable(true);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                AnnotationColours target = (AnnotationColours) object;\r
+                return target.getColourScheme();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    AnnotationColours target = (AnnotationColours) object;\r
+                    target.setColourScheme( (java.lang.String) value);\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _colourScheme\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            StringValidator typeValidator = new StringValidator();\r
+            typeValidator.setWhiteSpace("preserve");\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _threshold\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                AnnotationColours target = (AnnotationColours) object;\r
+                if(!target.hasThreshold())\r
+                    return null;\r
+                return new java.lang.Float(target.getThreshold());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    AnnotationColours target = (AnnotationColours) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteThreshold();\r
+                        return;\r
+                    }\r
+                    target.setThreshold( ((java.lang.Float)value).floatValue());\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _threshold\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            FloatValidator typeValidator = new FloatValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- initialize element descriptors\r
+        \r
+    } //-- jalview.schemabinding.version2.AnnotationColoursDescriptor()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method getAccessMode\r
+     * \r
+     * \r
+     * \r
+     * @return AccessMode\r
+     */\r
+    public org.exolab.castor.mapping.AccessMode getAccessMode()\r
+    {\r
+        return null;\r
+    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() \r
+\r
+    /**\r
+     * Method getExtends\r
+     * \r
+     * \r
+     * \r
+     * @return ClassDescriptor\r
+     */\r
+    public org.exolab.castor.mapping.ClassDescriptor getExtends()\r
+    {\r
+        return null;\r
+    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() \r
+\r
+    /**\r
+     * Method getIdentity\r
+     * \r
+     * \r
+     * \r
+     * @return FieldDescriptor\r
+     */\r
+    public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
+    {\r
+        return identity;\r
+    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() \r
+\r
+    /**\r
+     * Method getJavaClass\r
+     * \r
+     * \r
+     * \r
+     * @return Class\r
+     */\r
+    public java.lang.Class getJavaClass()\r
+    {\r
+        return jalview.schemabinding.version2.AnnotationColours.class;\r
+    } //-- java.lang.Class getJavaClass() \r
+\r
+    /**\r
+     * Method getNameSpacePrefix\r
+     * \r
+     * \r
+     * \r
+     * @return String\r
+     */\r
+    public java.lang.String getNameSpacePrefix()\r
+    {\r
+        return nsPrefix;\r
+    } //-- java.lang.String getNameSpacePrefix() \r
+\r
+    /**\r
+     * Method getNameSpaceURI\r
+     * \r
+     * \r
+     * \r
+     * @return String\r
+     */\r
+    public java.lang.String getNameSpaceURI()\r
+    {\r
+        return nsURI;\r
+    } //-- java.lang.String getNameSpaceURI() \r
+\r
+    /**\r
+     * Method getValidator\r
+     * \r
+     * \r
+     * \r
+     * @return TypeValidator\r
+     */\r
+    public org.exolab.castor.xml.TypeValidator getValidator()\r
+    {\r
+        return this;\r
+    } //-- org.exolab.castor.xml.TypeValidator getValidator() \r
+\r
+    /**\r
+     * Method getXMLName\r
+     * \r
+     * \r
+     * \r
+     * @return String\r
+     */\r
+    public java.lang.String getXMLName()\r
+    {\r
+        return xmlName;\r
+    } //-- java.lang.String getXMLName() \r
+\r
+}\r
index d60b680..9e34a53 100755 (executable)
@@ -265,6 +265,40 @@ public class AnnotationDescriptor extends org.exolab.castor.xml.util.XMLClassDes
             fieldValidator.setValidator(typeValidator);\r
         }\r
         desc.setValidator(fieldValidator);\r
+        //-- _thresholdLine\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.ThresholdLine.class, "_thresholdLine", "thresholdLine", org.exolab.castor.xml.NodeType.Element);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                Annotation target = (Annotation) object;\r
+                return target.getThresholdLine();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    Annotation target = (Annotation) object;\r
+                    target.setThresholdLine( (jalview.schemabinding.version2.ThresholdLine) value);\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return new jalview.schemabinding.version2.ThresholdLine();\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");\r
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _thresholdLine\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+        }\r
+        desc.setValidator(fieldValidator);\r
     } //-- jalview.schemabinding.version2.AnnotationDescriptor()\r
 \r
 \r
diff --git a/src/jalview/schemabinding/version2/ThresholdLine.java b/src/jalview/schemabinding/version2/ThresholdLine.java
new file mode 100755 (executable)
index 0000000..85854c1
--- /dev/null
@@ -0,0 +1,253 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.schemabinding.version2;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class ThresholdLine.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ThresholdLine implements java.io.Serializable {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _label\r
+     */\r
+    private java.lang.String _label;\r
+\r
+    /**\r
+     * Field _value\r
+     */\r
+    private float _value;\r
+\r
+    /**\r
+     * keeps track of state for field: _value\r
+     */\r
+    private boolean _has_value;\r
+\r
+    /**\r
+     * Field _colour\r
+     */\r
+    private int _colour;\r
+\r
+    /**\r
+     * keeps track of state for field: _colour\r
+     */\r
+    private boolean _has_colour;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public ThresholdLine() {\r
+        super();\r
+    } //-- jalview.schemabinding.version2.ThresholdLine()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method deleteColour\r
+     * \r
+     */\r
+    public void deleteColour()\r
+    {\r
+        this._has_colour= false;\r
+    } //-- void deleteColour() \r
+\r
+    /**\r
+     * Method deleteValue\r
+     * \r
+     */\r
+    public void deleteValue()\r
+    {\r
+        this._has_value= false;\r
+    } //-- void deleteValue() \r
+\r
+    /**\r
+     * Returns the value of field 'colour'.\r
+     * \r
+     * @return int\r
+     * @return the value of field 'colour'.\r
+     */\r
+    public int getColour()\r
+    {\r
+        return this._colour;\r
+    } //-- int getColour() \r
+\r
+    /**\r
+     * Returns the value of field 'label'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'label'.\r
+     */\r
+    public java.lang.String getLabel()\r
+    {\r
+        return this._label;\r
+    } //-- java.lang.String getLabel() \r
+\r
+    /**\r
+     * Returns the value of field 'value'.\r
+     * \r
+     * @return float\r
+     * @return the value of field 'value'.\r
+     */\r
+    public float getValue()\r
+    {\r
+        return this._value;\r
+    } //-- float getValue() \r
+\r
+    /**\r
+     * Method hasColour\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasColour()\r
+    {\r
+        return this._has_colour;\r
+    } //-- boolean hasColour() \r
+\r
+    /**\r
+     * Method hasValue\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean hasValue()\r
+    {\r
+        return this._has_value;\r
+    } //-- boolean hasValue() \r
+\r
+    /**\r
+     * Method isValid\r
+     * \r
+     * \r
+     * \r
+     * @return boolean\r
+     */\r
+    public boolean isValid()\r
+    {\r
+        try {\r
+            validate();\r
+        }\r
+        catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    } //-- boolean isValid() \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param out\r
+     */\r
+    public void marshal(java.io.Writer out)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, out);\r
+    } //-- void marshal(java.io.Writer) \r
+\r
+    /**\r
+     * Method marshal\r
+     * \r
+     * \r
+     * \r
+     * @param handler\r
+     */\r
+    public void marshal(org.xml.sax.ContentHandler handler)\r
+        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        \r
+        Marshaller.marshal(this, handler);\r
+    } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+    /**\r
+     * Sets the value of field 'colour'.\r
+     * \r
+     * @param colour the value of field 'colour'.\r
+     */\r
+    public void setColour(int colour)\r
+    {\r
+        this._colour = colour;\r
+        this._has_colour = true;\r
+    } //-- void setColour(int) \r
+\r
+    /**\r
+     * Sets the value of field 'label'.\r
+     * \r
+     * @param label the value of field 'label'.\r
+     */\r
+    public void setLabel(java.lang.String label)\r
+    {\r
+        this._label = label;\r
+    } //-- void setLabel(java.lang.String) \r
+\r
+    /**\r
+     * Sets the value of field 'value'.\r
+     * \r
+     * @param value the value of field 'value'.\r
+     */\r
+    public void setValue(float value)\r
+    {\r
+        this._value = value;\r
+        this._has_value = true;\r
+    } //-- void setValue(float) \r
+\r
+    /**\r
+     * Method unmarshal\r
+     * \r
+     * \r
+     * \r
+     * @param reader\r
+     * @return Object\r
+     */\r
+    public static java.lang.Object unmarshal(java.io.Reader reader)\r
+        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+    {\r
+        return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader);\r
+    } //-- java.lang.Object unmarshal(java.io.Reader) \r
+\r
+    /**\r
+     * Method validate\r
+     * \r
+     */\r
+    public void validate()\r
+        throws org.exolab.castor.xml.ValidationException\r
+    {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    } //-- void validate() \r
+\r
+}\r
diff --git a/src/jalview/schemabinding/version2/ThresholdLineDescriptor.java b/src/jalview/schemabinding/version2/ThresholdLineDescriptor.java
new file mode 100755 (executable)
index 0000000..9241003
--- /dev/null
@@ -0,0 +1,288 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package jalview.schemabinding.version2;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.mapping.AccessMode;\r
+import org.exolab.castor.xml.TypeValidator;\r
+import org.exolab.castor.xml.XMLFieldDescriptor;\r
+import org.exolab.castor.xml.validators.*;\r
+\r
+/**\r
+ * Class ThresholdLineDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ThresholdLineDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field nsPrefix\r
+     */\r
+    private java.lang.String nsPrefix;\r
+\r
+    /**\r
+     * Field nsURI\r
+     */\r
+    private java.lang.String nsURI;\r
+\r
+    /**\r
+     * Field xmlName\r
+     */\r
+    private java.lang.String xmlName;\r
+\r
+    /**\r
+     * Field identity\r
+     */\r
+    private org.exolab.castor.xml.XMLFieldDescriptor identity;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public ThresholdLineDescriptor() {\r
+        super();\r
+        nsURI = "www.vamsas.ac.uk/jalview/version2";\r
+        xmlName = "thresholdLine";\r
+        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
+        org.exolab.castor.xml.XMLFieldHandler              handler        = null;\r
+        org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
+        //-- initialize attribute descriptors\r
+        \r
+        //-- _label\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Attribute);\r
+        desc.setImmutable(true);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                ThresholdLine target = (ThresholdLine) object;\r
+                return target.getLabel();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    ThresholdLine target = (ThresholdLine) object;\r
+                    target.setLabel( (java.lang.String) value);\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _label\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            StringValidator typeValidator = new StringValidator();\r
+            typeValidator.setWhiteSpace("preserve");\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _value\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                ThresholdLine target = (ThresholdLine) object;\r
+                if(!target.hasValue())\r
+                    return null;\r
+                return new java.lang.Float(target.getValue());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    ThresholdLine target = (ThresholdLine) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteValue();\r
+                        return;\r
+                    }\r
+                    target.setValue( ((java.lang.Float)value).floatValue());\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _value\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            FloatValidator typeValidator = new FloatValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _colour\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                ThresholdLine target = (ThresholdLine) object;\r
+                if(!target.hasColour())\r
+                    return null;\r
+                return new java.lang.Integer(target.getColour());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    ThresholdLine target = (ThresholdLine) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteColour();\r
+                        return;\r
+                    }\r
+                    target.setColour( ((java.lang.Integer)value).intValue());\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return null;\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _colour\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            IntegerValidator typeValidator= new IntegerValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- initialize element descriptors\r
+        \r
+    } //-- jalview.schemabinding.version2.ThresholdLineDescriptor()\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method getAccessMode\r
+     * \r
+     * \r
+     * \r
+     * @return AccessMode\r
+     */\r
+    public org.exolab.castor.mapping.AccessMode getAccessMode()\r
+    {\r
+        return null;\r
+    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() \r
+\r
+    /**\r
+     * Method getExtends\r
+     * \r
+     * \r
+     * \r
+     * @return ClassDescriptor\r
+     */\r
+    public org.exolab.castor.mapping.ClassDescriptor getExtends()\r
+    {\r
+        return null;\r
+    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() \r
+\r
+    /**\r
+     * Method getIdentity\r
+     * \r
+     * \r
+     * \r
+     * @return FieldDescriptor\r
+     */\r
+    public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
+    {\r
+        return identity;\r
+    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() \r
+\r
+    /**\r
+     * Method getJavaClass\r
+     * \r
+     * \r
+     * \r
+     * @return Class\r
+     */\r
+    public java.lang.Class getJavaClass()\r
+    {\r
+        return jalview.schemabinding.version2.ThresholdLine.class;\r
+    } //-- java.lang.Class getJavaClass() \r
+\r
+    /**\r
+     * Method getNameSpacePrefix\r
+     * \r
+     * \r
+     * \r
+     * @return String\r
+     */\r
+    public java.lang.String getNameSpacePrefix()\r
+    {\r
+        return nsPrefix;\r
+    } //-- java.lang.String getNameSpacePrefix() \r
+\r
+    /**\r
+     * Method getNameSpaceURI\r
+     * \r
+     * \r
+     * \r
+     * @return String\r
+     */\r
+    public java.lang.String getNameSpaceURI()\r
+    {\r
+        return nsURI;\r
+    } //-- java.lang.String getNameSpaceURI() \r
+\r
+    /**\r
+     * Method getValidator\r
+     * \r
+     * \r
+     * \r
+     * @return TypeValidator\r
+     */\r
+    public org.exolab.castor.xml.TypeValidator getValidator()\r
+    {\r
+        return this;\r
+    } //-- org.exolab.castor.xml.TypeValidator getValidator() \r
+\r
+    /**\r
+     * Method getXMLName\r
+     * \r
+     * \r
+     * \r
+     * @return String\r
+     */\r
+    public java.lang.String getXMLName()\r
+    {\r
+        return xmlName;\r
+    } //-- java.lang.String getXMLName() \r
+\r
+}\r
index 4e6747e..543c110 100755 (executable)
@@ -278,6 +278,11 @@ public class Viewport implements java.io.Serializable {
      */\r
     private boolean _has_fontStyle;\r
 \r
+    /**\r
+     * Field _annotationColours\r
+     */\r
+    private jalview.schemabinding.version2.AnnotationColours _annotationColours;\r
+\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -500,6 +505,17 @@ public class Viewport implements java.io.Serializable {
     } //-- void deleteYpos() \r
 \r
     /**\r
+     * Returns the value of field 'annotationColours'.\r
+     * \r
+     * @return AnnotationColours\r
+     * @return the value of field 'annotationColours'.\r
+     */\r
+    public jalview.schemabinding.version2.AnnotationColours getAnnotationColours()\r
+    {\r
+        return this._annotationColours;\r
+    } //-- jalview.schemabinding.version2.AnnotationColours getAnnotationColours() \r
+\r
+    /**\r
      * Returns the value of field 'bgColour'.\r
      * \r
      * @return String\r
@@ -1108,6 +1124,17 @@ public class Viewport implements java.io.Serializable {
     } //-- void marshal(org.xml.sax.ContentHandler) \r
 \r
     /**\r
+     * Sets the value of field 'annotationColours'.\r
+     * \r
+     * @param annotationColours the value of field\r
+     * 'annotationColours'.\r
+     */\r
+    public void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours annotationColours)\r
+    {\r
+        this._annotationColours = annotationColours;\r
+    } //-- void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours) \r
+\r
+    /**\r
      * Sets the value of field 'bgColour'.\r
      * \r
      * @param bgColour the value of field 'bgColour'.\r
index 66a3d77..02e9be9 100755 (executable)
@@ -57,6 +57,9 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
         super();\r
         nsURI = "www.jalview.org";\r
         xmlName = "Viewport";\r
+        \r
+        //-- set grouping compositor\r
+        setCompositorAsSequence();\r
         org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
         org.exolab.castor.xml.XMLFieldHandler              handler        = null;\r
         org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
@@ -1115,6 +1118,40 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
         desc.setValidator(fieldValidator);\r
         //-- initialize element descriptors\r
         \r
+        //-- _annotationColours\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationColours.class, "_annotationColours", "AnnotationColours", org.exolab.castor.xml.NodeType.Element);\r
+        handler = (new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                Viewport target = (Viewport) object;\r
+                return target.getAnnotationColours();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    Viewport target = (Viewport) object;\r
+                    target.setAnnotationColours( (jalview.schemabinding.version2.AnnotationColours) value);\r
+                }\r
+                catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance( java.lang.Object parent ) {\r
+                return new jalview.schemabinding.version2.AnnotationColours();\r
+            }\r
+        } );\r
+        desc.setHandler(handler);\r
+        desc.setNameSpaceURI("www.jalview.org");\r
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _annotationColours\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+        }\r
+        desc.setValidator(fieldValidator);\r
     } //-- jalview.schemabinding.version2.ViewportDescriptor()\r
 \r
 \r