2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package org.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
20 * Class SequenceSetDescriptor.
22 * @version $Revision$ $Date$
24 public class SequenceSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
34 private java.lang.String nsPrefix;
39 private java.lang.String nsURI;
44 private java.lang.String xmlName;
49 private org.exolab.castor.xml.XMLFieldDescriptor identity;
56 public SequenceSetDescriptor()
59 nsURI = "http://www.vamsas.org";
60 xmlName = "SequenceSet";
62 //-- set grouping compositor
63 setCompositorAsSequence();
64 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
65 org.exolab.castor.mapping.FieldHandler handler = null;
66 org.exolab.castor.xml.FieldValidator fieldValidator = null;
67 //-- initialize attribute descriptors
70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
72 handler = new org.exolab.castor.xml.XMLFieldHandler() {
73 public java.lang.Object getValue( java.lang.Object object )
74 throws IllegalStateException
76 SequenceSet target = (SequenceSet) object;
77 return target.getId();
79 public void setValue( java.lang.Object object, java.lang.Object value)
80 throws IllegalStateException, IllegalArgumentException
83 SequenceSet target = (SequenceSet) object;
84 target.setId( (java.lang.String) value);
86 catch (java.lang.Exception ex) {
87 throw new IllegalStateException(ex.toString());
90 public java.lang.Object newInstance( java.lang.Object parent ) {
91 return new java.lang.String();
94 desc.setHandler(handler);
95 desc.setMultivalued(false);
96 addFieldDescriptor(desc);
98 //-- validation code for: _id
99 fieldValidator = new org.exolab.castor.xml.FieldValidator();
102 desc.setValidator(fieldValidator);
103 //-- initialize element descriptors
106 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Sequence.class, "_sequenceList", "Sequence", org.exolab.castor.xml.NodeType.Element);
107 handler = new org.exolab.castor.xml.XMLFieldHandler() {
108 public java.lang.Object getValue( java.lang.Object object )
109 throws IllegalStateException
111 SequenceSet target = (SequenceSet) object;
112 return target.getSequence();
114 public void setValue( java.lang.Object object, java.lang.Object value)
115 throws IllegalStateException, IllegalArgumentException
118 SequenceSet target = (SequenceSet) object;
119 target.addSequence( (org.vamsas.objects.core.Sequence) value);
121 catch (java.lang.Exception ex) {
122 throw new IllegalStateException(ex.toString());
125 public java.lang.Object newInstance( java.lang.Object parent ) {
126 return new org.vamsas.objects.core.Sequence();
129 desc.setHandler(handler);
130 desc.setNameSpaceURI("http://www.vamsas.org");
131 desc.setRequired(true);
132 desc.setMultivalued(true);
133 addFieldDescriptor(desc);
135 //-- validation code for: _sequenceList
136 fieldValidator = new org.exolab.castor.xml.FieldValidator();
137 fieldValidator.setMinOccurs(1);
140 desc.setValidator(fieldValidator);
141 //-- _sequenceSetAnnotationsList
142 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.SequenceSetAnnotations.class, "_sequenceSetAnnotationsList", "SequenceSetAnnotations", org.exolab.castor.xml.NodeType.Element);
143 handler = new org.exolab.castor.xml.XMLFieldHandler() {
144 public java.lang.Object getValue( java.lang.Object object )
145 throws IllegalStateException
147 SequenceSet target = (SequenceSet) object;
148 return target.getSequenceSetAnnotations();
150 public void setValue( java.lang.Object object, java.lang.Object value)
151 throws IllegalStateException, IllegalArgumentException
154 SequenceSet target = (SequenceSet) object;
155 target.addSequenceSetAnnotations( (org.vamsas.objects.core.SequenceSetAnnotations) value);
157 catch (java.lang.Exception ex) {
158 throw new IllegalStateException(ex.toString());
161 public java.lang.Object newInstance( java.lang.Object parent ) {
162 return new org.vamsas.objects.core.SequenceSetAnnotations();
165 desc.setHandler(handler);
166 desc.setNameSpaceURI("http://www.vamsas.org");
167 desc.setMultivalued(true);
168 addFieldDescriptor(desc);
170 //-- validation code for: _sequenceSetAnnotationsList
171 fieldValidator = new org.exolab.castor.xml.FieldValidator();
172 fieldValidator.setMinOccurs(0);
175 desc.setValidator(fieldValidator);
177 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Alignment.class, "_alignmentList", "Alignment", org.exolab.castor.xml.NodeType.Element);
178 handler = new org.exolab.castor.xml.XMLFieldHandler() {
179 public java.lang.Object getValue( java.lang.Object object )
180 throws IllegalStateException
182 SequenceSet target = (SequenceSet) object;
183 return target.getAlignment();
185 public void setValue( java.lang.Object object, java.lang.Object value)
186 throws IllegalStateException, IllegalArgumentException
189 SequenceSet target = (SequenceSet) object;
190 target.addAlignment( (org.vamsas.objects.core.Alignment) value);
192 catch (java.lang.Exception ex) {
193 throw new IllegalStateException(ex.toString());
196 public java.lang.Object newInstance( java.lang.Object parent ) {
197 return new org.vamsas.objects.core.Alignment();
200 desc.setHandler(handler);
201 desc.setNameSpaceURI("http://www.vamsas.org");
202 desc.setMultivalued(true);
203 addFieldDescriptor(desc);
205 //-- validation code for: _alignmentList
206 fieldValidator = new org.exolab.castor.xml.FieldValidator();
207 fieldValidator.setMinOccurs(0);
210 desc.setValidator(fieldValidator);
212 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);
213 handler = new org.exolab.castor.xml.XMLFieldHandler() {
214 public java.lang.Object getValue( java.lang.Object object )
215 throws IllegalStateException
217 SequenceSet target = (SequenceSet) object;
218 return target.getTree();
220 public void setValue( java.lang.Object object, java.lang.Object value)
221 throws IllegalStateException, IllegalArgumentException
224 SequenceSet target = (SequenceSet) object;
225 target.addTree( (org.vamsas.objects.core.Tree) value);
227 catch (java.lang.Exception ex) {
228 throw new IllegalStateException(ex.toString());
231 public java.lang.Object newInstance( java.lang.Object parent ) {
232 return new org.vamsas.objects.core.Tree();
235 desc.setHandler(handler);
236 desc.setNameSpaceURI("http://www.vamsas.org");
237 desc.setMultivalued(true);
238 addFieldDescriptor(desc);
240 //-- validation code for: _treeList
241 fieldValidator = new org.exolab.castor.xml.FieldValidator();
242 fieldValidator.setMinOccurs(0);
245 desc.setValidator(fieldValidator);
247 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenanceList", "Provenance", org.exolab.castor.xml.NodeType.Element);
248 handler = new org.exolab.castor.xml.XMLFieldHandler() {
249 public java.lang.Object getValue( java.lang.Object object )
250 throws IllegalStateException
252 SequenceSet target = (SequenceSet) object;
253 return target.getProvenance();
255 public void setValue( java.lang.Object object, java.lang.Object value)
256 throws IllegalStateException, IllegalArgumentException
259 SequenceSet target = (SequenceSet) object;
260 target.addProvenance( (org.vamsas.objects.core.Provenance) value);
262 catch (java.lang.Exception ex) {
263 throw new IllegalStateException(ex.toString());
266 public java.lang.Object newInstance( java.lang.Object parent ) {
267 return new org.vamsas.objects.core.Provenance();
270 desc.setHandler(handler);
271 desc.setNameSpaceURI("http://www.vamsas.org");
272 desc.setRequired(true);
273 desc.setMultivalued(true);
274 addFieldDescriptor(desc);
276 //-- validation code for: _provenanceList
277 fieldValidator = new org.exolab.castor.xml.FieldValidator();
278 fieldValidator.setMinOccurs(1);
281 desc.setValidator(fieldValidator);
282 } //-- org.vamsas.objects.core.SequenceSetDescriptor()
290 * Method getAccessMode
296 public org.exolab.castor.mapping.AccessMode getAccessMode()
299 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
306 * @return ClassDescriptor
308 public org.exolab.castor.mapping.ClassDescriptor getExtends()
311 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
318 * @return FieldDescriptor
320 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
323 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
326 * Method getJavaClass
332 public java.lang.Class getJavaClass()
334 return org.vamsas.objects.core.SequenceSet.class;
335 } //-- java.lang.Class getJavaClass()
338 * Method getNameSpacePrefix
344 public java.lang.String getNameSpacePrefix()
347 } //-- java.lang.String getNameSpacePrefix()
350 * Method getNameSpaceURI
356 public java.lang.String getNameSpaceURI()
359 } //-- java.lang.String getNameSpaceURI()
362 * Method getValidator
366 * @return TypeValidator
368 public org.exolab.castor.xml.TypeValidator getValidator()
371 } //-- org.exolab.castor.xml.TypeValidator getValidator()
380 public java.lang.String getXMLName()
383 } //-- java.lang.String getXMLName()