Save seqref with annotations
authoramwaterhouse <Andrew Waterhouse>
Wed, 10 May 2006 12:52:11 +0000 (12:52 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 10 May 2006 12:52:11 +0000 (12:52 +0000)
src/jalview/schemabinding/version2/Annotation.java
src/jalview/schemabinding/version2/AnnotationDescriptor.java

index 6003b86..e6c8e5a 100755 (executable)
@@ -56,6 +56,11 @@ public class Annotation implements java.io.Serializable {
     private boolean _has_graphType;\r
 \r
     /**\r
+     * Field _sequenceRef\r
+     */\r
+    private java.lang.String _sequenceRef;\r
+\r
+    /**\r
      * Field _annotationElementList\r
      */\r
     private java.util.Vector _annotationElementList;\r
@@ -240,6 +245,17 @@ public class Annotation implements java.io.Serializable {
     } //-- java.lang.String getLabel() \r
 \r
     /**\r
+     * Returns the value of field 'sequenceRef'.\r
+     * \r
+     * @return String\r
+     * @return the value of field 'sequenceRef'.\r
+     */\r
+    public java.lang.String getSequenceRef()\r
+    {\r
+        return this._sequenceRef;\r
+    } //-- java.lang.String getSequenceRef() \r
+\r
+    /**\r
      * Returns the value of field 'thresholdLine'.\r
      * \r
      * @return ThresholdLine\r
@@ -421,6 +437,16 @@ public class Annotation implements java.io.Serializable {
     } //-- void setLabel(java.lang.String) \r
 \r
     /**\r
+     * Sets the value of field 'sequenceRef'.\r
+     * \r
+     * @param sequenceRef the value of field 'sequenceRef'.\r
+     */\r
+    public void setSequenceRef(java.lang.String sequenceRef)\r
+    {\r
+        this._sequenceRef = sequenceRef;\r
+    } //-- void setSequenceRef(java.lang.String) \r
+\r
+    /**\r
      * Sets the value of field 'thresholdLine'.\r
      * \r
      * @param thresholdLine the value of field 'thresholdLine'.\r
index 9e34a53..b3125c3 100755 (executable)
@@ -147,6 +147,42 @@ public class AnnotationDescriptor extends org.exolab.castor.xml.util.XMLClassDes
             fieldValidator.setValidator(typeValidator);\r
         }\r
         desc.setValidator(fieldValidator);\r
+        //-- _sequenceRef\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceRef", "sequenceRef", 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
+                Annotation target = (Annotation) object;\r
+                return target.getSequenceRef();\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.setSequenceRef( (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: _sequenceRef\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
         //-- initialize element descriptors\r
         \r
         //-- _annotationElementList\r