apply version 2.7 copyright
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / StructureStateDescriptor.java
index 4729515..a01f2f5 100644 (file)
@@ -1,3 +1,20 @@
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, 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/>.
+ *******************************************************************************/
 /*
  * This class was automatically generated with 
  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
@@ -137,27 +154,22 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
             fieldValidator.setValidator(typeValidator);
         }
         desc.setValidator(fieldValidator);
-        //-- _xpos
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _viewId
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", org.exolab.castor.xml.NodeType.Attribute);
+        desc.setImmutable(true);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasXpos()) { return null; }
-                return new java.lang.Integer(target.getXpos());
+                return target.getViewId();
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
             {
                 try {
                     StructureState target = (StructureState) object;
-                    // if null, use delete method for optional primitives 
-                    if (value == null) {
-                        target.deleteXpos();
-                        return;
-                    }
-                    target.setXpos( ((java.lang.Integer) value).intValue());
+                    target.setViewId( (java.lang.String) value);
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -170,25 +182,24 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _xpos
+        //-- validation code for: _viewId
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+            org.exolab.castor.xml.validators.StringValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
             fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
+            typeValidator.setWhiteSpace("preserve");
         }
         desc.setValidator(fieldValidator);
-        //-- _ypos
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _alignwithAlignPanel
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasYpos()) { return null; }
-                return new java.lang.Integer(target.getYpos());
+                if (!target.hasAlignwithAlignPanel()) { return null; }
+                return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
@@ -197,10 +208,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
                     StructureState target = (StructureState) object;
                     // if null, use delete method for optional primitives 
                     if (value == null) {
-                        target.deleteYpos();
+                        target.deleteAlignwithAlignPanel();
                         return;
                     }
-                    target.setYpos( ((java.lang.Integer) value).intValue());
+                    target.setAlignwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -213,25 +224,23 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _ypos
+        //-- validation code for: _alignwithAlignPanel
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
             fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
-        //-- _width
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _colourwithAlignPanel
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasWidth()) { return null; }
-                return new java.lang.Integer(target.getWidth());
+                if (!target.hasColourwithAlignPanel()) { return null; }
+                return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
@@ -240,10 +249,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
                     StructureState target = (StructureState) object;
                     // if null, use delete method for optional primitives 
                     if (value == null) {
-                        target.deleteWidth();
+                        target.deleteColourwithAlignPanel();
                         return;
                     }
-                    target.setWidth( ((java.lang.Integer) value).intValue());
+                    target.setColourwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -256,25 +265,23 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _width
+        //-- validation code for: _colourwithAlignPanel
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
             fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
-        //-- _height
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _colourByJmol
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasHeight()) { return null; }
-                return new java.lang.Integer(target.getHeight());
+                if (!target.hasColourByJmol()) { return null; }
+                return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
@@ -283,10 +290,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
                     StructureState target = (StructureState) object;
                     // if null, use delete method for optional primitives 
                     if (value == null) {
-                        target.deleteHeight();
+                        target.deleteColourByJmol();
                         return;
                     }
-                    target.setHeight( ((java.lang.Integer) value).intValue());
+                    target.setColourByJmol( ((java.lang.Boolean) value).booleanValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -299,32 +306,35 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _height
+        //-- validation code for: _colourByJmol
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.IntValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
             fieldValidator.setValidator(typeValidator);
-            typeValidator.setMinInclusive(-2147483648);
-            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
-        //-- _viewId
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", org.exolab.castor.xml.NodeType.Attribute);
-        desc.setImmutable(true);
+        //-- _width
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                return target.getViewId();
+                if (!target.hasWidth()) { return null; }
+                return new java.lang.Integer(target.getWidth());
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
             {
                 try {
                     StructureState target = (StructureState) object;
-                    target.setViewId( (java.lang.String) value);
+                    // if null, use delete method for optional primitives 
+                    if (value == null) {
+                        target.deleteWidth();
+                        return;
+                    }
+                    target.setWidth( ((java.lang.Integer) value).intValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -337,24 +347,25 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _viewId
+        //-- validation code for: _width
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.StringValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+            org.exolab.castor.xml.validators.IntValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
             fieldValidator.setValidator(typeValidator);
-            typeValidator.setWhiteSpace("preserve");
+            typeValidator.setMinInclusive(-2147483648);
+            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
-        //-- _alignwithAlignPanel
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _height
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasAlignwithAlignPanel()) { return null; }
-                return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+                if (!target.hasHeight()) { return null; }
+                return new java.lang.Integer(target.getHeight());
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
@@ -363,10 +374,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
                     StructureState target = (StructureState) object;
                     // if null, use delete method for optional primitives 
                     if (value == null) {
-                        target.deleteAlignwithAlignPanel();
+                        target.deleteHeight();
                         return;
                     }
-                    target.setAlignwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
+                    target.setHeight( ((java.lang.Integer) value).intValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -379,23 +390,25 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _alignwithAlignPanel
+        //-- validation code for: _height
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+            org.exolab.castor.xml.validators.IntValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
             fieldValidator.setValidator(typeValidator);
+            typeValidator.setMinInclusive(-2147483648);
+            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
-        //-- _colourwithAlignPanel
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _xpos
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasColourwithAlignPanel()) { return null; }
-                return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+                if (!target.hasXpos()) { return null; }
+                return new java.lang.Integer(target.getXpos());
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
@@ -404,10 +417,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
                     StructureState target = (StructureState) object;
                     // if null, use delete method for optional primitives 
                     if (value == null) {
-                        target.deleteColourwithAlignPanel();
+                        target.deleteXpos();
                         return;
                     }
-                    target.setColourwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
+                    target.setXpos( ((java.lang.Integer) value).intValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -420,23 +433,25 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _colourwithAlignPanel
+        //-- validation code for: _xpos
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+            org.exolab.castor.xml.validators.IntValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
             fieldValidator.setValidator(typeValidator);
+            typeValidator.setMinInclusive(-2147483648);
+            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
-        //-- _colourByJmol
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute);
+        //-- _ypos
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
         handler = new org.exolab.castor.xml.XMLFieldHandler() {
             public java.lang.Object getValue( java.lang.Object object ) 
                 throws IllegalStateException
             {
                 StructureState target = (StructureState) object;
-                if (!target.hasColourByJmol()) { return null; }
-                return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+                if (!target.hasYpos()) { return null; }
+                return new java.lang.Integer(target.getYpos());
             }
             public void setValue( java.lang.Object object, java.lang.Object value) 
                 throws IllegalStateException, IllegalArgumentException
@@ -445,10 +460,10 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
                     StructureState target = (StructureState) object;
                     // if null, use delete method for optional primitives 
                     if (value == null) {
-                        target.deleteColourByJmol();
+                        target.deleteYpos();
                         return;
                     }
-                    target.setColourByJmol( ((java.lang.Boolean) value).booleanValue());
+                    target.setYpos( ((java.lang.Integer) value).intValue());
                 } catch (java.lang.Exception ex) {
                     throw new IllegalStateException(ex.toString());
                 }
@@ -461,12 +476,14 @@ public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClas
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
-        //-- validation code for: _colourByJmol
+        //-- validation code for: _ypos
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         { //-- local scope
-            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
-            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+            org.exolab.castor.xml.validators.IntValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
             fieldValidator.setValidator(typeValidator);
+            typeValidator.setMinInclusive(-2147483648);
+            typeValidator.setMaxInclusive(2147483647);
         }
         desc.setValidator(fieldValidator);
         //-- initialize element descriptors