JAL-3181 refactor: extracted buildLinkMenu() for testability
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / SettingDescriptor.java
index dd318b3..c816e43 100644 (file)
@@ -1,22 +1,3 @@
-/*******************************************************************************
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
- * Copyright (C) 2014 The Jalview Authors
- * 
- * 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/>.
- * The Jalview Authors are detailed in the 'AUTHORS' file.
- ******************************************************************************/
 /*
  * This class was automatically generated with 
  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
@@ -37,8 +18,8 @@ import jalview.schemabinding.version2.Setting;
  * 
  * @version $Revision$ $Date$
  */
-public class SettingDescriptor extends
-        org.exolab.castor.xml.util.XMLClassDescriptorImpl
+public class SettingDescriptor
+        extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
 {
 
   // --------------------------/
@@ -75,6 +56,9 @@ public class SettingDescriptor extends
     _nsURI = "www.jalview.org";
     _xmlName = "setting";
     _elementDefinition = true;
+
+    // -- set grouping compositor
+    setCompositorAsSequence();
     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
     org.exolab.castor.mapping.FieldHandler handler = null;
     org.exolab.castor.xml.FieldValidator fieldValidator = null;
@@ -350,6 +334,52 @@ public class SettingDescriptor extends
       typeValidator.setMaxInclusive(2147483647);
     }
     desc.setValidator(fieldValidator);
+    // -- _noValueColour
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            jalview.schemabinding.version2.types.NoValueColour.class,
+            "_noValueColour", "noValueColour",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        Setting target = (Setting) object;
+        return target.getNoValueColour();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          Setting target = (Setting) object;
+          target.setNoValueColour(
+                  (jalview.schemabinding.version2.types.NoValueColour) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return null;
+      }
+    };
+    handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
+            jalview.schemabinding.version2.types.NoValueColour.class,
+            handler);
+    desc.setImmutable(true);
+    desc.setHandler(handler);
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _noValueColour
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+    }
+    desc.setValidator(fieldValidator);
     // -- _threshold
     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
             java.lang.Float.TYPE, "_threshold", "threshold",
@@ -600,8 +630,8 @@ public class SettingDescriptor extends
             target.deleteColourByLabel();
             return;
           }
-          target.setColourByLabel(((java.lang.Boolean) value)
-                  .booleanValue());
+          target.setColourByLabel(
+                  ((java.lang.Boolean) value).booleanValue());
         } catch (java.lang.Exception ex)
         {
           throw new IllegalStateException(ex.toString());
@@ -681,6 +711,109 @@ public class SettingDescriptor extends
     desc.setValidator(fieldValidator);
     // -- initialize element descriptors
 
+    // -- _attributeNameList
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_attributeNameList", "attributeName",
+            org.exolab.castor.xml.NodeType.Element);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        Setting target = (Setting) object;
+        return target.getAttributeName();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          Setting target = (Setting) object;
+          target.addAttributeName((java.lang.String) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
+
+      public void resetValue(Object object)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          Setting target = (Setting) object;
+          target.removeAllAttributeName();
+        } 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.setNameSpaceURI("www.jalview.org");
+    desc.setMultivalued(true);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _attributeNameList
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    fieldValidator.setMinOccurs(0);
+    fieldValidator.setMaxOccurs(2);
+    { // -- local scope
+      org.exolab.castor.xml.validators.StringValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setWhiteSpace("preserve");
+    }
+    desc.setValidator(fieldValidator);
+    // -- _matcherSet
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            jalview.schemabinding.version2.MatcherSet.class, "_matcherSet",
+            "matcherSet", org.exolab.castor.xml.NodeType.Element);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        Setting target = (Setting) object;
+        return target.getMatcherSet();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          Setting target = (Setting) object;
+          target.setMatcherSet(
+                  (jalview.schemabinding.version2.MatcherSet) value);
+        } catch (java.lang.Exception ex)
+        {
+          throw new IllegalStateException(ex.toString());
+        }
+      }
+
+      public java.lang.Object newInstance(java.lang.Object parent)
+      {
+        return new jalview.schemabinding.version2.MatcherSet();
+      }
+    };
+    desc.setHandler(handler);
+    desc.setNameSpaceURI("www.jalview.org");
+    desc.setMultivalued(false);
+    addFieldDescriptor(desc);
+
+    // -- validation code for: _matcherSet
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+    }
+    desc.setValidator(fieldValidator);
   }
 
   // -----------/