KickJava   Java API By Example, From Geeks To Geeks.

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


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: Resource.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 java.io.IOException JavaDoc;
15 import java.io.Reader JavaDoc;
16 import java.io.Serializable JavaDoc;
17 import java.io.Writer JavaDoc;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler JavaDoc;
23
24 /**
25  * Class Resource.
26  *
27  * @version $Revision: 1105 $ $Date: 2004-03-30 16:45:22 -0800 (Tue, 30 Mar 2004) $
28  */

29 public class Resource implements java.io.Serializable JavaDoc, org.openejb.alt.config.Service {
30
31
32       //--------------------------/
33
//- Class/Member Variables -/
34
//--------------------------/
35

36     /**
37      * Field _id
38      */

39     private java.lang.String JavaDoc _id;
40
41     /**
42      * Field _provider
43      */

44     private java.lang.String JavaDoc _provider;
45
46     /**
47      * Field _jar
48      */

49     private java.lang.String JavaDoc _jar;
50
51     /**
52      * Field _jndi
53      */

54     private java.lang.String JavaDoc _jndi;
55
56     /**
57      * internal content storage
58      */

59     private java.lang.String JavaDoc _content = "";
60
61
62       //----------------/
63
//- Constructors -/
64
//----------------/
65

66     public Resource() {
67         super();
68         setContent("");
69     } //-- org.openejb.alt.config.sys.Resource()
70

71
72       //-----------/
73
//- Methods -/
74
//-----------/
75

76     /**
77      * Returns the value of field 'content'. The field 'content'
78      * has the following description: internal content storage
79      *
80      * @return the value of field 'content'.
81      */

82     public java.lang.String JavaDoc getContent()
83     {
84         return this._content;
85     } //-- java.lang.String getContent()
86

87     /**
88      * Returns the value of field 'id'.
89      *
90      * @return the value of field 'id'.
91      */

92     public java.lang.String JavaDoc getId()
93     {
94         return this._id;
95     } //-- java.lang.String getId()
96

97     /**
98      * Returns the value of field 'jar'.
99      *
100      * @return the value of field 'jar'.
101      */

102     public java.lang.String JavaDoc getJar()
103     {
104         return this._jar;
105     } //-- java.lang.String getJar()
106

107     /**
108      * Returns the value of field 'jndi'.
109      *
110      * @return the value of field 'jndi'.
111      */

112     public java.lang.String JavaDoc getJndi()
113     {
114         return this._jndi;
115     } //-- java.lang.String getJndi()
116

117     /**
118      * Returns the value of field 'provider'.
119      *
120      * @return the value of field 'provider'.
121      */

122     public java.lang.String JavaDoc getProvider()
123     {
124         return this._provider;
125     } //-- java.lang.String getProvider()
126

127     /**
128      * Method isValid
129      */

130     public boolean isValid()
131     {
132         try {
133             validate();
134         }
135         catch (org.exolab.castor.xml.ValidationException vex) {
136             return false;
137         }
138         return true;
139     } //-- boolean isValid()
140

141     /**
142      * Method marshal
143      *
144      * @param out
145      */

146     public void marshal(java.io.Writer JavaDoc out)
147         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
148     {
149         
150         Marshaller.marshal(this, out);
151     } //-- void marshal(java.io.Writer)
152

153     /**
154      * Method marshal
155      *
156      * @param handler
157      */

158     public void marshal(org.xml.sax.ContentHandler JavaDoc handler)
159         throws java.io.IOException JavaDoc, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
160     {
161         
162         Marshaller.marshal(this, handler);
163     } //-- void marshal(org.xml.sax.ContentHandler)
164

165     /**
166      * Sets the value of field 'content'. The field 'content' has
167      * the following description: internal content storage
168      *
169      * @param content the value of field 'content'.
170      */

171     public void setContent(java.lang.String JavaDoc content)
172     {
173         this._content = content;
174     } //-- void setContent(java.lang.String)
175

176     /**
177      * Sets the value of field 'id'.
178      *
179      * @param id the value of field 'id'.
180      */

181     public void setId(java.lang.String JavaDoc id)
182     {
183         this._id = id;
184     } //-- void setId(java.lang.String)
185

186     /**
187      * Sets the value of field 'jar'.
188      *
189      * @param jar the value of field 'jar'.
190      */

191     public void setJar(java.lang.String JavaDoc jar)
192     {
193         this._jar = jar;
194     } //-- void setJar(java.lang.String)
195

196     /**
197      * Sets the value of field 'jndi'.
198      *
199      * @param jndi the value of field 'jndi'.
200      */

201     public void setJndi(java.lang.String JavaDoc jndi)
202     {
203         this._jndi = jndi;
204     } //-- void setJndi(java.lang.String)
205

206     /**
207      * Sets the value of field 'provider'.
208      *
209      * @param provider the value of field 'provider'.
210      */

211     public void setProvider(java.lang.String JavaDoc provider)
212     {
213         this._provider = provider;
214     } //-- void setProvider(java.lang.String)
215

216     /**
217      * Method unmarshal
218      *
219      * @param reader
220      */

221     public static java.lang.Object JavaDoc unmarshal(java.io.Reader JavaDoc reader)
222         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
223     {
224         return (org.openejb.alt.config.sys.Resource) Unmarshaller.unmarshal(org.openejb.alt.config.sys.Resource.class, reader);
225     } //-- java.lang.Object unmarshal(java.io.Reader)
226

227     /**
228      * Method validate
229      */

230     public void validate()
231         throws org.exolab.castor.xml.ValidationException
232     {
233         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
234         validator.validate(this);
235     } //-- void validate()
236

237 }
238
Popular Tags