KickJava   Java API By Example, From Geeks To Geeks.

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


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

24 public class LocalizationDescriptor 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 LocalizationDescriptor() {
57         super();
58         xmlName = "Localization";
59         
60         //-- set grouping compositor
61
setCompositorAsSequence();
62         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63         org.exolab.castor.xml.XMLFieldHandler handler = null;
64         org.exolab.castor.xml.FieldValidator fieldValidator = null;
65         //-- initialize attribute descriptors
66

67         //-- _locale
68
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_locale", "Locale", org.exolab.castor.xml.NodeType.Attribute);
69         desc.setImmutable(true);
70         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
71             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
72                 throws IllegalStateException JavaDoc
73             {
74                 Localization target = (Localization) object;
75                 return target.getLocale();
76             }
77             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
78                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
79             {
80                 try {
81                     Localization target = (Localization) object;
82                     target.setLocale( (java.lang.String JavaDoc) value);
83                 }
84                 catch (java.lang.Exception JavaDoc ex) {
85                     throw new IllegalStateException JavaDoc(ex.toString());
86                 }
87             }
88             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
89                 return null;
90             }
91         } );
92         desc.setHandler(handler);
93         desc.setRequired(true);
94         addFieldDescriptor(desc);
95         
96         //-- validation code for: _locale
97
fieldValidator = new org.exolab.castor.xml.FieldValidator();
98         fieldValidator.setMinOccurs(1);
99         { //-- local scope
100
StringValidator typeValidator = new StringValidator();
101             typeValidator.setWhiteSpace("preserve");
102             fieldValidator.setValidator(typeValidator);
103         }
104         desc.setValidator(fieldValidator);
105         //-- initialize element descriptors
106

107         //-- _literalsList
108
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.Literals.class, "_literalsList", "Literals", org.exolab.castor.xml.NodeType.Element);
109         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
110             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
111                 throws IllegalStateException JavaDoc
112             {
113                 Localization target = (Localization) object;
114                 return target.getLiterals();
115             }
116             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
117                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
118             {
119                 try {
120                     Localization target = (Localization) object;
121                     target.addLiterals( (com.calipso.reportgenerator.reportdefinitions.Literals) value);
122                 }
123                 catch (java.lang.Exception JavaDoc ex) {
124                     throw new IllegalStateException JavaDoc(ex.toString());
125                 }
126             }
127             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
128                 return new com.calipso.reportgenerator.reportdefinitions.Literals();
129             }
130         } );
131         desc.setHandler(handler);
132         desc.setMultivalued(true);
133         addFieldDescriptor(desc);
134         
135         //-- validation code for: _literalsList
136
fieldValidator = new org.exolab.castor.xml.FieldValidator();
137         fieldValidator.setMinOccurs(0);
138         { //-- local scope
139
}
140         desc.setValidator(fieldValidator);
141     } //-- com.calipso.reportgenerator.reportdefinitions.LocalizationDescriptor()
142

143
144       //-----------/
145
//- Methods -/
146
//-----------/
147

148     /**
149      * Method getAccessMode
150      */

151     public org.exolab.castor.mapping.AccessMode getAccessMode()
152     {
153         return null;
154     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
155

156     /**
157      * Method getExtends
158      */

159     public org.exolab.castor.mapping.ClassDescriptor getExtends()
160     {
161         return null;
162     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
163

164     /**
165      * Method getIdentity
166      */

167     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
168     {
169         return identity;
170     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
171

172     /**
173      * Method getJavaClass
174      */

175     public java.lang.Class JavaDoc getJavaClass()
176     {
177         return com.calipso.reportgenerator.reportdefinitions.Localization.class;
178     } //-- java.lang.Class getJavaClass()
179

180     /**
181      * Method getNameSpacePrefix
182      */

183     public java.lang.String JavaDoc getNameSpacePrefix()
184     {
185         return nsPrefix;
186     } //-- java.lang.String getNameSpacePrefix()
187

188     /**
189      * Method getNameSpaceURI
190      */

191     public java.lang.String JavaDoc getNameSpaceURI()
192     {
193         return nsURI;
194     } //-- java.lang.String getNameSpaceURI()
195

196     /**
197      * Method getValidator
198      */

199     public org.exolab.castor.xml.TypeValidator getValidator()
200     {
201         return this;
202     } //-- org.exolab.castor.xml.TypeValidator getValidator()
203

204     /**
205      * Method getXMLName
206      */

207     public java.lang.String JavaDoc getXMLName()
208     {
209         return xmlName;
210     } //-- java.lang.String getXMLName()
211

212 }
213
Popular Tags