2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.descriptors;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import jalview.schemabinding.version2.OtherData;
17 * Class OtherDataDescriptor.
19 * @version $Revision$ $Date$
21 public class OtherDataDescriptor extends
22 org.exolab.castor.xml.util.XMLClassDescriptorImpl
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
30 * Field _elementDefinition.
32 private boolean _elementDefinition;
37 private java.lang.String _nsPrefix;
42 private java.lang.String _nsURI;
47 private java.lang.String _xmlName;
53 public OtherDataDescriptor()
56 _nsURI = "www.jalview.org";
57 _xmlName = "otherData";
58 _elementDefinition = true;
59 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60 org.exolab.castor.mapping.FieldHandler handler = null;
61 org.exolab.castor.xml.FieldValidator fieldValidator = null;
62 // -- initialize attribute descriptors
65 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66 java.lang.String.class, "_key", "key",
67 org.exolab.castor.xml.NodeType.Attribute);
68 desc.setImmutable(true);
69 handler = new org.exolab.castor.xml.XMLFieldHandler()
71 public java.lang.Object getValue(java.lang.Object object)
72 throws IllegalStateException
74 OtherData target = (OtherData) object;
75 return target.getKey();
78 public void setValue(java.lang.Object object, java.lang.Object value)
79 throws IllegalStateException, IllegalArgumentException
83 OtherData target = (OtherData) object;
84 target.setKey((java.lang.String) value);
85 } catch (java.lang.Exception ex)
87 throw new IllegalStateException(ex.toString());
91 public java.lang.Object newInstance(java.lang.Object parent)
96 desc.setHandler(handler);
97 desc.setRequired(true);
98 desc.setMultivalued(false);
99 addFieldDescriptor(desc);
101 // -- validation code for: _key
102 fieldValidator = new org.exolab.castor.xml.FieldValidator();
103 fieldValidator.setMinOccurs(1);
105 org.exolab.castor.xml.validators.StringValidator typeValidator;
106 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
107 fieldValidator.setValidator(typeValidator);
108 typeValidator.setWhiteSpace("preserve");
110 desc.setValidator(fieldValidator);
112 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
113 java.lang.String.class, "_value", "value",
114 org.exolab.castor.xml.NodeType.Attribute);
115 desc.setImmutable(true);
116 handler = new org.exolab.castor.xml.XMLFieldHandler()
118 public java.lang.Object getValue(java.lang.Object object)
119 throws IllegalStateException
121 OtherData target = (OtherData) object;
122 return target.getValue();
125 public void setValue(java.lang.Object object, java.lang.Object value)
126 throws IllegalStateException, IllegalArgumentException
130 OtherData target = (OtherData) object;
131 target.setValue((java.lang.String) value);
132 } catch (java.lang.Exception ex)
134 throw new IllegalStateException(ex.toString());
138 public java.lang.Object newInstance(java.lang.Object parent)
143 desc.setHandler(handler);
144 desc.setRequired(true);
145 desc.setMultivalued(false);
146 addFieldDescriptor(desc);
148 // -- validation code for: _value
149 fieldValidator = new org.exolab.castor.xml.FieldValidator();
150 fieldValidator.setMinOccurs(1);
152 org.exolab.castor.xml.validators.StringValidator typeValidator;
153 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
154 fieldValidator.setValidator(typeValidator);
155 typeValidator.setWhiteSpace("preserve");
157 desc.setValidator(fieldValidator);
158 // -- initialize element descriptors
167 * Method getAccessMode.
169 * @return the access mode specified for this class.
171 public org.exolab.castor.mapping.AccessMode getAccessMode()
177 * Method getIdentity.
179 * @return the identity field, null if this class has no identity.
181 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
183 return super.getIdentity();
187 * Method getJavaClass.
189 * @return the Java class represented by this descriptor.
191 public java.lang.Class getJavaClass()
193 return jalview.schemabinding.version2.OtherData.class;
197 * Method getNameSpacePrefix.
199 * @return the namespace prefix to use when marshaling as XML.
201 public java.lang.String getNameSpacePrefix()
207 * Method getNameSpaceURI.
209 * @return the namespace URI used when marshaling and unmarshaling as XML.
211 public java.lang.String getNameSpaceURI()
217 * Method getValidator.
219 * @return a specific validator for the class described by this
222 public org.exolab.castor.xml.TypeValidator getValidator()
230 * @return the XML Name for the Class being described.
232 public java.lang.String getXMLName()
238 * Method isElementDefinition.
240 * @return true if XML schema definition of this Class is that of a global
241 * element or element with anonymous type definition.
243 public boolean isElementDefinition()
245 return _elementDefinition;