KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportdefinitions > MetricSourceDefinitionDescriptor


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4  * Schema.
5  * $Id$
6  */

7
8 package com.calipso.reportgenerator.reportdefinitions;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
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 MetricSourceDefinitionDescriptor.
21  *
22  * @version $Revision$ $Date$
23  */

24 public class MetricSourceDefinitionDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27       //--------------------------/
28
//- Class/Member Variables -/
29
//--------------------------/
30

31     /**
32      * Field nsPrefix
33      */

34     private java.lang.String JavaDoc nsPrefix;
35
36     /**
37      * Field nsURI
38      */

39     private java.lang.String JavaDoc nsURI;
40
41     /**
42      * Field xmlName
43      */

44     private java.lang.String JavaDoc xmlName;
45
46     /**
47      * Field identity
48      */

49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53
//- Constructors -/
54
//----------------/
55

56     public MetricSourceDefinitionDescriptor() {
57         super();
58         xmlName = "MetricSourceDefinition";
59         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60         org.exolab.castor.xml.XMLFieldHandler handler = null;
61         org.exolab.castor.xml.FieldValidator fieldValidator = null;
62         //-- initialize attribute descriptors
63

64         //-- _name
65
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_name", "Name", org.exolab.castor.xml.NodeType.Attribute);
66         desc.setImmutable(true);
67         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
68             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
69                 throws IllegalStateException JavaDoc
70             {
71                 MetricSourceDefinition target = (MetricSourceDefinition) object;
72                 return target.getName();
73             }
74             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
75                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
76             {
77                 try {
78                     MetricSourceDefinition target = (MetricSourceDefinition) object;
79                     target.setName( (java.lang.String JavaDoc) value);
80                 }
81                 catch (java.lang.Exception JavaDoc ex) {
82                     throw new IllegalStateException JavaDoc(ex.toString());
83                 }
84             }
85             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
86                 return null;
87             }
88         } );
89         desc.setHandler(handler);
90         desc.setRequired(true);
91         addFieldDescriptor(desc);
92         
93         //-- validation code for: _name
94
fieldValidator = new org.exolab.castor.xml.FieldValidator();
95         fieldValidator.setMinOccurs(1);
96         { //-- local scope
97
StringValidator typeValidator = new StringValidator();
98             typeValidator.setWhiteSpace("preserve");
99             fieldValidator.setValidator(typeValidator);
100         }
101         desc.setValidator(fieldValidator);
102         //-- _description
103
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_description", "Description", org.exolab.castor.xml.NodeType.Attribute);
104         desc.setImmutable(true);
105         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
106             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
107                 throws IllegalStateException JavaDoc
108             {
109                 MetricSourceDefinition target = (MetricSourceDefinition) object;
110                 return target.getDescription();
111             }
112             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
113                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
114             {
115                 try {
116                     MetricSourceDefinition target = (MetricSourceDefinition) object;
117                     target.setDescription( (java.lang.String JavaDoc) value);
118                 }
119                 catch (java.lang.Exception JavaDoc ex) {
120                     throw new IllegalStateException JavaDoc(ex.toString());
121                 }
122             }
123             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
124                 return null;
125             }
126         } );
127         desc.setHandler(handler);
128         desc.setRequired(true);
129         addFieldDescriptor(desc);
130         
131         //-- validation code for: _description
132
fieldValidator = new org.exolab.castor.xml.FieldValidator();
133         fieldValidator.setMinOccurs(1);
134         { //-- local scope
135
StringValidator typeValidator = new StringValidator();
136             typeValidator.setWhiteSpace("preserve");
137             fieldValidator.setValidator(typeValidator);
138         }
139         desc.setValidator(fieldValidator);
140         //-- _aggregateType
141
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.CalculationType.class, "_aggregateType", "AggregateType", org.exolab.castor.xml.NodeType.Attribute);
142         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
143             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
144                 throws IllegalStateException JavaDoc
145             {
146                 MetricSourceDefinition target = (MetricSourceDefinition) object;
147                 return target.getAggregateType();
148             }
149             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
150                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
151             {
152                 try {
153                     MetricSourceDefinition target = (MetricSourceDefinition) object;
154                     target.setAggregateType( (com.calipso.reportgenerator.reportdefinitions.types.CalculationType) value);
155                 }
156                 catch (java.lang.Exception JavaDoc ex) {
157                     throw new IllegalStateException JavaDoc(ex.toString());
158                 }
159             }
160             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
161                 return null;
162             }
163         } );
164         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.CalculationType.class, handler));
165         desc.setImmutable(true);
166         addFieldDescriptor(desc);
167         
168         //-- validation code for: _aggregateType
169
fieldValidator = new org.exolab.castor.xml.FieldValidator();
170         { //-- local scope
171
}
172         desc.setValidator(fieldValidator);
173         //-- _groupFooterType
174
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.CalculationType.class, "_groupFooterType", "GroupFooterType", org.exolab.castor.xml.NodeType.Attribute);
175         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
176             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
177                 throws IllegalStateException JavaDoc
178             {
179                 MetricSourceDefinition target = (MetricSourceDefinition) object;
180                 return target.getGroupFooterType();
181             }
182             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
183                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
184             {
185                 try {
186                     MetricSourceDefinition target = (MetricSourceDefinition) object;
187                     target.setGroupFooterType( (com.calipso.reportgenerator.reportdefinitions.types.CalculationType) value);
188                 }
189                 catch (java.lang.Exception JavaDoc ex) {
190                     throw new IllegalStateException JavaDoc(ex.toString());
191                 }
192             }
193             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
194                 return null;
195             }
196         } );
197         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.CalculationType.class, handler));
198         desc.setImmutable(true);
199         addFieldDescriptor(desc);
200         
201         //-- validation code for: _groupFooterType
202
fieldValidator = new org.exolab.castor.xml.FieldValidator();
203         { //-- local scope
204
}
205         desc.setValidator(fieldValidator);
206         //-- _calculated
207
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_calculated", "Calculated", org.exolab.castor.xml.NodeType.Attribute);
208         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
209             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
210                 throws IllegalStateException JavaDoc
211             {
212                 MetricSourceDefinition target = (MetricSourceDefinition) object;
213                 if(!target.hasCalculated())
214                     return null;
215                 return new Boolean JavaDoc(target.getCalculated());
216             }
217             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
218                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
219             {
220                 try {
221                     MetricSourceDefinition target = (MetricSourceDefinition) object;
222                     // if null, use delete method for optional primitives
223
if (value == null) {
224                         target.deleteCalculated();
225                         return;
226                     }
227                     target.setCalculated( ((Boolean JavaDoc)value).booleanValue());
228                 }
229                 catch (java.lang.Exception JavaDoc ex) {
230                     throw new IllegalStateException JavaDoc(ex.toString());
231                 }
232             }
233             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
234                 return null;
235             }
236         } );
237         desc.setHandler(handler);
238         addFieldDescriptor(desc);
239         
240         //-- validation code for: _calculated
241
fieldValidator = new org.exolab.castor.xml.FieldValidator();
242         { //-- local scope
243
BooleanValidator typeValidator = new BooleanValidator();
244             fieldValidator.setValidator(typeValidator);
245         }
246         desc.setValidator(fieldValidator);
247         //-- _aggregateFunction
248
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_aggregateFunction", "AggregateFunction", org.exolab.castor.xml.NodeType.Attribute);
249         desc.setImmutable(true);
250         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
251             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
252                 throws IllegalStateException JavaDoc
253             {
254                 MetricSourceDefinition target = (MetricSourceDefinition) object;
255                 return target.getAggregateFunction();
256             }
257             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
258                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
259             {
260                 try {
261                     MetricSourceDefinition target = (MetricSourceDefinition) object;
262                     target.setAggregateFunction( (java.lang.String JavaDoc) value);
263                 }
264                 catch (java.lang.Exception JavaDoc ex) {
265                     throw new IllegalStateException JavaDoc(ex.toString());
266                 }
267             }
268             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
269                 return null;
270             }
271         } );
272         desc.setHandler(handler);
273         addFieldDescriptor(desc);
274         
275         //-- validation code for: _aggregateFunction
276
fieldValidator = new org.exolab.castor.xml.FieldValidator();
277         { //-- local scope
278
StringValidator typeValidator = new StringValidator();
279             typeValidator.setWhiteSpace("preserve");
280             fieldValidator.setValidator(typeValidator);
281         }
282         desc.setValidator(fieldValidator);
283         //-- _groupFooterFunction
284
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_groupFooterFunction", "GroupFooterFunction", org.exolab.castor.xml.NodeType.Attribute);
285         desc.setImmutable(true);
286         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
287             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
288                 throws IllegalStateException JavaDoc
289             {
290                 MetricSourceDefinition target = (MetricSourceDefinition) object;
291                 return target.getGroupFooterFunction();
292             }
293             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
294                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
295             {
296                 try {
297                     MetricSourceDefinition target = (MetricSourceDefinition) object;
298                     target.setGroupFooterFunction( (java.lang.String JavaDoc) value);
299                 }
300                 catch (java.lang.Exception JavaDoc ex) {
301                     throw new IllegalStateException JavaDoc(ex.toString());
302                 }
303             }
304             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
305                 return null;
306             }
307         } );
308         desc.setHandler(handler);
309         addFieldDescriptor(desc);
310         
311         //-- validation code for: _groupFooterFunction
312
fieldValidator = new org.exolab.castor.xml.FieldValidator();
313         { //-- local scope
314
StringValidator typeValidator = new StringValidator();
315             typeValidator.setWhiteSpace("preserve");
316             fieldValidator.setValidator(typeValidator);
317         }
318         desc.setValidator(fieldValidator);
319         //-- _externalData
320
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_externalData", "ExternalData", org.exolab.castor.xml.NodeType.Attribute);
321         desc.setImmutable(true);
322         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
323             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
324                 throws IllegalStateException JavaDoc
325             {
326                 MetricSourceDefinition target = (MetricSourceDefinition) object;
327                 return target.getExternalData();
328             }
329             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
330                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
331             {
332                 try {
333                     MetricSourceDefinition target = (MetricSourceDefinition) object;
334                     target.setExternalData( (java.lang.String JavaDoc) value);
335                 }
336                 catch (java.lang.Exception JavaDoc ex) {
337                     throw new IllegalStateException JavaDoc(ex.toString());
338                 }
339             }
340             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
341                 return null;
342             }
343         } );
344         desc.setHandler(handler);
345         addFieldDescriptor(desc);
346         
347         //-- validation code for: _externalData
348
fieldValidator = new org.exolab.castor.xml.FieldValidator();
349         { //-- local scope
350
StringValidator typeValidator = new StringValidator();
351             typeValidator.setWhiteSpace("preserve");
352             fieldValidator.setValidator(typeValidator);
353         }
354         desc.setValidator(fieldValidator);
355         //-- _externalCalculated
356
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_externalCalculated", "ExternalCalculated", org.exolab.castor.xml.NodeType.Attribute);
357         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
358             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
359                 throws IllegalStateException JavaDoc
360             {
361                 MetricSourceDefinition target = (MetricSourceDefinition) object;
362                 if(!target.hasExternalCalculated())
363                     return null;
364                 return new Boolean JavaDoc(target.getExternalCalculated());
365             }
366             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
367                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
368             {
369                 try {
370                     MetricSourceDefinition target = (MetricSourceDefinition) object;
371                     // if null, use delete method for optional primitives
372
if (value == null) {
373                         target.deleteExternalCalculated();
374                         return;
375                     }
376                     target.setExternalCalculated( ((Boolean JavaDoc)value).booleanValue());
377                 }
378                 catch (java.lang.Exception JavaDoc ex) {
379                     throw new IllegalStateException JavaDoc(ex.toString());
380                 }
381             }
382             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
383                 return null;
384             }
385         } );
386         desc.setHandler(handler);
387         addFieldDescriptor(desc);
388         
389         //-- validation code for: _externalCalculated
390
fieldValidator = new org.exolab.castor.xml.FieldValidator();
391         { //-- local scope
392
BooleanValidator typeValidator = new BooleanValidator();
393             fieldValidator.setValidator(typeValidator);
394         }
395         desc.setValidator(fieldValidator);
396         //-- initialize element descriptors
397

398     } //-- com.calipso.reportgenerator.reportdefinitions.MetricSourceDefinitionDescriptor()
399

400
401       //-----------/
402
//- Methods -/
403
//-----------/
404

405     /**
406      * Method getAccessMode
407      */

408     public org.exolab.castor.mapping.AccessMode getAccessMode()
409     {
410         return null;
411     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
412

413     /**
414      * Method getExtends
415      */

416     public org.exolab.castor.mapping.ClassDescriptor getExtends()
417     {
418         return null;
419     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
420

421     /**
422      * Method getIdentity
423      */

424     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
425     {
426         return identity;
427     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
428

429     /**
430      * Method getJavaClass
431      */

432     public java.lang.Class JavaDoc getJavaClass()
433     {
434         return com.calipso.reportgenerator.reportdefinitions.MetricSourceDefinition.class;
435     } //-- java.lang.Class getJavaClass()
436

437     /**
438      * Method getNameSpacePrefix
439      */

440     public java.lang.String JavaDoc getNameSpacePrefix()
441     {
442         return nsPrefix;
443     } //-- java.lang.String getNameSpacePrefix()
444

445     /**
446      * Method getNameSpaceURI
447      */

448     public java.lang.String JavaDoc getNameSpaceURI()
449     {
450         return nsURI;
451     } //-- java.lang.String getNameSpaceURI()
452

453     /**
454      * Method getValidator
455      */

456     public org.exolab.castor.xml.TypeValidator getValidator()
457     {
458         return this;
459     } //-- org.exolab.castor.xml.TypeValidator getValidator()
460

461     /**
462      * Method getXMLName
463      */

464     public java.lang.String JavaDoc getXMLName()
465     {
466         return xmlName;
467     } //-- java.lang.String getXMLName()
468

469 }
470
Popular Tags