/* * This class was automatically generated with * Castor 1.0.5, using an XML * Schema. * $Id$ */ package org.oagis.unqualifieddatatypes; /** * Class TextTypeDescriptor. * * @version $Revision$ $Date$ */ public class TextTypeDescriptor 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; /** * Field identity */ private org.exolab.castor.xml.XMLFieldDescriptor identity; //----------------/ //- Constructors -/ //----------------/ public TextTypeDescriptor() { super(); nsURI = "http://www.openapplications.org/oagis/9/unqualifieddatatypes/1.1"; xmlName = "TextType"; elementDefinition = false; org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; org.exolab.castor.mapping.FieldHandler handler = null; org.exolab.castor.xml.FieldValidator fieldValidator = null; //-- _content desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { TextType target = (TextType) object; return target.getContent(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { TextType target = (TextType) object; target.setContent( (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: _content fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.StringValidator typeValidator = new org.exolab.castor.xml.validators.StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- initialize attribute descriptors //-- _languageID desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_languageID", "languageID", 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 { TextType target = (TextType) object; return target.getLanguageID(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { TextType target = (TextType) object; target.setLanguageID( (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: _languageID fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.StringValidator typeValidator = new org.exolab.castor.xml.validators.StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- initialize element descriptors } //-- org.oagis.unqualifieddatatypes.TextTypeDescriptor() //-----------/ //- Methods -/ //-----------/ /** * Method getAccessMode * * * * @return the access mode specified for this class. */ public org.exolab.castor.mapping.AccessMode getAccessMode() { return null; } //-- org.exolab.castor.mapping.AccessMode getAccessMode() /** * Method getExtends * * * * @return the class descriptor of the class extended by this * class. */ public org.exolab.castor.mapping.ClassDescriptor getExtends() { return null; } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() /** * Method getIdentity * * * * @return the identity field, null if this class has no * identity. */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { return identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** * Method getJavaClass * * * * @return the Java class represented by this descriptor. */ public java.lang.Class getJavaClass() { return org.oagis.unqualifieddatatypes.TextType.class; } //-- java.lang.Class getJavaClass() /** * Method getNameSpacePrefix * * * * @return the namespace prefix to use when marshalling as XML. */ public java.lang.String getNameSpacePrefix() { return nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** * Method getNameSpaceURI * * * * @return the namespace URI used when marshalling and * unmarshalling as XML. */ public java.lang.String getNameSpaceURI() { return nsURI; } //-- java.lang.String getNameSpaceURI() /** * Method getValidator * * * * @return a specific validator for the class described by this * ClassDescriptor. */ public org.exolab.castor.xml.TypeValidator getValidator() { return this; } //-- org.exolab.castor.xml.TypeValidator getValidator() /** * Method getXMLName * * * * @return the XML Name for the Class being described. */ public java.lang.String getXMLName() { return xmlName; } //-- java.lang.String getXMLName() /** * 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; } //-- boolean isElementDefinition() }