2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package uk.ac.vamsas.objects.core.descriptors;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import uk.ac.vamsas.objects.core.Entry;
\r
17 * Class EntryDescriptor.
\r
19 * @version $Revision$ $Date$
\r
21 public class EntryDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
\r
24 //--------------------------/
\r
25 //- Class/Member Variables -/
\r
26 //--------------------------/
\r
29 * Field _elementDefinition.
\r
31 private boolean _elementDefinition;
\r
36 private java.lang.String _nsPrefix;
\r
41 private java.lang.String _nsURI;
\r
46 private java.lang.String _xmlName;
\r
51 private org.exolab.castor.xml.XMLFieldDescriptor _identity;
\r
58 public EntryDescriptor() {
\r
60 _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";
\r
62 _elementDefinition = true;
\r
64 //-- set grouping compositor
\r
65 setCompositorAsSequence();
\r
66 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
\r
67 org.exolab.castor.mapping.FieldHandler handler = null;
\r
68 org.exolab.castor.xml.FieldValidator fieldValidator = null;
\r
69 //-- initialize attribute descriptors
\r
72 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
\r
73 this._identity = desc;
\r
74 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
75 public java.lang.Object getValue( java.lang.Object object )
\r
76 throws IllegalStateException
\r
78 Entry target = (Entry) object;
\r
79 return target.getId();
\r
81 public void setValue( java.lang.Object object, java.lang.Object value)
\r
82 throws IllegalStateException, IllegalArgumentException
\r
85 Entry target = (Entry) object;
\r
86 target.setId( (java.lang.String) value);
\r
87 } catch (java.lang.Exception ex) {
\r
88 throw new IllegalStateException(ex.toString());
\r
91 public java.lang.Object newInstance(java.lang.Object parent) {
\r
92 return new java.lang.String();
\r
95 desc.setHandler(handler);
\r
96 desc.setMultivalued(false);
\r
97 addFieldDescriptor(desc);
\r
99 //-- validation code for: _id
\r
100 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
102 org.exolab.castor.xml.validators.IdValidator typeValidator;
\r
103 typeValidator = new org.exolab.castor.xml.validators.IdValidator();
\r
104 fieldValidator.setValidator(typeValidator);
\r
106 desc.setValidator(fieldValidator);
\r
107 //-- initialize element descriptors
\r
110 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_user", "User", org.exolab.castor.xml.NodeType.Element);
\r
111 desc.setImmutable(true);
\r
112 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
113 public java.lang.Object getValue( java.lang.Object object )
\r
114 throws IllegalStateException
\r
116 Entry target = (Entry) object;
\r
117 return target.getUser();
\r
119 public void setValue( java.lang.Object object, java.lang.Object value)
\r
120 throws IllegalStateException, IllegalArgumentException
\r
123 Entry target = (Entry) object;
\r
124 target.setUser( (java.lang.String) value);
\r
125 } catch (java.lang.Exception ex) {
\r
126 throw new IllegalStateException(ex.toString());
\r
129 public java.lang.Object newInstance(java.lang.Object parent) {
\r
133 desc.setHandler(handler);
\r
134 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
135 desc.setRequired(true);
\r
136 desc.setMultivalued(false);
\r
137 addFieldDescriptor(desc);
\r
139 //-- validation code for: _user
\r
140 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
141 fieldValidator.setMinOccurs(1);
\r
143 org.exolab.castor.xml.validators.StringValidator typeValidator;
\r
144 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
\r
145 fieldValidator.setValidator(typeValidator);
\r
146 typeValidator.setWhiteSpace("preserve");
\r
148 desc.setValidator(fieldValidator);
\r
150 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_app", "App", org.exolab.castor.xml.NodeType.Element);
\r
151 desc.setImmutable(true);
\r
152 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
153 public java.lang.Object getValue( java.lang.Object object )
\r
154 throws IllegalStateException
\r
156 Entry target = (Entry) object;
\r
157 return target.getApp();
\r
159 public void setValue( java.lang.Object object, java.lang.Object value)
\r
160 throws IllegalStateException, IllegalArgumentException
\r
163 Entry target = (Entry) object;
\r
164 target.setApp( (java.lang.String) value);
\r
165 } catch (java.lang.Exception ex) {
\r
166 throw new IllegalStateException(ex.toString());
\r
169 public java.lang.Object newInstance(java.lang.Object parent) {
\r
173 desc.setHandler(handler);
\r
174 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
175 desc.setRequired(true);
\r
176 desc.setMultivalued(false);
\r
177 addFieldDescriptor(desc);
\r
179 //-- validation code for: _app
\r
180 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
181 fieldValidator.setMinOccurs(1);
\r
183 org.exolab.castor.xml.validators.StringValidator typeValidator;
\r
184 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
\r
185 fieldValidator.setValidator(typeValidator);
\r
186 typeValidator.setWhiteSpace("preserve");
\r
188 desc.setValidator(fieldValidator);
\r
190 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_action", "Action", org.exolab.castor.xml.NodeType.Element);
\r
191 desc.setImmutable(true);
\r
192 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
193 public java.lang.Object getValue( java.lang.Object object )
\r
194 throws IllegalStateException
\r
196 Entry target = (Entry) object;
\r
197 return target.getAction();
\r
199 public void setValue( java.lang.Object object, java.lang.Object value)
\r
200 throws IllegalStateException, IllegalArgumentException
\r
203 Entry target = (Entry) object;
\r
204 target.setAction( (java.lang.String) value);
\r
205 } catch (java.lang.Exception ex) {
\r
206 throw new IllegalStateException(ex.toString());
\r
209 public java.lang.Object newInstance(java.lang.Object parent) {
\r
213 desc.setHandler(handler);
\r
214 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
215 desc.setRequired(true);
\r
216 desc.setMultivalued(false);
\r
217 addFieldDescriptor(desc);
\r
219 //-- validation code for: _action
\r
220 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
221 fieldValidator.setMinOccurs(1);
\r
223 org.exolab.castor.xml.validators.StringValidator typeValidator;
\r
224 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
\r
225 fieldValidator.setValidator(typeValidator);
\r
226 typeValidator.setWhiteSpace("preserve");
\r
228 desc.setValidator(fieldValidator);
\r
230 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.types.Date.class, "_date", "Date", org.exolab.castor.xml.NodeType.Element);
\r
231 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
232 public java.lang.Object getValue( java.lang.Object object )
\r
233 throws IllegalStateException
\r
235 Entry target = (Entry) object;
\r
236 return target.getDate();
\r
238 public void setValue( java.lang.Object object, java.lang.Object value)
\r
239 throws IllegalStateException, IllegalArgumentException
\r
242 Entry target = (Entry) object;
\r
243 target.setDate( (org.exolab.castor.types.Date) value);
\r
244 } catch (java.lang.Exception ex) {
\r
245 throw new IllegalStateException(ex.toString());
\r
248 public java.lang.Object newInstance(java.lang.Object parent) {
\r
249 return new org.exolab.castor.types.Date();
\r
252 desc.setHandler(handler);
\r
253 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
254 desc.setRequired(true);
\r
255 desc.setMultivalued(false);
\r
256 addFieldDescriptor(desc);
\r
258 //-- validation code for: _date
\r
259 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
260 fieldValidator.setMinOccurs(1);
\r
262 org.exolab.castor.xml.validators.DateTimeValidator typeValidator;
\r
263 typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();
\r
264 fieldValidator.setValidator(typeValidator);
\r
266 desc.setValidator(fieldValidator);
\r
268 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);
\r
269 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
270 public java.lang.Object getValue( java.lang.Object object )
\r
271 throws IllegalStateException
\r
273 Entry target = (Entry) object;
\r
274 return target.getProperty();
\r
276 public void setValue( java.lang.Object object, java.lang.Object value)
\r
277 throws IllegalStateException, IllegalArgumentException
\r
280 Entry target = (Entry) object;
\r
281 target.addProperty( (uk.ac.vamsas.objects.core.Property) value);
\r
282 } catch (java.lang.Exception ex) {
\r
283 throw new IllegalStateException(ex.toString());
\r
286 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
\r
288 Entry target = (Entry) object;
\r
289 target.removeAllProperty();
\r
290 } catch (java.lang.Exception ex) {
\r
291 throw new IllegalStateException(ex.toString());
\r
294 public java.lang.Object newInstance(java.lang.Object parent) {
\r
295 return new uk.ac.vamsas.objects.core.Property();
\r
298 desc.setHandler(handler);
\r
299 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
300 desc.setMultivalued(true);
\r
301 addFieldDescriptor(desc);
\r
303 //-- validation code for: _propertyList
\r
304 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
305 fieldValidator.setMinOccurs(0);
\r
308 desc.setValidator(fieldValidator);
\r
310 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element);
\r
311 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
312 public java.lang.Object getValue( java.lang.Object object )
\r
313 throws IllegalStateException
\r
315 Entry target = (Entry) object;
\r
316 return target.getParam();
\r
318 public void setValue( java.lang.Object object, java.lang.Object value)
\r
319 throws IllegalStateException, IllegalArgumentException
\r
322 Entry target = (Entry) object;
\r
323 target.addParam( (uk.ac.vamsas.objects.core.Param) value);
\r
324 } catch (java.lang.Exception ex) {
\r
325 throw new IllegalStateException(ex.toString());
\r
328 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
\r
330 Entry target = (Entry) object;
\r
331 target.removeAllParam();
\r
332 } catch (java.lang.Exception ex) {
\r
333 throw new IllegalStateException(ex.toString());
\r
336 public java.lang.Object newInstance(java.lang.Object parent) {
\r
337 return new uk.ac.vamsas.objects.core.Param();
\r
340 desc.setHandler(handler);
\r
341 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
342 desc.setMultivalued(true);
\r
343 addFieldDescriptor(desc);
\r
345 //-- validation code for: _paramList
\r
346 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
347 fieldValidator.setMinOccurs(0);
\r
350 desc.setValidator(fieldValidator);
\r
352 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Input.class, "_inputList", "input", org.exolab.castor.xml.NodeType.Element);
\r
353 handler = new org.exolab.castor.xml.XMLFieldHandler() {
\r
354 public java.lang.Object getValue( java.lang.Object object )
\r
355 throws IllegalStateException
\r
357 Entry target = (Entry) object;
\r
358 return target.getInput();
\r
360 public void setValue( java.lang.Object object, java.lang.Object value)
\r
361 throws IllegalStateException, IllegalArgumentException
\r
364 Entry target = (Entry) object;
\r
365 target.addInput( (uk.ac.vamsas.objects.core.Input) value);
\r
366 } catch (java.lang.Exception ex) {
\r
367 throw new IllegalStateException(ex.toString());
\r
370 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
\r
372 Entry target = (Entry) object;
\r
373 target.removeAllInput();
\r
374 } catch (java.lang.Exception ex) {
\r
375 throw new IllegalStateException(ex.toString());
\r
378 public java.lang.Object newInstance(java.lang.Object parent) {
\r
379 return new uk.ac.vamsas.objects.core.Input();
\r
382 desc.setHandler(handler);
\r
383 desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");
\r
384 desc.setMultivalued(true);
\r
385 addFieldDescriptor(desc);
\r
387 //-- validation code for: _inputList
\r
388 fieldValidator = new org.exolab.castor.xml.FieldValidator();
\r
389 fieldValidator.setMinOccurs(0);
\r
392 desc.setValidator(fieldValidator);
\r
401 * Method getAccessMode.
\r
403 * @return the access mode specified for this class.
\r
405 public org.exolab.castor.mapping.AccessMode getAccessMode(
\r
411 * Method getIdentity.
\r
413 * @return the identity field, null if this class has no
\r
416 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
\r
422 * Method getJavaClass.
\r
424 * @return the Java class represented by this descriptor.
\r
426 public java.lang.Class getJavaClass(
\r
428 return uk.ac.vamsas.objects.core.Entry.class;
\r
432 * Method getNameSpacePrefix.
\r
434 * @return the namespace prefix to use when marshaling as XML.
\r
436 public java.lang.String getNameSpacePrefix(
\r
442 * Method getNameSpaceURI.
\r
444 * @return the namespace URI used when marshaling and
\r
445 * unmarshaling as XML.
\r
447 public java.lang.String getNameSpaceURI(
\r
453 * Method getValidator.
\r
455 * @return a specific validator for the class described by this
\r
458 public org.exolab.castor.xml.TypeValidator getValidator(
\r
464 * Method getXMLName.
\r
466 * @return the XML Name for the Class being described.
\r
468 public java.lang.String getXMLName(
\r
474 * Method isElementDefinition.
\r
476 * @return true if XML schema definition of this Class is that
\r
478 * element or element with anonymous type definition.
\r
480 public boolean isElementDefinition(
\r
482 return _elementDefinition;
\r