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.AlcodMap;
17 * Class AlcodMapDescriptor.
19 * @version $Revision$ $Date$
21 public class AlcodMapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
29 * Field _elementDefinition.
31 private boolean _elementDefinition;
36 private java.lang.String _nsPrefix;
41 private java.lang.String _nsURI;
46 private java.lang.String _xmlName;
53 public AlcodMapDescriptor() {
55 _nsURI = "www.vamsas.ac.uk/jalview/version2";
56 _xmlName = "alcodMap";
57 _elementDefinition = true;
59 //-- set grouping compositor
60 setCompositorAsSequence();
61 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
62 org.exolab.castor.mapping.FieldHandler handler = null;
63 org.exolab.castor.xml.FieldValidator fieldValidator = null;
64 //-- initialize attribute descriptors
67 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dnasq", "dnasq", org.exolab.castor.xml.NodeType.Attribute);
68 desc.setImmutable(true);
69 handler = new org.exolab.castor.xml.XMLFieldHandler() {
70 public java.lang.Object getValue( java.lang.Object object )
71 throws IllegalStateException
73 AlcodMap target = (AlcodMap) object;
74 return target.getDnasq();
76 public void setValue( java.lang.Object object, java.lang.Object value)
77 throws IllegalStateException, IllegalArgumentException
80 AlcodMap target = (AlcodMap) object;
81 target.setDnasq( (java.lang.String) value);
82 } catch (java.lang.Exception ex) {
83 throw new IllegalStateException(ex.toString());
86 public java.lang.Object newInstance(java.lang.Object parent) {
90 desc.setHandler(handler);
91 desc.setRequired(true);
92 desc.setMultivalued(false);
93 addFieldDescriptor(desc);
95 //-- validation code for: _dnasq
96 fieldValidator = new org.exolab.castor.xml.FieldValidator();
97 fieldValidator.setMinOccurs(1);
99 org.exolab.castor.xml.validators.StringValidator typeValidator;
100 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
101 fieldValidator.setValidator(typeValidator);
102 typeValidator.setWhiteSpace("preserve");
104 desc.setValidator(fieldValidator);
105 //-- initialize element descriptors
108 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Mapping.class, "_mapping", "Mapping", org.exolab.castor.xml.NodeType.Element);
109 handler = new org.exolab.castor.xml.XMLFieldHandler() {
110 public java.lang.Object getValue( java.lang.Object object )
111 throws IllegalStateException
113 AlcodMap target = (AlcodMap) object;
114 return target.getMapping();
116 public void setValue( java.lang.Object object, java.lang.Object value)
117 throws IllegalStateException, IllegalArgumentException
120 AlcodMap target = (AlcodMap) object;
121 target.setMapping( (jalview.schemabinding.version2.Mapping) value);
122 } catch (java.lang.Exception ex) {
123 throw new IllegalStateException(ex.toString());
126 public java.lang.Object newInstance(java.lang.Object parent) {
127 return new jalview.schemabinding.version2.Mapping();
130 desc.setHandler(handler);
131 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
132 desc.setRequired(true);
133 desc.setMultivalued(false);
134 addFieldDescriptor(desc);
136 //-- validation code for: _mapping
137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
138 fieldValidator.setMinOccurs(1);
141 desc.setValidator(fieldValidator);
150 * Method getAccessMode.
152 * @return the access mode specified for this class.
154 public org.exolab.castor.mapping.AccessMode getAccessMode(
160 * Method getIdentity.
162 * @return the identity field, null if this class has no
165 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
167 return super.getIdentity();
171 * Method getJavaClass.
173 * @return the Java class represented by this descriptor.
175 public java.lang.Class getJavaClass(
177 return jalview.schemabinding.version2.AlcodMap.class;
181 * Method getNameSpacePrefix.
183 * @return the namespace prefix to use when marshaling as XML.
185 public java.lang.String getNameSpacePrefix(
191 * Method getNameSpaceURI.
193 * @return the namespace URI used when marshaling and
194 * unmarshaling as XML.
196 public java.lang.String getNameSpaceURI(
202 * Method getValidator.
204 * @return a specific validator for the class described by this
207 public org.exolab.castor.xml.TypeValidator getValidator(
215 * @return the XML Name for the Class being described.
217 public java.lang.String getXMLName(
223 * Method isElementDefinition.
225 * @return true if XML schema definition of this Class is that
227 * element or element with anonymous type definition.
229 public boolean isElementDefinition(
231 return _elementDefinition;