-/*\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
- */\r
-\r
-package jalview.schemabinding.version2.descriptors;\r
-\r
- //---------------------------------/\r
- //- Imported classes and packages -/\r
-//---------------------------------/\r
-\r
-import jalview.schemabinding.version2.AnnotationColours;\r
-\r
-/**\r
- * Class AnnotationColoursDescriptor.\r
- * \r
- * @version $Revision$ $Date$\r
- */\r
-public class AnnotationColoursDescriptor extends 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
- //----------------/\r
- //- Constructors -/\r
- //----------------/\r
-\r
- public AnnotationColoursDescriptor() {\r
- super();\r
- _nsURI = "www.jalview.org";\r
- _xmlName = "AnnotationColours";\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
- //-- _aboveThreshold\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- AnnotationColours target = (AnnotationColours) object;\r
- if (!target.hasAboveThreshold()) { return null; }\r
- return new java.lang.Integer(target.getAboveThreshold());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- AnnotationColours target = (AnnotationColours) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteAboveThreshold();\r
- return;\r
- }\r
- target.setAboveThreshold( ((java.lang.Integer) value).intValue());\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
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _aboveThreshold\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
- //-- _annotation\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", 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
- AnnotationColours target = (AnnotationColours) object;\r
- return target.getAnnotation();\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- AnnotationColours target = (AnnotationColours) object;\r
- target.setAnnotation( (java.lang.String) value);\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
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _annotation\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
- //-- _minColour\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- AnnotationColours target = (AnnotationColours) object;\r
- if (!target.hasMinColour()) { return null; }\r
- return new java.lang.Integer(target.getMinColour());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- AnnotationColours target = (AnnotationColours) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteMinColour();\r
- return;\r
- }\r
- target.setMinColour( ((java.lang.Integer) value).intValue());\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
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _minColour\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
- //-- _maxColour\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- AnnotationColours target = (AnnotationColours) object;\r
- if (!target.hasMaxColour()) { return null; }\r
- return new java.lang.Integer(target.getMaxColour());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- AnnotationColours target = (AnnotationColours) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteMaxColour();\r
- return;\r
- }\r
- target.setMaxColour( ((java.lang.Integer) value).intValue());\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
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _maxColour\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
- //-- _colourScheme\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", 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
- AnnotationColours target = (AnnotationColours) object;\r
- return target.getColourScheme();\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- AnnotationColours target = (AnnotationColours) object;\r
- target.setColourScheme( (java.lang.String) value);\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
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _colourScheme\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
- //-- _threshold\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- AnnotationColours target = (AnnotationColours) object;\r
- if (!target.hasThreshold()) { return null; }\r
- return new java.lang.Float(target.getThreshold());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- AnnotationColours target = (AnnotationColours) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteThreshold();\r
- return;\r
- }\r
- target.setThreshold( ((java.lang.Float) value).floatValue());\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
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _threshold\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
- //-- initialize element descriptors\r
- \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\r
- * 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.AnnotationColours.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\r
- * 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\r
- * 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.1)
+ * 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
+ * Schema.
+ * $Id$
+ */
+
+package jalview.schemabinding.version2.descriptors;
+
+//---------------------------------/
+//- Imported classes and packages -/
+//---------------------------------/
+
+import jalview.schemabinding.version2.AnnotationColours;
+
+/**
+ * Class AnnotationColoursDescriptor.
+ *
+ * @version $Revision$ $Date$
+ */
+public class AnnotationColoursDescriptor
+ extends
+ jalview.schemabinding.version2.descriptors.AnnotationColourSchemeDescriptor
+{
+
+ // --------------------------/
+ // - 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 AnnotationColoursDescriptor()
+ {
+ super();
+ setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.AnnotationColourSchemeDescriptor());
+ _nsURI = "www.jalview.org";
+ _xmlName = "AnnotationColours";
+ _elementDefinition = true;
+ }
+
+ // -----------/
+ // - 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.AnnotationColours.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;
+ }
+
+}