KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Enumeration JavaDoc;
18 import java.util.Vector JavaDoc;
19 import org.exolab.castor.xml.*;
20 import org.exolab.castor.xml.MarshalException;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.DocumentHandler JavaDoc;
23
24 /**
25  *
26  * @version $Revision$ $Date$
27 **/

28 public class Channel implements java.io.Serializable JavaDoc {
29
30
31       //--------------------------/
32
//- Class/Member Variables -/
33
//--------------------------/
34

35     private Topics _topics;
36
37     private java.util.Vector JavaDoc _itemList;
38
39     private java.lang.String JavaDoc _title;
40
41     private java.lang.String JavaDoc _link;
42
43     private java.lang.String JavaDoc _description;
44
45     private Image _image;
46
47     private Textinput _textinput;
48
49     private java.lang.String JavaDoc _rating;
50
51     private java.lang.String JavaDoc _copyright;
52
53     private java.lang.String JavaDoc _pubDate;
54
55     private java.lang.String JavaDoc _lastBuildDate;
56
57     private java.lang.String JavaDoc _docs;
58
59     private java.lang.String JavaDoc _managingEditor;
60
61     private java.lang.String JavaDoc _webMaster;
62
63     private java.lang.String JavaDoc _language;
64
65
66       //----------------/
67
//- Constructors -/
68
//----------------/
69

70     public Channel() {
71         super();
72         _itemList = new Vector JavaDoc();
73     } //-- org.apache.jetspeed.xml.api.jcm.Channel()
74

75
76       //-----------/
77
//- Methods -/
78
//-----------/
79

80     /**
81      *
82      * @param vItem
83     **/

84     public void addItem(Item vItem)
85         throws java.lang.IndexOutOfBoundsException JavaDoc
86     {
87         _itemList.addElement(vItem);
88     } //-- void addItem(Item)
89

90     /**
91     **/

92     public java.util.Enumeration JavaDoc enumerateItem()
93     {
94         return _itemList.elements();
95     } //-- java.util.Enumeration enumerateItem()
96

97     /**
98     **/

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

104     /**
105     **/

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

111     /**
112     **/

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

118     /**
119     **/

120     public Image getImage()
121     {
122         return this._image;
123     } //-- Image getImage()
124

125     /**
126      *
127      * @param index
128     **/

129     public Item getItem(int index)
130         throws java.lang.IndexOutOfBoundsException JavaDoc
131     {
132         //-- check bounds for index
133
if ((index < 0) || (index > _itemList.size())) {
134             throw new IndexOutOfBoundsException JavaDoc();
135         }
136         
137         return (Item) _itemList.elementAt(index);
138     } //-- Item getItem(int)
139

140     /**
141     **/

142     public Item[] getItem()
143     {
144         int size = _itemList.size();
145         Item[] mArray = new Item[size];
146         for (int index = 0; index < size; index++) {
147             mArray[index] = (Item) _itemList.elementAt(index);
148         }
149         return mArray;
150     } //-- Item[] getItem()
151

152     /**
153     **/

154     public int getItemCount()
155     {
156         return _itemList.size();
157     } //-- int getItemCount()
158

159     /**
160     **/

161     public java.lang.String JavaDoc getLanguage()
162     {
163         return this._language;
164     } //-- java.lang.String getLanguage()
165

166     /**
167     **/

168     public java.lang.String JavaDoc getLastBuildDate()
169     {
170         return this._lastBuildDate;
171     } //-- java.lang.String getLastBuildDate()
172

173     /**
174     **/

175     public java.lang.String JavaDoc getLink()
176     {
177         return this._link;
178     } //-- java.lang.String getLink()
179

180     /**
181     **/

182     public java.lang.String JavaDoc getManagingEditor()
183     {
184         return this._managingEditor;
185     } //-- java.lang.String getManagingEditor()
186

187     /**
188     **/

189     public java.lang.String JavaDoc getPubDate()
190     {
191         return this._pubDate;
192     } //-- java.lang.String getPubDate()
193

194     /**
195     **/

196     public java.lang.String JavaDoc getRating()
197     {
198         return this._rating;
199     } //-- java.lang.String getRating()
200

201     /**
202     **/

203     public Textinput getTextinput()
204     {
205         return this._textinput;
206     } //-- Textinput getTextinput()
207

208     /**
209     **/

210     public java.lang.String JavaDoc getTitle()
211     {
212         return this._title;
213     } //-- java.lang.String getTitle()
214

215     /**
216     **/

217     public Topics getTopics()
218     {
219         return this._topics;
220     } //-- Topics getTopics()
221

222     /**
223     **/

224     public java.lang.String JavaDoc getWebMaster()
225     {
226         return this._webMaster;
227     } //-- java.lang.String getWebMaster()
228

229     /**
230     **/

231     public boolean isValid()
232     {
233         try {
234             validate();
235         }
236         catch (org.exolab.castor.xml.ValidationException vex) {
237             return false;
238         }
239         return true;
240     } //-- boolean isValid()
241

242     /**
243      *
244      * @param out
245     **/

246     public void marshal(java.io.Writer JavaDoc out)
247         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
248     {
249         
250         Marshaller.marshal(this, out);
251     } //-- void marshal(java.io.Writer)
252

253     /**
254      *
255      * @param handler
256     **/

257     public void marshal(org.xml.sax.DocumentHandler JavaDoc handler)
258         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
259     {
260         
261         Marshaller.marshal(this, handler);
262     } //-- void marshal(org.xml.sax.DocumentHandler)
263

264     /**
265     **/

266     public void removeAllItem()
267     {
268         _itemList.removeAllElements();
269     } //-- void removeAllItem()
270

271     /**
272      *
273      * @param index
274     **/

275     public Item removeItem(int index)
276     {
277         Object JavaDoc obj = _itemList.elementAt(index);
278         _itemList.removeElementAt(index);
279         return (Item) obj;
280     } //-- Item removeItem(int)
281

282     /**
283      *
284      * @param copyright
285     **/

286     public void setCopyright(java.lang.String JavaDoc copyright)
287     {
288         this._copyright = copyright;
289     } //-- void setCopyright(java.lang.String)
290

291     /**
292      *
293      * @param description
294     **/

295     public void setDescription(java.lang.String JavaDoc description)
296     {
297         this._description = description;
298     } //-- void setDescription(java.lang.String)
299

300     /**
301      *
302      * @param docs
303     **/

304     public void setDocs(java.lang.String JavaDoc docs)
305     {
306         this._docs = docs;
307     } //-- void setDocs(java.lang.String)
308

309     /**
310      *
311      * @param image
312     **/

313     public void setImage(Image image)
314     {
315         this._image = image;
316     } //-- void setImage(Image)
317

318     /**
319      *
320      * @param index
321      * @param vItem
322     **/

323     public void setItem(int index, Item vItem)
324         throws java.lang.IndexOutOfBoundsException JavaDoc
325     {
326         //-- check bounds for index
327
if ((index < 0) || (index > _itemList.size())) {
328             throw new IndexOutOfBoundsException JavaDoc();
329         }
330         _itemList.setElementAt(vItem, index);
331     } //-- void setItem(int, Item)
332

333     /**
334      *
335      * @param itemArray
336     **/

337     public void setItem(Item[] itemArray)
338     {
339         //-- copy array
340
_itemList.removeAllElements();
341         for (int i = 0; i < itemArray.length; i++) {
342             _itemList.addElement(itemArray[i]);
343         }
344     } //-- void setItem(Item)
345

346     /**
347      *
348      * @param language
349     **/

350     public void setLanguage(java.lang.String JavaDoc language)
351     {
352         this._language = language;
353     } //-- void setLanguage(java.lang.String)
354

355     /**
356      *
357      * @param lastBuildDate
358     **/

359     public void setLastBuildDate(java.lang.String JavaDoc lastBuildDate)
360     {
361         this._lastBuildDate = lastBuildDate;
362     } //-- void setLastBuildDate(java.lang.String)
363

364     /**
365      *
366      * @param link
367     **/

368     public void setLink(java.lang.String JavaDoc link)
369     {
370         this._link = link;
371     } //-- void setLink(java.lang.String)
372

373     /**
374      *
375      * @param managingEditor
376     **/

377     public void setManagingEditor(java.lang.String JavaDoc managingEditor)
378     {
379         this._managingEditor = managingEditor;
380     } //-- void setManagingEditor(java.lang.String)
381

382     /**
383      *
384      * @param pubDate
385     **/

386     public void setPubDate(java.lang.String JavaDoc pubDate)
387     {
388         this._pubDate = pubDate;
389     } //-- void setPubDate(java.lang.String)
390

391     /**
392      *
393      * @param rating
394     **/

395     public void setRating(java.lang.String JavaDoc rating)
396     {
397         this._rating = rating;
398     } //-- void setRating(java.lang.String)
399

400     /**
401      *
402      * @param textinput
403     **/

404     public void setTextinput(Textinput textinput)
405     {
406         this._textinput = textinput;
407     } //-- void setTextinput(Textinput)
408

409     /**
410      *
411      * @param title
412     **/

413     public void setTitle(java.lang.String JavaDoc title)
414     {
415         this._title = title;
416     } //-- void setTitle(java.lang.String)
417

418     /**
419      *
420      * @param topics
421     **/

422     public void setTopics(Topics topics)
423     {
424         this._topics = topics;
425     } //-- void setTopics(Topics)
426

427     /**
428      *
429      * @param webMaster
430     **/

431     public void setWebMaster(java.lang.String JavaDoc webMaster)
432     {
433         this._webMaster = webMaster;
434     } //-- void setWebMaster(java.lang.String)
435

436     /**
437      *
438      * @param reader
439     **/

440     public static org.apache.jetspeed.xml.api.jcm.Channel unmarshal(java.io.Reader JavaDoc reader)
441         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
442     {
443         return (org.apache.jetspeed.xml.api.jcm.Channel) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Channel.class, reader);
444     } //-- org.apache.jetspeed.xml.api.jcm.Channel unmarshal(java.io.Reader)
445

446     /**
447     **/

448     public void validate()
449         throws org.exolab.castor.xml.ValidationException
450     {
451         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
452         validator.validate(this);
453     } //-- void validate()
454

455 }
456
Popular Tags