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.Mapping;
17 * Class MappingDescriptor.
19 * @version $Revision$ $Date$
21 public class MappingDescriptor extends jalview.schemabinding.version2.descriptors.MapListTypeDescriptor {
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 MappingDescriptor() {
55 setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor());
56 _nsURI = "www.vamsas.ac.uk/jalview/version2";
58 _elementDefinition = true;
60 //-- set grouping compositor
61 setCompositorAsChoice();
62 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63 org.exolab.castor.mapping.FieldHandler handler = null;
64 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65 //-- initialize attribute descriptors
67 //-- initialize element descriptors
70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MappingChoice.class, "_mappingChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element);
71 handler = new org.exolab.castor.xml.XMLFieldHandler() {
72 public java.lang.Object getValue( java.lang.Object object )
73 throws IllegalStateException
75 Mapping target = (Mapping) object;
76 return target.getMappingChoice();
78 public void setValue( java.lang.Object object, java.lang.Object value)
79 throws IllegalStateException, IllegalArgumentException
82 Mapping target = (Mapping) object;
83 target.setMappingChoice( (jalview.schemabinding.version2.MappingChoice) value);
84 } catch (java.lang.Exception ex) {
85 throw new IllegalStateException(ex.toString());
88 public java.lang.Object newInstance(java.lang.Object parent) {
89 return new jalview.schemabinding.version2.MappingChoice();
92 desc.setHandler(handler);
93 desc.setContainer(true);
94 desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());
95 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
96 desc.setMultivalued(false);
97 addFieldDescriptor(desc);
99 //-- validation code for: _mappingChoice
100 fieldValidator = new org.exolab.castor.xml.FieldValidator();
103 desc.setValidator(fieldValidator);
112 * Method getAccessMode.
114 * @return the access mode specified for this class.
116 public org.exolab.castor.mapping.AccessMode getAccessMode(
122 * Method getIdentity.
124 * @return the identity field, null if this class has no
127 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
129 return super.getIdentity();
133 * Method getJavaClass.
135 * @return the Java class represented by this descriptor.
137 public java.lang.Class getJavaClass(
139 return jalview.schemabinding.version2.Mapping.class;
143 * Method getNameSpacePrefix.
145 * @return the namespace prefix to use when marshaling as XML.
147 public java.lang.String getNameSpacePrefix(
153 * Method getNameSpaceURI.
155 * @return the namespace URI used when marshaling and
156 * unmarshaling as XML.
158 public java.lang.String getNameSpaceURI(
164 * Method getValidator.
166 * @return a specific validator for the class described by this
169 public org.exolab.castor.xml.TypeValidator getValidator(
177 * @return the XML Name for the Class being described.
179 public java.lang.String getXMLName(
185 * Method isElementDefinition.
187 * @return true if XML schema definition of this Class is that
189 * element or element with anonymous type definition.
191 public boolean isElementDefinition(
193 return _elementDefinition;