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.VAMSAS;
17 * Class VAMSASDescriptor.
19 * @version $Revision$ $Date$
21 public class VAMSASDescriptor 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 VAMSASDescriptor() {
55 _nsURI = "www.vamsas.ac.uk/jalview/version2";
57 _elementDefinition = false;
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
66 //-- initialize element descriptors
69 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);
70 desc.setImmutable(true);
71 handler = new org.exolab.castor.xml.XMLFieldHandler() {
72 public java.lang.Object getValue( java.lang.Object object )
73 throws IllegalStateException
75 VAMSAS target = (VAMSAS) object;
76 return target.getTree();
78 public void setValue( java.lang.Object object, java.lang.Object value)
79 throws IllegalStateException, IllegalArgumentException
82 VAMSAS target = (VAMSAS) object;
83 target.addTree( (java.lang.String) value);
84 } catch (java.lang.Exception ex) {
85 throw new IllegalStateException(ex.toString());
88 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
90 VAMSAS target = (VAMSAS) object;
91 target.removeAllTree();
92 } catch (java.lang.Exception ex) {
93 throw new IllegalStateException(ex.toString());
96 public java.lang.Object newInstance(java.lang.Object parent) {
100 desc.setHandler(handler);
101 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
102 desc.setMultivalued(true);
103 addFieldDescriptor(desc);
105 //-- validation code for: _treeList
106 fieldValidator = new org.exolab.castor.xml.FieldValidator();
107 fieldValidator.setMinOccurs(0);
109 org.exolab.castor.xml.validators.StringValidator typeValidator;
110 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
111 fieldValidator.setValidator(typeValidator);
112 typeValidator.setWhiteSpace("preserve");
114 desc.setValidator(fieldValidator);
115 //-- _sequenceSetList
116 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.SequenceSet.class, "_sequenceSetList", "SequenceSet", org.exolab.castor.xml.NodeType.Element);
117 handler = new org.exolab.castor.xml.XMLFieldHandler() {
118 public java.lang.Object getValue( java.lang.Object object )
119 throws IllegalStateException
121 VAMSAS target = (VAMSAS) object;
122 return target.getSequenceSet();
124 public void setValue( java.lang.Object object, java.lang.Object value)
125 throws IllegalStateException, IllegalArgumentException
128 VAMSAS target = (VAMSAS) object;
129 target.addSequenceSet( (jalview.schemabinding.version2.SequenceSet) value);
130 } catch (java.lang.Exception ex) {
131 throw new IllegalStateException(ex.toString());
134 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
136 VAMSAS target = (VAMSAS) object;
137 target.removeAllSequenceSet();
138 } catch (java.lang.Exception ex) {
139 throw new IllegalStateException(ex.toString());
142 public java.lang.Object newInstance(java.lang.Object parent) {
143 return new jalview.schemabinding.version2.SequenceSet();
146 desc.setHandler(handler);
147 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
148 desc.setMultivalued(true);
149 addFieldDescriptor(desc);
151 //-- validation code for: _sequenceSetList
152 fieldValidator = new org.exolab.castor.xml.FieldValidator();
153 fieldValidator.setMinOccurs(0);
156 desc.setValidator(fieldValidator);
165 * Method getAccessMode.
167 * @return the access mode specified for this class.
169 public org.exolab.castor.mapping.AccessMode getAccessMode(
175 * Method getIdentity.
177 * @return the identity field, null if this class has no
180 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
182 return super.getIdentity();
186 * Method getJavaClass.
188 * @return the Java class represented by this descriptor.
190 public java.lang.Class getJavaClass(
192 return jalview.schemabinding.version2.VAMSAS.class;
196 * Method getNameSpacePrefix.
198 * @return the namespace prefix to use when marshaling as XML.
200 public java.lang.String getNameSpacePrefix(
206 * Method getNameSpaceURI.
208 * @return the namespace URI used when marshaling and
209 * 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
242 * element or element with anonymous type definition.
244 public boolean isElementDefinition(
246 return _elementDefinition;