1
2
3
4
5
6
7
8 package org.astrogrid.registry.beans.resource;
9
10
11
12
13
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.*;
18
19 /***
20 * Class CurationTypeDescriptor.
21 *
22 * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:22 $
23 */
24 public class CurationTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27
28
29
30
31 /***
32 * Field nsPrefix
33 */
34 private java.lang.String nsPrefix;
35
36 /***
37 * Field nsURI
38 */
39 private java.lang.String nsURI;
40
41 /***
42 * Field xmlName
43 */
44 private java.lang.String xmlName;
45
46 /***
47 * Field identity
48 */
49 private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52
53
54
55
56 public CurationTypeDescriptor() {
57 super();
58 nsURI = "http://www.ivoa.net/xml/VOResource/v0.9";
59 xmlName = "CurationType";
60
61
62 setCompositorAsSequence();
63 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64 org.exolab.castor.xml.XMLFieldHandler handler = null;
65 org.exolab.castor.xml.FieldValidator fieldValidator = null;
66
67
68
69
70
71 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.resource.ResourceReferenceType.class, "_publisher", "Publisher", org.exolab.castor.xml.NodeType.Element);
72 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
73 public java.lang.Object getValue( java.lang.Object object )
74 throws IllegalStateException
75 {
76 CurationType target = (CurationType) object;
77 return target.getPublisher();
78 }
79 public void setValue( java.lang.Object object, java.lang.Object value)
80 throws IllegalStateException, IllegalArgumentException
81 {
82 try {
83 CurationType target = (CurationType) object;
84 target.setPublisher( (org.astrogrid.registry.beans.resource.ResourceReferenceType) value);
85 }
86 catch (java.lang.Exception ex) {
87 throw new IllegalStateException(ex.toString());
88 }
89 }
90 public java.lang.Object newInstance( java.lang.Object parent ) {
91 return new org.astrogrid.registry.beans.resource.ResourceReferenceType();
92 }
93 } );
94 desc.setHandler(handler);
95 desc.setNameSpaceURI("http://www.ivoa.net/xml/VOResource/v0.9");
96 desc.setRequired(true);
97 desc.setMultivalued(false);
98 addFieldDescriptor(desc);
99
100
101 fieldValidator = new org.exolab.castor.xml.FieldValidator();
102 fieldValidator.setMinOccurs(1);
103 {
104 }
105 desc.setValidator(fieldValidator);
106
107 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.resource.ContactType.class, "_contact", "Contact", org.exolab.castor.xml.NodeType.Element);
108 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
109 public java.lang.Object getValue( java.lang.Object object )
110 throws IllegalStateException
111 {
112 CurationType target = (CurationType) object;
113 return target.getContact();
114 }
115 public void setValue( java.lang.Object object, java.lang.Object value)
116 throws IllegalStateException, IllegalArgumentException
117 {
118 try {
119 CurationType target = (CurationType) object;
120 target.setContact( (org.astrogrid.registry.beans.resource.ContactType) value);
121 }
122 catch (java.lang.Exception ex) {
123 throw new IllegalStateException(ex.toString());
124 }
125 }
126 public java.lang.Object newInstance( java.lang.Object parent ) {
127 return new org.astrogrid.registry.beans.resource.ContactType();
128 }
129 } );
130 desc.setHandler(handler);
131 desc.setNameSpaceURI("http://www.ivoa.net/xml/VOResource/v0.9");
132 desc.setRequired(true);
133 desc.setMultivalued(false);
134 addFieldDescriptor(desc);
135
136
137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
138 fieldValidator.setMinOccurs(1);
139 {
140 }
141 desc.setValidator(fieldValidator);
142
143 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.resource.DateType.class, "_dateList", "Date", org.exolab.castor.xml.NodeType.Element);
144 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
145 public java.lang.Object getValue( java.lang.Object object )
146 throws IllegalStateException
147 {
148 CurationType target = (CurationType) object;
149 return target.getDate();
150 }
151 public void setValue( java.lang.Object object, java.lang.Object value)
152 throws IllegalStateException, IllegalArgumentException
153 {
154 try {
155 CurationType target = (CurationType) object;
156 target.addDate( (org.astrogrid.registry.beans.resource.DateType) value);
157 }
158 catch (java.lang.Exception ex) {
159 throw new IllegalStateException(ex.toString());
160 }
161 }
162 public java.lang.Object newInstance( java.lang.Object parent ) {
163 return new org.astrogrid.registry.beans.resource.DateType();
164 }
165 } );
166 desc.setHandler(handler);
167 desc.setNameSpaceURI("http://www.ivoa.net/xml/VOResource/v0.9");
168 desc.setMultivalued(true);
169 addFieldDescriptor(desc);
170
171
172 fieldValidator = new org.exolab.castor.xml.FieldValidator();
173 fieldValidator.setMinOccurs(0);
174 {
175 }
176 desc.setValidator(fieldValidator);
177
178 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.resource.CreatorType.class, "_creator", "Creator", org.exolab.castor.xml.NodeType.Element);
179 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
180 public java.lang.Object getValue( java.lang.Object object )
181 throws IllegalStateException
182 {
183 CurationType target = (CurationType) object;
184 return target.getCreator();
185 }
186 public void setValue( java.lang.Object object, java.lang.Object value)
187 throws IllegalStateException, IllegalArgumentException
188 {
189 try {
190 CurationType target = (CurationType) object;
191 target.setCreator( (org.astrogrid.registry.beans.resource.CreatorType) value);
192 }
193 catch (java.lang.Exception ex) {
194 throw new IllegalStateException(ex.toString());
195 }
196 }
197 public java.lang.Object newInstance( java.lang.Object parent ) {
198 return new org.astrogrid.registry.beans.resource.CreatorType();
199 }
200 } );
201 desc.setHandler(handler);
202 desc.setNameSpaceURI("http://www.ivoa.net/xml/VOResource/v0.9");
203 desc.setMultivalued(false);
204 addFieldDescriptor(desc);
205
206
207 fieldValidator = new org.exolab.castor.xml.FieldValidator();
208 {
209 }
210 desc.setValidator(fieldValidator);
211
212 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.registry.beans.resource.NameReferenceType.class, "_contributorList", "Contributor", 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
216 {
217 CurationType target = (CurationType) object;
218 return target.getContributor();
219 }
220 public void setValue( java.lang.Object object, java.lang.Object value)
221 throws IllegalStateException, IllegalArgumentException
222 {
223 try {
224 CurationType target = (CurationType) object;
225 target.addContributor( (org.astrogrid.registry.beans.resource.NameReferenceType) value);
226 }
227 catch (java.lang.Exception ex) {
228 throw new IllegalStateException(ex.toString());
229 }
230 }
231 public java.lang.Object newInstance( java.lang.Object parent ) {
232 return new org.astrogrid.registry.beans.resource.NameReferenceType();
233 }
234 } );
235 desc.setHandler(handler);
236 desc.setNameSpaceURI("http://www.ivoa.net/xml/VOResource/v0.9");
237 desc.setMultivalued(true);
238 addFieldDescriptor(desc);
239
240
241 fieldValidator = new org.exolab.castor.xml.FieldValidator();
242 fieldValidator.setMinOccurs(0);
243 {
244 }
245 desc.setValidator(fieldValidator);
246
247 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "Version", org.exolab.castor.xml.NodeType.Element);
248 desc.setImmutable(true);
249 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
250 public java.lang.Object getValue( java.lang.Object object )
251 throws IllegalStateException
252 {
253 CurationType target = (CurationType) object;
254 return target.getVersion();
255 }
256 public void setValue( java.lang.Object object, java.lang.Object value)
257 throws IllegalStateException, IllegalArgumentException
258 {
259 try {
260 CurationType target = (CurationType) object;
261 target.setVersion( (java.lang.String) value);
262 }
263 catch (java.lang.Exception ex) {
264 throw new IllegalStateException(ex.toString());
265 }
266 }
267 public java.lang.Object newInstance( java.lang.Object parent ) {
268 return null;
269 }
270 } );
271 desc.setHandler(handler);
272 desc.setNameSpaceURI("http://www.ivoa.net/xml/VOResource/v0.9");
273 desc.setMultivalued(false);
274 addFieldDescriptor(desc);
275
276
277 fieldValidator = new org.exolab.castor.xml.FieldValidator();
278 {
279 StringValidator typeValidator = new StringValidator();
280 typeValidator.setWhiteSpace("preserve");
281 fieldValidator.setValidator(typeValidator);
282 }
283 desc.setValidator(fieldValidator);
284 }
285
286
287
288
289
290
291 /***
292 * Method getAccessMode
293 */
294 public org.exolab.castor.mapping.AccessMode getAccessMode()
295 {
296 return null;
297 }
298
299 /***
300 * Method getExtends
301 */
302 public org.exolab.castor.mapping.ClassDescriptor getExtends()
303 {
304 return null;
305 }
306
307 /***
308 * Method getIdentity
309 */
310 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
311 {
312 return identity;
313 }
314
315 /***
316 * Method getJavaClass
317 */
318 public java.lang.Class getJavaClass()
319 {
320 return org.astrogrid.registry.beans.resource.CurationType.class;
321 }
322
323 /***
324 * Method getNameSpacePrefix
325 */
326 public java.lang.String getNameSpacePrefix()
327 {
328 return nsPrefix;
329 }
330
331 /***
332 * Method getNameSpaceURI
333 */
334 public java.lang.String getNameSpaceURI()
335 {
336 return nsURI;
337 }
338
339 /***
340 * Method getValidator
341 */
342 public org.exolab.castor.xml.TypeValidator getValidator()
343 {
344 return this;
345 }
346
347 /***
348 * Method getXMLName
349 */
350 public java.lang.String getXMLName()
351 {
352 return xmlName;
353 }
354
355 }