/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ 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;
//---------------------------------/
*
* @version $Revision$ $Date$
*/
-public class ColourDescriptor extends
- org.exolab.castor.xml.util.XMLClassDescriptorImpl
+public class ColourDescriptor
+ extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
{
// --------------------------/
super();
_xmlName = "colour";
_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;
typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- // -- _threshType
+ // -- _noValueColour
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
- java.lang.String.class, "_threshType", "threshType",
+ 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
+ {
+ Colour target = (Colour) object;
+ return target.getNoValueColour();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) 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);
+ // -- _threshType
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.types.ColourThreshTypeType.class,
+ "_threshType", "threshType",
+ org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler()
{
public java.lang.Object getValue(java.lang.Object object)
try
{
Colour target = (Colour) object;
- target.setThreshType((java.lang.String) value);
+ target.setThreshType(
+ (jalview.schemabinding.version2.types.ColourThreshTypeType) value);
} catch (java.lang.Exception ex)
{
throw new IllegalStateException(ex.toString());
return null;
}
};
+ handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
+ jalview.schemabinding.version2.types.ColourThreshTypeType.class,
+ handler);
+ desc.setImmutable(true);
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
// -- validation code for: _threshType
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);
// -- _threshold
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());
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
+ {
+ Colour target = (Colour) object;
+ return target.getAttributeName();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) 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
+ {
+ Colour target = (Colour) 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.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);
}
// -----------/