JAL-1432 updated copyright notices
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / ThresholdLineDescriptor.java
index c683978..8d83922 100644 (file)
-/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
- * \r
- * This file is part of Jalview.\r
- * \r
- * Jalview 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 3 of the License, or (at your option) any later version.\r
- * \r
- * Jalview is distributed in the hope that it will be useful, but \r
- * WITHOUT ANY WARRANTY; without even the implied warranty \r
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR \r
- * PURPOSE.  See the GNU General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package jalview.schemabinding.version2.descriptors;\r
-\r
-//---------------------------------/\r
-//- Imported classes and packages -/\r
-//---------------------------------/\r
-\r
-import jalview.schemabinding.version2.ThresholdLine;\r
-\r
-/**\r
- * Class ThresholdLineDescriptor.\r
- * \r
- * @version $Revision$ $Date$\r
- */\r
-public class ThresholdLineDescriptor extends\r
-        org.exolab.castor.xml.util.XMLClassDescriptorImpl\r
-{\r
-\r
-  // --------------------------/\r
-  // - Class/Member Variables -/\r
-  // --------------------------/\r
-\r
-  /**\r
-   * Field _elementDefinition.\r
-   */\r
-  private boolean _elementDefinition;\r
-\r
-  /**\r
-   * Field _nsPrefix.\r
-   */\r
-  private java.lang.String _nsPrefix;\r
-\r
-  /**\r
-   * Field _nsURI.\r
-   */\r
-  private java.lang.String _nsURI;\r
-\r
-  /**\r
-   * Field _xmlName.\r
-   */\r
-  private java.lang.String _xmlName;\r
-\r
-  // ----------------/\r
-  // - Constructors -/\r
-  // ----------------/\r
-\r
-  public ThresholdLineDescriptor()\r
-  {\r
-    super();\r
-    _nsURI = "www.vamsas.ac.uk/jalview/version2";\r
-    _xmlName = "thresholdLine";\r
-    _elementDefinition = true;\r
-    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
-    org.exolab.castor.mapping.FieldHandler handler = null;\r
-    org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
-    // -- initialize attribute descriptors\r
-\r
-    // -- _label\r
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(\r
-            java.lang.String.class, "_label", "label",\r
-            org.exolab.castor.xml.NodeType.Attribute);\r
-    desc.setImmutable(true);\r
-    handler = new org.exolab.castor.xml.XMLFieldHandler()\r
-    {\r
-      public java.lang.Object getValue(java.lang.Object object)\r
-              throws IllegalStateException\r
-      {\r
-        ThresholdLine target = (ThresholdLine) object;\r
-        return target.getLabel();\r
-      }\r
-\r
-      public void setValue(java.lang.Object object, java.lang.Object value)\r
-              throws IllegalStateException, IllegalArgumentException\r
-      {\r
-        try\r
-        {\r
-          ThresholdLine target = (ThresholdLine) object;\r
-          target.setLabel((java.lang.String) value);\r
-        } catch (java.lang.Exception ex)\r
-        {\r
-          throw new IllegalStateException(ex.toString());\r
-        }\r
-      }\r
-\r
-      public java.lang.Object newInstance(java.lang.Object parent)\r
-      {\r
-        return null;\r
-      }\r
-    };\r
-    desc.setHandler(handler);\r
-    desc.setMultivalued(false);\r
-    addFieldDescriptor(desc);\r
-\r
-    // -- validation code for: _label\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
-    // -- _value\r
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(\r
-            java.lang.Float.TYPE, "_value", "value",\r
-            org.exolab.castor.xml.NodeType.Attribute);\r
-    handler = new org.exolab.castor.xml.XMLFieldHandler()\r
-    {\r
-      public java.lang.Object getValue(java.lang.Object object)\r
-              throws IllegalStateException\r
-      {\r
-        ThresholdLine target = (ThresholdLine) object;\r
-        if (!target.hasValue())\r
-        {\r
-          return null;\r
-        }\r
-        return new java.lang.Float(target.getValue());\r
-      }\r
-\r
-      public void setValue(java.lang.Object object, java.lang.Object value)\r
-              throws IllegalStateException, IllegalArgumentException\r
-      {\r
-        try\r
-        {\r
-          ThresholdLine target = (ThresholdLine) object;\r
-          // if null, use delete method for optional primitives\r
-          if (value == null)\r
-          {\r
-            target.deleteValue();\r
-            return;\r
-          }\r
-          target.setValue(((java.lang.Float) value).floatValue());\r
-        } catch (java.lang.Exception ex)\r
-        {\r
-          throw new IllegalStateException(ex.toString());\r
-        }\r
-      }\r
-\r
-      public java.lang.Object newInstance(java.lang.Object parent)\r
-      {\r
-        return null;\r
-      }\r
-    };\r
-    desc.setHandler(handler);\r
-    desc.setMultivalued(false);\r
-    addFieldDescriptor(desc);\r
-\r
-    // -- validation code for: _value\r
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
-    { // -- local scope\r
-      org.exolab.castor.xml.validators.FloatValidator typeValidator;\r
-      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();\r
-      fieldValidator.setValidator(typeValidator);\r
-      typeValidator.setMinInclusive((float) -3.4028235E38);\r
-      typeValidator.setMaxInclusive((float) 3.4028235E38);\r
-    }\r
-    desc.setValidator(fieldValidator);\r
-    // -- _colour\r
-    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(\r
-            java.lang.Integer.TYPE, "_colour", "colour",\r
-            org.exolab.castor.xml.NodeType.Attribute);\r
-    handler = new org.exolab.castor.xml.XMLFieldHandler()\r
-    {\r
-      public java.lang.Object getValue(java.lang.Object object)\r
-              throws IllegalStateException\r
-      {\r
-        ThresholdLine target = (ThresholdLine) object;\r
-        if (!target.hasColour())\r
-        {\r
-          return null;\r
-        }\r
-        return new java.lang.Integer(target.getColour());\r
-      }\r
-\r
-      public void setValue(java.lang.Object object, java.lang.Object value)\r
-              throws IllegalStateException, IllegalArgumentException\r
-      {\r
-        try\r
-        {\r
-          ThresholdLine target = (ThresholdLine) object;\r
-          // if null, use delete method for optional primitives\r
-          if (value == null)\r
-          {\r
-            target.deleteColour();\r
-            return;\r
-          }\r
-          target.setColour(((java.lang.Integer) value).intValue());\r
-        } catch (java.lang.Exception ex)\r
-        {\r
-          throw new IllegalStateException(ex.toString());\r
-        }\r
-      }\r
-\r
-      public java.lang.Object newInstance(java.lang.Object parent)\r
-      {\r
-        return null;\r
-      }\r
-    };\r
-    desc.setHandler(handler);\r
-    desc.setMultivalued(false);\r
-    addFieldDescriptor(desc);\r
-\r
-    // -- validation code for: _colour\r
-    fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
-    { // -- local scope\r
-      org.exolab.castor.xml.validators.IntValidator typeValidator;\r
-      typeValidator = new org.exolab.castor.xml.validators.IntValidator();\r
-      fieldValidator.setValidator(typeValidator);\r
-      typeValidator.setMinInclusive(-2147483648);\r
-      typeValidator.setMaxInclusive(2147483647);\r
-    }\r
-    desc.setValidator(fieldValidator);\r
-    // -- initialize element descriptors\r
-\r
-  }\r
-\r
-  // -----------/\r
-  // - Methods -/\r
-  // -----------/\r
-\r
-  /**\r
-   * Method getAccessMode.\r
-   * \r
-   * @return the access mode specified for this class.\r
-   */\r
-  public org.exolab.castor.mapping.AccessMode getAccessMode()\r
-  {\r
-    return null;\r
-  }\r
-\r
-  /**\r
-   * Method getIdentity.\r
-   * \r
-   * @return the identity field, null if this class has no identity.\r
-   */\r
-  public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
-  {\r
-    return super.getIdentity();\r
-  }\r
-\r
-  /**\r
-   * Method getJavaClass.\r
-   * \r
-   * @return the Java class represented by this descriptor.\r
-   */\r
-  public java.lang.Class getJavaClass()\r
-  {\r
-    return jalview.schemabinding.version2.ThresholdLine.class;\r
-  }\r
-\r
-  /**\r
-   * Method getNameSpacePrefix.\r
-   * \r
-   * @return the namespace prefix to use when marshaling as XML.\r
-   */\r
-  public java.lang.String getNameSpacePrefix()\r
-  {\r
-    return _nsPrefix;\r
-  }\r
-\r
-  /**\r
-   * Method getNameSpaceURI.\r
-   * \r
-   * @return the namespace URI used when marshaling and unmarshaling as XML.\r
-   */\r
-  public java.lang.String getNameSpaceURI()\r
-  {\r
-    return _nsURI;\r
-  }\r
-\r
-  /**\r
-   * Method getValidator.\r
-   * \r
-   * @return a specific validator for the class described by this\r
-   *         ClassDescriptor.\r
-   */\r
-  public org.exolab.castor.xml.TypeValidator getValidator()\r
-  {\r
-    return this;\r
-  }\r
-\r
-  /**\r
-   * Method getXMLName.\r
-   * \r
-   * @return the XML Name for the Class being described.\r
-   */\r
-  public java.lang.String getXMLName()\r
-  {\r
-    return _xmlName;\r
-  }\r
-\r
-  /**\r
-   * Method isElementDefinition.\r
-   * \r
-   * @return true if XML schema definition of this Class is that of a global\r
-   *         element or element with anonymous type definition.\r
-   */\r
-  public boolean isElementDefinition()\r
-  {\r
-    return _elementDefinition;\r
-  }\r
-\r
-}\r
+/*
+ * 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.
+ */
+package jalview.schemabinding.version2.descriptors;
+
+//---------------------------------/
+//- Imported classes and packages -/
+//---------------------------------/
+
+import jalview.schemabinding.version2.ThresholdLine;
+
+/**
+ * Class ThresholdLineDescriptor.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class ThresholdLineDescriptor extends
+        org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+  // --------------------------/
+  // - Class/Member Variables -/
+  // --------------------------/
+
+  /**
+   * Field _elementDefinition.
+   */
+  private boolean _elementDefinition;
+
+  /**
+   * Field _nsPrefix.
+   */
+  private java.lang.String _nsPrefix;
+
+  /**
+   * Field _nsURI.
+   */
+  private java.lang.String _nsURI;
+
+  /**
+   * Field _xmlName.
+   */
+  private java.lang.String _xmlName;
+
+  // ----------------/
+  // - Constructors -/
+  // ----------------/
+
+  public ThresholdLineDescriptor()
+  {
+    super();
+    _nsURI = "www.vamsas.ac.uk/jalview/version2";
+    _xmlName = "thresholdLine";
+    _elementDefinition = true;
+    org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+    org.exolab.castor.mapping.FieldHandler handler = null;
+    org.exolab.castor.xml.FieldValidator fieldValidator = null;
+    // -- initialize attribute descriptors
+
+    // -- _label
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.String.class, "_label", "label",
+            org.exolab.castor.xml.NodeType.Attribute);
+    desc.setImmutable(true);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        ThresholdLine target = (ThresholdLine) object;
+        return target.getLabel();
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          ThresholdLine target = (ThresholdLine) object;
+          target.setLabel((java.lang.String) value);
+        } 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: _label
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- 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);
+    // -- _value
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Float.TYPE, "_value", "value",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        ThresholdLine target = (ThresholdLine) object;
+        if (!target.hasValue())
+        {
+          return null;
+        }
+        return new java.lang.Float(target.getValue());
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          ThresholdLine target = (ThresholdLine) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deleteValue();
+            return;
+          }
+          target.setValue(((java.lang.Float) value).floatValue());
+        } 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: _value
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.FloatValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setMinInclusive((float) -3.4028235E38);
+      typeValidator.setMaxInclusive((float) 3.4028235E38);
+    }
+    desc.setValidator(fieldValidator);
+    // -- _colour
+    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+            java.lang.Integer.TYPE, "_colour", "colour",
+            org.exolab.castor.xml.NodeType.Attribute);
+    handler = new org.exolab.castor.xml.XMLFieldHandler()
+    {
+      public java.lang.Object getValue(java.lang.Object object)
+              throws IllegalStateException
+      {
+        ThresholdLine target = (ThresholdLine) object;
+        if (!target.hasColour())
+        {
+          return null;
+        }
+        return new java.lang.Integer(target.getColour());
+      }
+
+      public void setValue(java.lang.Object object, java.lang.Object value)
+              throws IllegalStateException, IllegalArgumentException
+      {
+        try
+        {
+          ThresholdLine target = (ThresholdLine) object;
+          // if null, use delete method for optional primitives
+          if (value == null)
+          {
+            target.deleteColour();
+            return;
+          }
+          target.setColour(((java.lang.Integer) value).intValue());
+        } 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: _colour
+    fieldValidator = new org.exolab.castor.xml.FieldValidator();
+    { // -- local scope
+      org.exolab.castor.xml.validators.IntValidator typeValidator;
+      typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+      fieldValidator.setValidator(typeValidator);
+      typeValidator.setMinInclusive(-2147483648);
+      typeValidator.setMaxInclusive(2147483647);
+    }
+    desc.setValidator(fieldValidator);
+    // -- initialize element descriptors
+
+  }
+
+  // -----------/
+  // - Methods -/
+  // -----------/
+
+  /**
+   * Method getAccessMode.
+   * 
+   * @return the access mode specified for this class.
+   */
+  public org.exolab.castor.mapping.AccessMode getAccessMode()
+  {
+    return null;
+  }
+
+  /**
+   * Method getIdentity.
+   * 
+   * @return the identity field, null if this class has no identity.
+   */
+  public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+  {
+    return super.getIdentity();
+  }
+
+  /**
+   * Method getJavaClass.
+   * 
+   * @return the Java class represented by this descriptor.
+   */
+  public java.lang.Class getJavaClass()
+  {
+    return jalview.schemabinding.version2.ThresholdLine.class;
+  }
+
+  /**
+   * Method getNameSpacePrefix.
+   * 
+   * @return the namespace prefix to use when marshaling as XML.
+   */
+  public java.lang.String getNameSpacePrefix()
+  {
+    return _nsPrefix;
+  }
+
+  /**
+   * Method getNameSpaceURI.
+   * 
+   * @return the namespace URI used when marshaling and unmarshaling as XML.
+   */
+  public java.lang.String getNameSpaceURI()
+  {
+    return _nsURI;
+  }
+
+  /**
+   * Method getValidator.
+   * 
+   * @return a specific validator for the class described by this
+   *         ClassDescriptor.
+   */
+  public org.exolab.castor.xml.TypeValidator getValidator()
+  {
+    return this;
+  }
+
+  /**
+   * Method getXMLName.
+   * 
+   * @return the XML Name for the Class being described.
+   */
+  public java.lang.String getXMLName()
+  {
+    return _xmlName;
+  }
+
+  /**
+   * Method isElementDefinition.
+   * 
+   * @return true if XML schema definition of this Class is that of a global
+   *         element or element with anonymous type definition.
+   */
+  public boolean isElementDefinition()
+  {
+    return _elementDefinition;
+  }
+
+}