KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openejb > alt > config > ejb11 > OpenejbJarDescriptor


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: OpenejbJarDescriptor.java 1104 2004-03-31 00:44:02Z dblevins $
6  */

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

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

68         //-- initialize element descriptors
69

70         //-- _ejbDeploymentList
71
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.openejb.alt.config.ejb11.EjbDeployment.class, "_ejbDeploymentList", "ejb-deployment", org.exolab.castor.xml.NodeType.Element);
72         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
73             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
74                 throws IllegalStateException JavaDoc
75             {
76                 OpenejbJar target = (OpenejbJar) object;
77                 return target.getEjbDeployment();
78             }
79             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
80                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
81             {
82                 try {
83                     OpenejbJar target = (OpenejbJar) object;
84                     target.addEjbDeployment( (org.openejb.alt.config.ejb11.EjbDeployment) value);
85                 }
86                 catch (java.lang.Exception JavaDoc ex) {
87                     throw new IllegalStateException JavaDoc(ex.toString());
88                 }
89             }
90             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
91                 return new org.openejb.alt.config.ejb11.EjbDeployment();
92             }
93         } );
94         desc.setHandler(handler);
95         desc.setRequired(true);
96         desc.setMultivalued(true);
97         addFieldDescriptor(desc);
98         
99         //-- validation code for: _ejbDeploymentList
100
fieldValidator = new org.exolab.castor.xml.FieldValidator();
101         fieldValidator.setMinOccurs(1);
102         { //-- local scope
103
}
104         desc.setValidator(fieldValidator);
105     } //-- org.openejb.alt.config.ejb11.OpenejbJarDescriptor()
106

107
108       //-----------/
109
//- Methods -/
110
//-----------/
111

112     /**
113      * Method getAccessMode
114      */

115     public org.exolab.castor.mapping.AccessMode getAccessMode()
116     {
117         return null;
118     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
119

120     /**
121      * Method getExtends
122      */

123     public org.exolab.castor.mapping.ClassDescriptor getExtends()
124     {
125         return null;
126     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
127

128     /**
129      * Method getIdentity
130      */

131     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
132     {
133         return identity;
134     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
135

136     /**
137      * Method getJavaClass
138      */

139     public java.lang.Class JavaDoc getJavaClass()
140     {
141         return org.openejb.alt.config.ejb11.OpenejbJar.class;
142     } //-- java.lang.Class getJavaClass()
143

144     /**
145      * Method getNameSpacePrefix
146      */

147     public java.lang.String JavaDoc getNameSpacePrefix()
148     {
149         return nsPrefix;
150     } //-- java.lang.String getNameSpacePrefix()
151

152     /**
153      * Method getNameSpaceURI
154      */

155     public java.lang.String JavaDoc getNameSpaceURI()
156     {
157         return nsURI;
158     } //-- java.lang.String getNameSpaceURI()
159

160     /**
161      * Method getValidator
162      */

163     public org.exolab.castor.xml.TypeValidator getValidator()
164     {
165         return this;
166     } //-- org.exolab.castor.xml.TypeValidator getValidator()
167

168     /**
169      * Method getXMLName
170      */

171     public java.lang.String JavaDoc getXMLName()
172     {
173         return xmlName;
174     } //-- java.lang.String getXMLName()
175

176 }
177
Popular Tags