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 VAMSASDescriptor.
22 * @version $Revision$ $Date$
24 public class VAMSASDescriptor 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 VAMSASDescriptor()
59 nsURI = "http://www.vamsas.org";
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 VAMSAS target = (VAMSAS) object;
77 return target.getId();
79 public void setValue( java.lang.Object object, java.lang.Object value)
80 throws IllegalStateException, IllegalArgumentException
83 VAMSAS target = (VAMSAS) 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.Tree.class, "_treeList", "Tree", 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 VAMSAS target = (VAMSAS) object;
112 return target.getTree();
114 public void setValue( java.lang.Object object, java.lang.Object value)
115 throws IllegalStateException, IllegalArgumentException
118 VAMSAS target = (VAMSAS) object;
119 target.addTree( (org.vamsas.objects.core.Tree) 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.Tree();
129 desc.setHandler(handler);
130 desc.setNameSpaceURI("http://www.vamsas.org");
131 desc.setMultivalued(true);
132 addFieldDescriptor(desc);
134 //-- validation code for: _treeList
135 fieldValidator = new org.exolab.castor.xml.FieldValidator();
136 fieldValidator.setMinOccurs(0);
139 desc.setValidator(fieldValidator);
141 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.DataSet.class, "_dataSetList", "DataSet", org.exolab.castor.xml.NodeType.Element);
142 handler = new org.exolab.castor.xml.XMLFieldHandler() {
143 public java.lang.Object getValue( java.lang.Object object )
144 throws IllegalStateException
146 VAMSAS target = (VAMSAS) object;
147 return target.getDataSet();
149 public void setValue( java.lang.Object object, java.lang.Object value)
150 throws IllegalStateException, IllegalArgumentException
153 VAMSAS target = (VAMSAS) object;
154 target.addDataSet( (org.vamsas.objects.core.DataSet) value);
156 catch (java.lang.Exception ex) {
157 throw new IllegalStateException(ex.toString());
160 public java.lang.Object newInstance( java.lang.Object parent ) {
161 return new org.vamsas.objects.core.DataSet();
164 desc.setHandler(handler);
165 desc.setNameSpaceURI("http://www.vamsas.org");
166 desc.setMultivalued(true);
167 addFieldDescriptor(desc);
169 //-- validation code for: _dataSetList
170 fieldValidator = new org.exolab.castor.xml.FieldValidator();
171 fieldValidator.setMinOccurs(0);
174 desc.setValidator(fieldValidator);
175 } //-- org.vamsas.objects.core.VAMSASDescriptor()
183 * Method getAccessMode
189 public org.exolab.castor.mapping.AccessMode getAccessMode()
192 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
199 * @return ClassDescriptor
201 public org.exolab.castor.mapping.ClassDescriptor getExtends()
204 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
211 * @return FieldDescriptor
213 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
216 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
219 * Method getJavaClass
225 public java.lang.Class getJavaClass()
227 return org.vamsas.objects.core.VAMSAS.class;
228 } //-- java.lang.Class getJavaClass()
231 * Method getNameSpacePrefix
237 public java.lang.String getNameSpacePrefix()
240 } //-- java.lang.String getNameSpacePrefix()
243 * Method getNameSpaceURI
249 public java.lang.String getNameSpaceURI()
252 } //-- java.lang.String getNameSpaceURI()
255 * Method getValidator
259 * @return TypeValidator
261 public org.exolab.castor.xml.TypeValidator getValidator()
264 } //-- org.exolab.castor.xml.TypeValidator getValidator()
273 public java.lang.String getXMLName()
276 } //-- java.lang.String getXMLName()