apply gpl development license
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / JSeqDescriptor.java
index 738d4fc..d13bf7c 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 (Development 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
@@ -193,24 +204,21 @@ public class JSeqDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
         }\r
         desc.setValidator(fieldValidator);\r
         //-- _id\r
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", 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
                 JSeq target = (JSeq) object;\r
-                if (!target.hasId()) { return null; }\r
-                return new java.lang.Integer(target.getId());\r
+                return target.getId();\r
             }\r
             public void setValue( java.lang.Object object, java.lang.Object value) \r
                 throws IllegalStateException, IllegalArgumentException\r
             {\r
                 try {\r
                     JSeq target = (JSeq) object;\r
-                    // ignore null values for non optional primitives\r
-                    if (value == null) { return; }\r
-                    \r
-                    target.setId( ((java.lang.Integer) value).intValue());\r
+                    target.setId( (java.lang.String) value);\r
                 } catch (java.lang.Exception ex) {\r
                     throw new IllegalStateException(ex.toString());\r
                 }\r
@@ -228,11 +236,10 @@ public class JSeqDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
         fieldValidator.setMinOccurs(1);\r
         { //-- local scope\r
-            org.exolab.castor.xml.validators.IntValidator typeValidator;\r
-            typeValidator = new org.exolab.castor.xml.validators.IntValidator();\r
+            org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+            typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
             fieldValidator.setValidator(typeValidator);\r
-            typeValidator.setMinInclusive(-2147483648);\r
-            typeValidator.setMaxInclusive(2147483647);\r
+            typeValidator.setWhiteSpace("preserve");\r
         }\r
         desc.setValidator(fieldValidator);\r
         //-- _hidden\r