extended Colour element with additional optional attributes for graduated colour
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SequenceDescriptor.java
index 9f2da96..85a5982 100644 (file)
@@ -1,10 +1,21 @@
 /*\r
- * This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
- * Schema.\r
- * $Id$\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1)\r
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * \r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
  */\r
-\r
 package jalview.schemabinding.version2.descriptors;\r
 \r
   //---------------------------------/\r
@@ -45,11 +56,6 @@ public class SequenceDescriptor extends jalview.schemabinding.version2.descripto
      */\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
@@ -69,6 +75,43 @@ public class SequenceDescriptor extends jalview.schemabinding.version2.descripto
         org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
         //-- initialize attribute descriptors\r
         \r
+        //-- _dsseqid\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dsseqid", "dsseqid", 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
+                Sequence target = (Sequence) object;\r
+                return target.getDsseqid();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    Sequence target = (Sequence) object;\r
+                    target.setDsseqid( (java.lang.String) value);\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
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _dsseqid\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+            typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+            typeValidator.setWhiteSpace("preserve");\r
+        }\r
+        desc.setValidator(fieldValidator);\r
         //-- initialize element descriptors\r
         \r
         //-- _DBRefList\r
@@ -138,10 +181,7 @@ public class SequenceDescriptor extends jalview.schemabinding.version2.descripto
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r