KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > xml > api > jcm > Image


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://castor.exolab.org">Castor 0.9.2</a>, using an
4  * XML Schema.
5  * $Id$
6  */

7
8 package org.apache.jetspeed.xml.api.jcm;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
12
//---------------------------------/
13

14 import java.io.Reader JavaDoc;
15 import java.io.Serializable JavaDoc;
16 import java.io.Writer JavaDoc;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.ValidationException;
20 import org.xml.sax.DocumentHandler JavaDoc;
21
22 /**
23  *
24  * @version $Revision$ $Date$
25 **/

26 public class Image implements java.io.Serializable JavaDoc {
27
28
29       //--------------------------/
30
//- Class/Member Variables -/
31
//--------------------------/
32

33     private java.lang.String JavaDoc _title;
34
35     private java.lang.String JavaDoc _url;
36
37     private java.lang.String JavaDoc _link;
38
39     private java.lang.String JavaDoc _description;
40
41     private int _width;
42
43     /**
44      * keeps track of state for field: _width
45     **/

46     private boolean _has_width;
47
48     private int _height;
49
50     /**
51      * keeps track of state for field: _height
52     **/

53     private boolean _has_height;
54
55
56       //----------------/
57
//- Constructors -/
58
//----------------/
59

60     public Image() {
61         super();
62     } //-- org.apache.jetspeed.xml.api.jcm.Image()
63

64
65       //-----------/
66
//- Methods -/
67
//-----------/
68

69     /**
70     **/

71     public void deleteHeight()
72     {
73         this._has_height= false;
74     } //-- void deleteHeight()
75

76     /**
77     **/

78     public void deleteWidth()
79     {
80         this._has_width= false;
81     } //-- void deleteWidth()
82

83     /**
84     **/

85     public java.lang.String JavaDoc getDescription()
86     {
87         return this._description;
88     } //-- java.lang.String getDescription()
89

90     /**
91     **/

92     public int getHeight()
93     {
94         return this._height;
95     } //-- int getHeight()
96

97     /**
98     **/

99     public java.lang.String JavaDoc getLink()
100     {
101         return this._link;
102     } //-- java.lang.String getLink()
103

104     /**
105     **/

106     public java.lang.String JavaDoc getTitle()
107     {
108         return this._title;
109     } //-- java.lang.String getTitle()
110

111     /**
112     **/

113     public java.lang.String JavaDoc getUrl()
114     {
115         return this._url;
116     } //-- java.lang.String getUrl()
117

118     /**
119     **/

120     public int getWidth()
121     {
122         return this._width;
123     } //-- int getWidth()
124

125     /**
126     **/

127     public boolean hasHeight()
128     {
129         return this._has_height;
130     } //-- boolean hasHeight()
131

132     /**
133     **/

134     public boolean hasWidth()
135     {
136         return this._has_width;
137     } //-- boolean hasWidth()
138

139     /**
140     **/

141     public boolean isValid()
142     {
143         try {
144             validate();
145         }
146         catch (org.exolab.castor.xml.ValidationException vex) {
147             return false;
148         }
149         return true;
150     } //-- boolean isValid()
151

152     /**
153      *
154      * @param out
155     **/

156     public void marshal(java.io.Writer JavaDoc out)
157         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
158     {
159         
160         Marshaller.marshal(this, out);
161     } //-- void marshal(java.io.Writer)
162

163     /**
164      *
165      * @param handler
166     **/

167     public void marshal(org.xml.sax.DocumentHandler JavaDoc handler)
168         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
169     {
170         
171         Marshaller.marshal(this, handler);
172     } //-- void marshal(org.xml.sax.DocumentHandler)
173

174     /**
175      *
176      * @param description
177     **/

178     public void setDescription(java.lang.String JavaDoc description)
179     {
180         this._description = description;
181     } //-- void setDescription(java.lang.String)
182

183     /**
184      *
185      * @param height
186     **/

187     public void setHeight(int height)
188     {
189         this._height = height;
190         this._has_height = true;
191     } //-- void setHeight(int)
192

193     /**
194      *
195      * @param link
196     **/

197     public void setLink(java.lang.String JavaDoc link)
198     {
199         this._link = link;
200     } //-- void setLink(java.lang.String)
201

202     /**
203      *
204      * @param title
205     **/

206     public void setTitle(java.lang.String JavaDoc title)
207     {
208         this._title = title;
209     } //-- void setTitle(java.lang.String)
210

211     /**
212      *
213      * @param url
214     **/

215     public void setUrl(java.lang.String JavaDoc url)
216     {
217         this._url = url;
218     } //-- void setUrl(java.lang.String)
219

220     /**
221      *
222      * @param width
223     **/

224     public void setWidth(int width)
225     {
226         this._width = width;
227         this._has_width = true;
228     } //-- void setWidth(int)
229

230     /**
231      *
232      * @param reader
233     **/

234     public static org.apache.jetspeed.xml.api.jcm.Image unmarshal(java.io.Reader JavaDoc reader)
235         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
236     {
237         return (org.apache.jetspeed.xml.api.jcm.Image) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Image.class, reader);
238     } //-- org.apache.jetspeed.xml.api.jcm.Image unmarshal(java.io.Reader)
239

240     /**
241     **/

242     public void validate()
243         throws org.exolab.castor.xml.ValidationException
244     {
245         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
246         validator.validate(this);
247     } //-- void validate()
248

249 }
250
Popular Tags