KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openejb > alt > config > sys > ConnectorDescriptor


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
4  * Schema.
5  * $Id: ConnectorDescriptor.java 1105 2004-03-31 00:45:22Z dblevins $
6  */

7
8 package org.openejb.alt.config.sys;
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 ConnectorDescriptor.
21  *
22  * @version $Revision: 1105 $ $Date: 2004-03-30 16:45:22 -0800 (Tue, 30 Mar 2004) $
23  */

24 public class ConnectorDescriptor 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 ConnectorDescriptor() {
57         super();
58         nsURI = "http://www.openejb.org/System/Configuration";
59         xmlName = "Connector";
60         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
61         org.exolab.castor.xml.XMLFieldHandler handler = null;
62         org.exolab.castor.xml.FieldValidator fieldValidator = null;
63         //-- _content
64
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);
65         desc.setImmutable(true);
66         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
67             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
68                 throws IllegalStateException JavaDoc
69             {
70                 Connector target = (Connector) object;
71                 return target.getContent();
72             }
73             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
74                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
75             {
76                 try {
77                     Connector target = (Connector) object;
78                     target.setContent( (java.lang.String JavaDoc) value);
79                 }
80                 catch (java.lang.Exception JavaDoc ex) {
81                     throw new IllegalStateException JavaDoc(ex.toString());
82                 }
83             }
84             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
85                 return null;
86             }
87         } );
88         desc.setHandler(handler);
89         addFieldDescriptor(desc);
90         
91         //-- validation code for: _content
92
fieldValidator = new org.exolab.castor.xml.FieldValidator();
93         { //-- local scope
94
StringValidator typeValidator = new StringValidator();
95             typeValidator.setWhiteSpace("preserve");
96             fieldValidator.setValidator(typeValidator);
97         }
98         desc.setValidator(fieldValidator);
99         //-- initialize attribute descriptors
100

101         //-- _id
102
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
103         desc.setImmutable(true);
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                 Connector target = (Connector) object;
109                 return target.getId();
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                     Connector target = (Connector) object;
116                     target.setId( (java.lang.String JavaDoc) 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(handler);
127         desc.setRequired(true);
128         addFieldDescriptor(desc);
129         
130         //-- validation code for: _id
131
fieldValidator = new org.exolab.castor.xml.FieldValidator();
132         fieldValidator.setMinOccurs(1);
133         { //-- local scope
134
StringValidator typeValidator = new StringValidator();
135             typeValidator.setWhiteSpace("preserve");
136             fieldValidator.setValidator(typeValidator);
137         }
138         desc.setValidator(fieldValidator);
139         //-- _provider
140
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_provider", "provider", org.exolab.castor.xml.NodeType.Attribute);
141         desc.setImmutable(true);
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                 Connector target = (Connector) object;
147                 return target.getProvider();
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                     Connector target = (Connector) object;
154                     target.setProvider( (java.lang.String JavaDoc) 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(handler);
165         addFieldDescriptor(desc);
166         
167         //-- validation code for: _provider
168
fieldValidator = new org.exolab.castor.xml.FieldValidator();
169         { //-- local scope
170
StringValidator typeValidator = new StringValidator();
171             typeValidator.setWhiteSpace("preserve");
172             fieldValidator.setValidator(typeValidator);
173         }
174         desc.setValidator(fieldValidator);
175         //-- _jar
176
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_jar", "jar", org.exolab.castor.xml.NodeType.Attribute);
177         desc.setImmutable(true);
178         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
179             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
180                 throws IllegalStateException JavaDoc
181             {
182                 Connector target = (Connector) object;
183                 return target.getJar();
184             }
185             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
186                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
187             {
188                 try {
189                     Connector target = (Connector) object;
190                     target.setJar( (java.lang.String JavaDoc) value);
191                 }
192                 catch (java.lang.Exception JavaDoc ex) {
193                     throw new IllegalStateException JavaDoc(ex.toString());
194                 }
195             }
196             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
197                 return null;
198             }
199         } );
200         desc.setHandler(handler);
201         addFieldDescriptor(desc);
202         
203         //-- validation code for: _jar
204
fieldValidator = new org.exolab.castor.xml.FieldValidator();
205         { //-- local scope
206
StringValidator typeValidator = new StringValidator();
207             typeValidator.setWhiteSpace("preserve");
208             typeValidator.setPattern(".*\\.jar$");
209             fieldValidator.setValidator(typeValidator);
210         }
211         desc.setValidator(fieldValidator);
212         //-- initialize element descriptors
213

214     } //-- org.openejb.alt.config.sys.ConnectorDescriptor()
215

216
217       //-----------/
218
//- Methods -/
219
//-----------/
220

221     /**
222      * Method getAccessMode
223      */

224     public org.exolab.castor.mapping.AccessMode getAccessMode()
225     {
226         return null;
227     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
228

229     /**
230      * Method getExtends
231      */

232     public org.exolab.castor.mapping.ClassDescriptor getExtends()
233     {
234         return null;
235     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
236

237     /**
238      * Method getIdentity
239      */

240     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
241     {
242         return identity;
243     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
244

245     /**
246      * Method getJavaClass
247      */

248     public java.lang.Class JavaDoc getJavaClass()
249     {
250         return org.openejb.alt.config.sys.Connector.class;
251     } //-- java.lang.Class getJavaClass()
252

253     /**
254      * Method getNameSpacePrefix
255      */

256     public java.lang.String JavaDoc getNameSpacePrefix()
257     {
258         return nsPrefix;
259     } //-- java.lang.String getNameSpacePrefix()
260

261     /**
262      * Method getNameSpaceURI
263      */

264     public java.lang.String JavaDoc getNameSpaceURI()
265     {
266         return nsURI;
267     } //-- java.lang.String getNameSpaceURI()
268

269     /**
270      * Method getValidator
271      */

272     public org.exolab.castor.xml.TypeValidator getValidator()
273     {
274         return this;
275     } //-- org.exolab.castor.xml.TypeValidator getValidator()
276

277     /**
278      * Method getXMLName
279      */

280     public java.lang.String JavaDoc getXMLName()
281     {
282         return xmlName;
283     } //-- java.lang.String getXMLName()
284

285 }
286
Popular Tags