X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FAnnotationColoursDescriptor.java;h=f8cc3a14b9a0cd938534477220c3379fd3a1fbc1;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=c3c06e600c5488099146f0188ae2aa462d1f58e1;hpb=dd74fc4938723fe5ec48d4e5fdcfbe58ac42a48d;p=jalview.git diff --git a/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java b/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java index c3c06e6..f8cc3a1 100755 --- a/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java @@ -1,5 +1,5 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ @@ -7,400 +7,456 @@ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class AnnotationColoursDescriptor. - * + * * @version $Revision$ $Date$ */ -public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationColoursDescriptor() { - super(); - nsURI = "www.jalview.org"; - xmlName = "AnnotationColours"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _aboveThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", 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.hasAboveThreshold()) - return null; - return new java.lang.Integer(target.getAboveThreshold()); - } - 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.deleteAboveThreshold(); - return; - } - target.setAboveThreshold( ((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); - addFieldDescriptor(desc); - - //-- validation code for: _aboveThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator= new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _annotation - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", 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 - { - AnnotationColours target = (AnnotationColours) object; - return target.getAnnotation(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - target.setAnnotation( (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); - addFieldDescriptor(desc); - - //-- validation code for: _annotation - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); +public class AnnotationColoursDescriptor + extends org.exolab.castor.xml.util.XMLClassDescriptorImpl +{ + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationColoursDescriptor() + { + super(); + nsURI = "www.jalview.org"; + xmlName = "AnnotationColours"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _aboveThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. + Integer.TYPE, "_aboveThreshold", "aboveThreshold", + 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.hasAboveThreshold()) + { + return null; } - desc.setValidator(fieldValidator); - //-- _minColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", 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.hasMinColour()) - return null; - return new java.lang.Integer(target.getMinColour()); - } - 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.deleteMinColour(); - return; - } - target.setMinColour( ((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); - addFieldDescriptor(desc); - - //-- validation code for: _minColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator= new IntegerValidator(); - fieldValidator.setValidator(typeValidator); + return new java.lang.Integer(target.getAboveThreshold()); + } + + 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.deleteAboveThreshold(); + return; + } + target.setAboveThreshold( ( (java.lang.Integer) value).intValue()); } - desc.setValidator(fieldValidator); - //-- _maxColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", 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.hasMaxColour()) - return null; - return new java.lang.Integer(target.getMaxColour()); - } - 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.deleteMaxColour(); - return; - } - target.setMaxColour( ((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); - addFieldDescriptor(desc); - - //-- validation code for: _maxColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator= new IntegerValidator(); - fieldValidator.setValidator(typeValidator); + catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); } - desc.setValidator(fieldValidator); - //-- _colourScheme - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", 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 - { - AnnotationColours target = (AnnotationColours) object; - return target.getColourScheme(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AnnotationColours target = (AnnotationColours) object; - target.setColourScheme( (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); - addFieldDescriptor(desc); - - //-- validation code for: _colourScheme - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); + } + + public java.lang.Object newInstance(java.lang.Object parent) + { + return null; + } + }); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _aboveThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _annotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. + String.class, "_annotation", "annotation", + 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 + { + AnnotationColours target = (AnnotationColours) object; + return target.getAnnotation(); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + target.setAnnotation( (java.lang.String) value); } - desc.setValidator(fieldValidator); - //-- _threshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_threshold", "threshold", 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.hasThreshold()) - return null; - return new java.lang.Float(target.getThreshold()); - } - 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.deleteThreshold(); - return; - } - target.setThreshold( ((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); - addFieldDescriptor(desc); - - //-- validation code for: _threshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); + catch (java.lang.Exception ex) + { + throw new IllegalStateException(ex.toString()); } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.AnnotationColoursDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { + } + + public java.lang.Object newInstance(java.lang.Object parent) + { return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() + } + }); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _annotation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _minColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. + Integer.TYPE, "_minColour", "minColour", + 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.hasMinColour()) + { + return null; + } + return new java.lang.Integer(target.getMinColour()); + } + + 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.deleteMinColour(); + return; + } + target.setMinColour( ( (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; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.AnnotationColours.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() + } + }); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _minColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _maxColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. + Integer.TYPE, "_maxColour", "maxColour", + org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMaxColour()) + { + return null; + } + return new java.lang.Integer(target.getMaxColour()); + } + + 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.deleteMaxColour(); + return; + } + target.setMaxColour( ( (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); + addFieldDescriptor(desc); + + //-- validation code for: _maxColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _colourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. + String.class, "_colourScheme", "colourScheme", + org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getColourScheme(); + } + + public void setValue(java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try + { + AnnotationColours target = (AnnotationColours) object; + target.setColourScheme( (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); + addFieldDescriptor(desc); + + //-- validation code for: _colourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, + "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { - return xmlName; - } //-- java.lang.String getXMLName() + public java.lang.Object getValue(java.lang.Object object) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasThreshold()) + { + return null; + } + return new java.lang.Float(target.getThreshold()); + } + + 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.deleteThreshold(); + return; + } + target.setThreshold( ( (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); + addFieldDescriptor(desc); + + //-- validation code for: _threshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.AnnotationColoursDescriptor() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.AnnotationColours.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() }