Merge branch 'JAL-1403' into Release_2_8_1_Branch
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / AnnotationColoursDescriptor.java
index 30f1dc9..196ad60 100644 (file)
@@ -306,6 +306,88 @@ public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLC
             typeValidator.setMaxInclusive((float) 3.4028235E38);
         }
         desc.setValidator(fieldValidator);
+        //-- _perSequence
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_perSequence", "perSequence", org.exolab.castor.xml.NodeType.Attribute);
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {
+            public java.lang.Object getValue( java.lang.Object object ) 
+                throws IllegalStateException
+            {
+                AnnotationColours target = (AnnotationColours) object;
+                if (!target.hasPerSequence()) { return null; }
+                return (target.getPerSequence() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+            }
+            public void setValue( java.lang.Object object, java.lang.Object value) 
+                throws IllegalStateException, IllegalArgumentException
+            {
+                try {
+                    AnnotationColours target = (AnnotationColours) object;
+                    // if null, use delete method for optional primitives 
+                    if (value == null) {
+                        target.deletePerSequence();
+                        return;
+                    }
+                    target.setPerSequence( ((java.lang.Boolean) value).booleanValue());
+                } catch (java.lang.Exception ex) {
+                    throw new IllegalStateException(ex.toString());
+                }
+            }
+            public java.lang.Object newInstance(java.lang.Object parent) {
+                return null;
+            }
+        };
+        desc.setHandler(handler);
+        desc.setMultivalued(false);
+        addFieldDescriptor(desc);
+        
+        //-- validation code for: _perSequence
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();
+        { //-- local scope
+            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+            fieldValidator.setValidator(typeValidator);
+        }
+        desc.setValidator(fieldValidator);
+        //-- _predefinedColours
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_predefinedColours", "predefinedColours", org.exolab.castor.xml.NodeType.Attribute);
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {
+            public java.lang.Object getValue( java.lang.Object object ) 
+                throws IllegalStateException
+            {
+                AnnotationColours target = (AnnotationColours) object;
+                if (!target.hasPredefinedColours()) { return null; }
+                return (target.getPredefinedColours() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+            }
+            public void setValue( java.lang.Object object, java.lang.Object value) 
+                throws IllegalStateException, IllegalArgumentException
+            {
+                try {
+                    AnnotationColours target = (AnnotationColours) object;
+                    // if null, use delete method for optional primitives 
+                    if (value == null) {
+                        target.deletePredefinedColours();
+                        return;
+                    }
+                    target.setPredefinedColours( ((java.lang.Boolean) value).booleanValue());
+                } catch (java.lang.Exception ex) {
+                    throw new IllegalStateException(ex.toString());
+                }
+            }
+            public java.lang.Object newInstance(java.lang.Object parent) {
+                return null;
+            }
+        };
+        desc.setHandler(handler);
+        desc.setMultivalued(false);
+        addFieldDescriptor(desc);
+        
+        //-- validation code for: _predefinedColours
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();
+        { //-- local scope
+            org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+            typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+            fieldValidator.setValidator(typeValidator);
+        }
+        desc.setValidator(fieldValidator);
         //-- initialize element descriptors
         
     }