/* * This class was automatically generated with * Castor 0.9.9M2, using an XML * Schema. * $Id$ */ package org.vamsas.objects.core; //---------------------------------/ //- 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 DataSetAnnotationsDescriptor. * * @version $Revision$ $Date$ */ public class DataSetAnnotationsDescriptor 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 DataSetAnnotationsDescriptor() { super(); nsURI = "http://www.vamsas.org"; xmlName = "DataSetAnnotations"; //-- 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; //-- initialize attribute descriptors //-- _type desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 { DataSetAnnotations target = (DataSetAnnotations) object; return target.getType(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setType( (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.setRequired(true); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _type fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope StringValidator typeValidator = new StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _end desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_end", "end", 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 { DataSetAnnotations target = (DataSetAnnotations) object; return target.getEnd(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setEnd( (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.setRequired(true); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _end fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope StringValidator typeValidator = new StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _begin desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_begin", "begin", 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 { DataSetAnnotations target = (DataSetAnnotations) object; return target.getBegin(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setBegin( (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.setRequired(true); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _begin fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope StringValidator typeValidator = new StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _seqRef desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_seqRef", "seqRef", org.exolab.castor.xml.NodeType.Attribute); desc.setReference(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { DataSetAnnotations target = (DataSetAnnotations) object; return target.getSeqRef(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setSeqRef( (java.lang.Object) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return new java.lang.Object(); } }; desc.setHandler(handler); desc.setRequired(true); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _seqRef fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope } desc.setValidator(fieldValidator); //-- _id desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); this.identity = desc; handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { DataSetAnnotations target = (DataSetAnnotations) object; return target.getId(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setId( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return new java.lang.String(); } }; desc.setHandler(handler); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _id fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope } desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _description desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", 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 { DataSetAnnotations target = (DataSetAnnotations) object; return target.getDescription(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setDescription( (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.setNameSpaceURI("http://www.vamsas.org"); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _description fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope StringValidator typeValidator = new StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _status desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_status", "status", 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 { DataSetAnnotations target = (DataSetAnnotations) object; return target.getStatus(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.setStatus( (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.setNameSpaceURI("http://www.vamsas.org"); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _status fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope StringValidator typeValidator = new StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _annotationElementList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { DataSetAnnotations target = (DataSetAnnotations) object; return target.getAnnotationElement(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.addAnnotationElement( (org.vamsas.objects.core.AnnotationElement) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return new org.vamsas.objects.core.AnnotationElement(); } }; desc.setHandler(handler); desc.setNameSpaceURI("http://www.vamsas.org"); desc.setMultivalued(true); addFieldDescriptor(desc); //-- validation code for: _annotationElementList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); { //-- local scope } desc.setValidator(fieldValidator); //-- _provenanceList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenanceList", "Provenance", org.exolab.castor.xml.NodeType.Element); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { DataSetAnnotations target = (DataSetAnnotations) object; return target.getProvenance(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { DataSetAnnotations target = (DataSetAnnotations) object; target.addProvenance( (org.vamsas.objects.core.Provenance) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return new org.vamsas.objects.core.Provenance(); } }; desc.setHandler(handler); desc.setNameSpaceURI("http://www.vamsas.org"); desc.setRequired(true); desc.setMultivalued(true); addFieldDescriptor(desc); //-- validation code for: _provenanceList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope } desc.setValidator(fieldValidator); } //-- org.vamsas.objects.core.DataSetAnnotationsDescriptor() //-----------/ //- 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 org.vamsas.objects.core.DataSetAnnotations.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() }