KickJava   Java API By Example, From Geeks To Geeks.

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


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 LightBoxDefinitionDescriptor.
21  *
22  * @version $Revision$ $Date$
23  */

24 public class LightBoxDefinitionDescriptor 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 LightBoxDefinitionDescriptor() {
57         super();
58         xmlName = "LightBoxDefinition";
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         //-- _metricName
65
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_metricName", "MetricName", 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                 LightBoxDefinition target = (LightBoxDefinition) object;
72                 return target.getMetricName();
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                     LightBoxDefinition target = (LightBoxDefinition) object;
79                     target.setMetricName( (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: _metricName
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         //-- _type
103
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType.class, "_type", "Type", org.exolab.castor.xml.NodeType.Attribute);
104         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
105             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
106                 throws IllegalStateException JavaDoc
107             {
108                 LightBoxDefinition target = (LightBoxDefinition) object;
109                 return target.getType();
110             }
111             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
112                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
113             {
114                 try {
115                     LightBoxDefinition target = (LightBoxDefinition) object;
116                     target.setType( (com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType) value);
117                 }
118                 catch (java.lang.Exception JavaDoc ex) {
119                     throw new IllegalStateException JavaDoc(ex.toString());
120                 }
121             }
122             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
123                 return null;
124             }
125         } );
126         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType.class, handler));
127         desc.setImmutable(true);
128         desc.setRequired(true);
129         addFieldDescriptor(desc);
130         
131         //-- validation code for: _type
132
fieldValidator = new org.exolab.castor.xml.FieldValidator();
133         fieldValidator.setMinOccurs(1);
134         { //-- local scope
135
}
136         desc.setValidator(fieldValidator);
137         //-- _parameter
138
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType.class, "_parameter", "Parameter", org.exolab.castor.xml.NodeType.Attribute);
139         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
140             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
141                 throws IllegalStateException JavaDoc
142             {
143                 LightBoxDefinition target = (LightBoxDefinition) object;
144                 return target.getParameter();
145             }
146             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
147                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
148             {
149                 try {
150                     LightBoxDefinition target = (LightBoxDefinition) object;
151                     target.setParameter( (com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType) value);
152                 }
153                 catch (java.lang.Exception JavaDoc ex) {
154                     throw new IllegalStateException JavaDoc(ex.toString());
155                 }
156             }
157             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
158                 return null;
159             }
160         } );
161         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType.class, handler));
162         desc.setImmutable(true);
163         desc.setRequired(true);
164         addFieldDescriptor(desc);
165         
166         //-- validation code for: _parameter
167
fieldValidator = new org.exolab.castor.xml.FieldValidator();
168         fieldValidator.setMinOccurs(1);
169         { //-- local scope
170
}
171         desc.setValidator(fieldValidator);
172         //-- _colorRed
173
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colorRed", "ColorRed", org.exolab.castor.xml.NodeType.Attribute);
174         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
175             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
176                 throws IllegalStateException JavaDoc
177             {
178                 LightBoxDefinition target = (LightBoxDefinition) object;
179                 if(!target.hasColorRed())
180                     return null;
181                 return new Integer JavaDoc(target.getColorRed());
182             }
183             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
184                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
185             {
186                 try {
187                     LightBoxDefinition target = (LightBoxDefinition) object;
188                     // ignore null values for non optional primitives
189
if (value == null) return;
190                     
191                     target.setColorRed( ((Integer JavaDoc)value).intValue());
192                 }
193                 catch (java.lang.Exception JavaDoc ex) {
194                     throw new IllegalStateException JavaDoc(ex.toString());
195                 }
196             }
197             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
198                 return null;
199             }
200         } );
201         desc.setHandler(handler);
202         desc.setRequired(true);
203         addFieldDescriptor(desc);
204         
205         //-- validation code for: _colorRed
206
fieldValidator = new org.exolab.castor.xml.FieldValidator();
207         fieldValidator.setMinOccurs(1);
208         { //-- local scope
209
IntegerValidator typeValidator = new IntegerValidator();
210             fieldValidator.setValidator(typeValidator);
211         }
212         desc.setValidator(fieldValidator);
213         //-- _colorGreen
214
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colorGreen", "ColorGreen", org.exolab.castor.xml.NodeType.Attribute);
215         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
216             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
217                 throws IllegalStateException JavaDoc
218             {
219                 LightBoxDefinition target = (LightBoxDefinition) object;
220                 if(!target.hasColorGreen())
221                     return null;
222                 return new Integer JavaDoc(target.getColorGreen());
223             }
224             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
225                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
226             {
227                 try {
228                     LightBoxDefinition target = (LightBoxDefinition) object;
229                     // ignore null values for non optional primitives
230
if (value == null) return;
231                     
232                     target.setColorGreen( ((Integer JavaDoc)value).intValue());
233                 }
234                 catch (java.lang.Exception JavaDoc ex) {
235                     throw new IllegalStateException JavaDoc(ex.toString());
236                 }
237             }
238             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
239                 return null;
240             }
241         } );
242         desc.setHandler(handler);
243         desc.setRequired(true);
244         addFieldDescriptor(desc);
245         
246         //-- validation code for: _colorGreen
247
fieldValidator = new org.exolab.castor.xml.FieldValidator();
248         fieldValidator.setMinOccurs(1);
249         { //-- local scope
250
IntegerValidator typeValidator = new IntegerValidator();
251             fieldValidator.setValidator(typeValidator);
252         }
253         desc.setValidator(fieldValidator);
254         //-- _colorBlue
255
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colorBlue", "ColorBlue", org.exolab.castor.xml.NodeType.Attribute);
256         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
257             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
258                 throws IllegalStateException JavaDoc
259             {
260                 LightBoxDefinition target = (LightBoxDefinition) object;
261                 if(!target.hasColorBlue())
262                     return null;
263                 return new Integer JavaDoc(target.getColorBlue());
264             }
265             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
266                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
267             {
268                 try {
269                     LightBoxDefinition target = (LightBoxDefinition) object;
270                     // ignore null values for non optional primitives
271
if (value == null) return;
272                     
273                     target.setColorBlue( ((Integer JavaDoc)value).intValue());
274                 }
275                 catch (java.lang.Exception JavaDoc ex) {
276                     throw new IllegalStateException JavaDoc(ex.toString());
277                 }
278             }
279             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
280                 return null;
281             }
282         } );
283         desc.setHandler(handler);
284         desc.setRequired(true);
285         addFieldDescriptor(desc);
286         
287         //-- validation code for: _colorBlue
288
fieldValidator = new org.exolab.castor.xml.FieldValidator();
289         fieldValidator.setMinOccurs(1);
290         { //-- local scope
291
IntegerValidator typeValidator = new IntegerValidator();
292             fieldValidator.setValidator(typeValidator);
293         }
294         desc.setValidator(fieldValidator);
295         //-- _value
296
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_value", "Value", org.exolab.castor.xml.NodeType.Attribute);
297         desc.setImmutable(true);
298         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
299             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
300                 throws IllegalStateException JavaDoc
301             {
302                 LightBoxDefinition target = (LightBoxDefinition) object;
303                 return target.getValue();
304             }
305             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
306                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
307             {
308                 try {
309                     LightBoxDefinition target = (LightBoxDefinition) object;
310                     target.setValue( (java.lang.String JavaDoc) value);
311                 }
312                 catch (java.lang.Exception JavaDoc ex) {
313                     throw new IllegalStateException JavaDoc(ex.toString());
314                 }
315             }
316             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
317                 return null;
318             }
319         } );
320         desc.setHandler(handler);
321         desc.setRequired(true);
322         addFieldDescriptor(desc);
323         
324         //-- validation code for: _value
325
fieldValidator = new org.exolab.castor.xml.FieldValidator();
326         fieldValidator.setMinOccurs(1);
327         { //-- local scope
328
StringValidator typeValidator = new StringValidator();
329             typeValidator.setWhiteSpace("preserve");
330             fieldValidator.setValidator(typeValidator);
331         }
332         desc.setValidator(fieldValidator);
333         //-- initialize element descriptors
334

335     } //-- com.calipso.reportgenerator.reportdefinitions.LightBoxDefinitionDescriptor()
336

337
338       //-----------/
339
//- Methods -/
340
//-----------/
341

342     /**
343      * Method getAccessMode
344      */

345     public org.exolab.castor.mapping.AccessMode getAccessMode()
346     {
347         return null;
348     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
349

350     /**
351      * Method getExtends
352      */

353     public org.exolab.castor.mapping.ClassDescriptor getExtends()
354     {
355         return null;
356     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
357

358     /**
359      * Method getIdentity
360      */

361     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
362     {
363         return identity;
364     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
365

366     /**
367      * Method getJavaClass
368      */

369     public java.lang.Class JavaDoc getJavaClass()
370     {
371         return com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition.class;
372     } //-- java.lang.Class getJavaClass()
373

374     /**
375      * Method getNameSpacePrefix
376      */

377     public java.lang.String JavaDoc getNameSpacePrefix()
378     {
379         return nsPrefix;
380     } //-- java.lang.String getNameSpacePrefix()
381

382     /**
383      * Method getNameSpaceURI
384      */

385     public java.lang.String JavaDoc getNameSpaceURI()
386     {
387         return nsURI;
388     } //-- java.lang.String getNameSpaceURI()
389

390     /**
391      * Method getValidator
392      */

393     public org.exolab.castor.xml.TypeValidator getValidator()
394     {
395         return this;
396     } //-- org.exolab.castor.xml.TypeValidator getValidator()
397

398     /**
399      * Method getXMLName
400      */

401     public java.lang.String JavaDoc getXMLName()
402     {
403         return xmlName;
404     } //-- java.lang.String getXMLName()
405

406 }
407
Popular Tags