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
22 jalview.schemabinding.version2.descriptors.MapListTypeDescriptor
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 MappingDescriptor()
56 setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor());
57 _nsURI = "www.vamsas.ac.uk/jalview/version2";
59 _elementDefinition = true;
61 // -- set grouping compositor
62 setCompositorAsChoice();
63 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64 org.exolab.castor.mapping.FieldHandler handler = null;
65 org.exolab.castor.xml.FieldValidator fieldValidator = null;
66 // -- initialize attribute descriptors
68 // -- initialize element descriptors
71 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
72 jalview.schemabinding.version2.MappingChoice.class,
73 "_mappingChoice", "-error-if-this-is-used-",
74 org.exolab.castor.xml.NodeType.Element);
75 handler = new org.exolab.castor.xml.XMLFieldHandler()
77 public java.lang.Object getValue(java.lang.Object object)
78 throws IllegalStateException
80 Mapping target = (Mapping) object;
81 return target.getMappingChoice();
84 public void setValue(java.lang.Object object, java.lang.Object value)
85 throws IllegalStateException, IllegalArgumentException
89 Mapping target = (Mapping) object;
90 target.setMappingChoice((jalview.schemabinding.version2.MappingChoice) value);
91 } catch (java.lang.Exception ex)
93 throw new IllegalStateException(ex.toString());
97 public java.lang.Object newInstance(java.lang.Object parent)
99 return new jalview.schemabinding.version2.MappingChoice();
102 desc.setHandler(handler);
103 desc.setContainer(true);
104 desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());
105 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
106 desc.setMultivalued(false);
107 addFieldDescriptor(desc);
109 // -- validation code for: _mappingChoice
110 fieldValidator = new org.exolab.castor.xml.FieldValidator();
113 desc.setValidator(fieldValidator);
121 * Method getAccessMode.
123 * @return the access mode specified for this class.
125 public org.exolab.castor.mapping.AccessMode getAccessMode()
131 * Method getIdentity.
133 * @return the identity field, null if this class has no identity.
135 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
137 return super.getIdentity();
141 * Method getJavaClass.
143 * @return the Java class represented by this descriptor.
145 public java.lang.Class getJavaClass()
147 return jalview.schemabinding.version2.Mapping.class;
151 * Method getNameSpacePrefix.
153 * @return the namespace prefix to use when marshaling as XML.
155 public java.lang.String getNameSpacePrefix()
161 * Method getNameSpaceURI.
163 * @return the namespace URI used when marshaling and unmarshaling as XML.
165 public java.lang.String getNameSpaceURI()
171 * Method getValidator.
173 * @return a specific validator for the class described by this
176 public org.exolab.castor.xml.TypeValidator getValidator()
184 * @return the XML Name for the Class being described.
186 public java.lang.String getXMLName()
192 * Method isElementDefinition.
194 * @return true if XML schema definition of this Class is that of a global
195 * element or element with anonymous type definition.
197 public boolean isElementDefinition()
199 return _elementDefinition;