KickJava   Java API By Example, From Geeks To Geeks.

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


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

24 public class DimensionDefinitionDescriptor 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 DimensionDefinitionDescriptor() {
57         super();
58         xmlName = "DimensionDefinition";
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                 DimensionDefinition target = (DimensionDefinition) 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                     DimensionDefinition target = (DimensionDefinition) 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                 DimensionDefinition target = (DimensionDefinition) 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                     DimensionDefinition target = (DimensionDefinition) 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         addFieldDescriptor(desc);
129         
130         //-- validation code for: _description
131
fieldValidator = new org.exolab.castor.xml.FieldValidator();
132         { //-- local scope
133
StringValidator typeValidator = new StringValidator();
134             typeValidator.setWhiteSpace("preserve");
135             fieldValidator.setValidator(typeValidator);
136         }
137         desc.setValidator(fieldValidator);
138         //-- _location
139
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType.class, "_location", "Location", org.exolab.castor.xml.NodeType.Attribute);
140         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
141             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
142                 throws IllegalStateException JavaDoc
143             {
144                 DimensionDefinition target = (DimensionDefinition) object;
145                 return target.getLocation();
146             }
147             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
148                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
149             {
150                 try {
151                     DimensionDefinition target = (DimensionDefinition) object;
152                     target.setLocation( (com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType) value);
153                 }
154                 catch (java.lang.Exception JavaDoc ex) {
155                     throw new IllegalStateException JavaDoc(ex.toString());
156                 }
157             }
158             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
159                 return null;
160             }
161         } );
162         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType.class, handler));
163         desc.setImmutable(true);
164         desc.setRequired(true);
165         addFieldDescriptor(desc);
166         
167         //-- validation code for: _location
168
fieldValidator = new org.exolab.castor.xml.FieldValidator();
169         fieldValidator.setMinOccurs(1);
170         { //-- local scope
171
}
172         desc.setValidator(fieldValidator);
173         //-- _groups
174
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_groups", "Groups", 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                 DimensionDefinition target = (DimensionDefinition) object;
180                 if(!target.hasGroups())
181                     return null;
182                 return new Boolean JavaDoc(target.getGroups());
183             }
184             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
185                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
186             {
187                 try {
188                     DimensionDefinition target = (DimensionDefinition) object;
189                     // if null, use delete method for optional primitives
190
if (value == null) {
191                         target.deleteGroups();
192                         return;
193                     }
194                     target.setGroups( ((Boolean JavaDoc)value).booleanValue());
195                 }
196                 catch (java.lang.Exception JavaDoc ex) {
197                     throw new IllegalStateException JavaDoc(ex.toString());
198                 }
199             }
200             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
201                 return null;
202             }
203         } );
204         desc.setHandler(handler);
205         addFieldDescriptor(desc);
206         
207         //-- validation code for: _groups
208
fieldValidator = new org.exolab.castor.xml.FieldValidator();
209         { //-- local scope
210
BooleanValidator typeValidator = new BooleanValidator();
211             fieldValidator.setValidator(typeValidator);
212         }
213         desc.setValidator(fieldValidator);
214         //-- _groupFooterCaption
215
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_groupFooterCaption", "GroupFooterCaption", org.exolab.castor.xml.NodeType.Attribute);
216         desc.setImmutable(true);
217         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
218             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
219                 throws IllegalStateException JavaDoc
220             {
221                 DimensionDefinition target = (DimensionDefinition) object;
222                 return target.getGroupFooterCaption();
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                     DimensionDefinition target = (DimensionDefinition) object;
229                     target.setGroupFooterCaption( (java.lang.String JavaDoc) value);
230                 }
231                 catch (java.lang.Exception JavaDoc ex) {
232                     throw new IllegalStateException JavaDoc(ex.toString());
233                 }
234             }
235             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
236                 return null;
237             }
238         } );
239         desc.setHandler(handler);
240         addFieldDescriptor(desc);
241         
242         //-- validation code for: _groupFooterCaption
243
fieldValidator = new org.exolab.castor.xml.FieldValidator();
244         { //-- local scope
245
StringValidator typeValidator = new StringValidator();
246             typeValidator.setWhiteSpace("preserve");
247             fieldValidator.setValidator(typeValidator);
248         }
249         desc.setValidator(fieldValidator);
250         //-- _order
251
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType.class, "_order", "Order", org.exolab.castor.xml.NodeType.Attribute);
252         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
253             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
254                 throws IllegalStateException JavaDoc
255             {
256                 DimensionDefinition target = (DimensionDefinition) object;
257                 return target.getOrder();
258             }
259             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
260                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
261             {
262                 try {
263                     DimensionDefinition target = (DimensionDefinition) object;
264                     target.setOrder( (com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType) value);
265                 }
266                 catch (java.lang.Exception JavaDoc ex) {
267                     throw new IllegalStateException JavaDoc(ex.toString());
268                 }
269             }
270             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
271                 return null;
272             }
273         } );
274         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType.class, handler));
275         desc.setImmutable(true);
276         addFieldDescriptor(desc);
277         
278         //-- validation code for: _order
279
fieldValidator = new org.exolab.castor.xml.FieldValidator();
280         { //-- local scope
281
}
282         desc.setValidator(fieldValidator);
283         //-- _rankMetricName
284
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_rankMetricName", "RankMetricName", 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                 DimensionDefinition target = (DimensionDefinition) object;
291                 return target.getRankMetricName();
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                     DimensionDefinition target = (DimensionDefinition) object;
298                     target.setRankMetricName( (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: _rankMetricName
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         //-- initialize element descriptors
320

321     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionDefinitionDescriptor()
322

323
324       //-----------/
325
//- Methods -/
326
//-----------/
327

328     /**
329      * Method getAccessMode
330      */

331     public org.exolab.castor.mapping.AccessMode getAccessMode()
332     {
333         return null;
334     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
335

336     /**
337      * Method getExtends
338      */

339     public org.exolab.castor.mapping.ClassDescriptor getExtends()
340     {
341         return null;
342     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
343

344     /**
345      * Method getIdentity
346      */

347     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
348     {
349         return identity;
350     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
351

352     /**
353      * Method getJavaClass
354      */

355     public java.lang.Class JavaDoc getJavaClass()
356     {
357         return com.calipso.reportgenerator.reportdefinitions.DimensionDefinition.class;
358     } //-- java.lang.Class getJavaClass()
359

360     /**
361      * Method getNameSpacePrefix
362      */

363     public java.lang.String JavaDoc getNameSpacePrefix()
364     {
365         return nsPrefix;
366     } //-- java.lang.String getNameSpacePrefix()
367

368     /**
369      * Method getNameSpaceURI
370      */

371     public java.lang.String JavaDoc getNameSpaceURI()
372     {
373         return nsURI;
374     } //-- java.lang.String getNameSpaceURI()
375

376     /**
377      * Method getValidator
378      */

379     public org.exolab.castor.xml.TypeValidator getValidator()
380     {
381         return this;
382     } //-- org.exolab.castor.xml.TypeValidator getValidator()
383

384     /**
385      * Method getXMLName
386      */

387     public java.lang.String JavaDoc getXMLName()
388     {
389         return xmlName;
390     } //-- java.lang.String getXMLName()
391

392 }
393
Popular Tags