1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.betwixt.examples.rss;
19
20 import java.io.Serializable;
21 import java.util.ArrayList;
22 import java.util.List;
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 public class Channel implements Serializable {
38
39
40
41
42
43
44
45
46 protected ArrayList items = new ArrayList();
47
48
49
50
51
52 protected ArrayList skipDays = new ArrayList();
53
54
55
56
57
58 protected ArrayList skipHours = new ArrayList();
59
60
61
62
63
64
65
66
67 protected String copyright = null;
68
69 public String getCopyright() {
70 if (this.copyright == null) {
71 return "Public Domain";
72 } else {
73 return (this.copyright);
74 }
75 }
76
77 public void setCopyright(String copyright) {
78 this.copyright = copyright;
79 }
80
81
82
83
84
85 protected String description = null;
86
87 public String getDescription() {
88 return (this.description);
89 }
90
91 public void setDescription(String description) {
92 this.description = description;
93 }
94
95
96
97
98
99 protected String docs = null;
100
101 public String getDocs() {
102 return (this.docs);
103 }
104
105 public void setDocs(String docs) {
106 this.docs = docs;
107 }
108
109
110
111
112
113 protected Image image = null;
114
115 public Image getImage() {
116 return (this.image);
117 }
118
119 public void setImage(Image image) {
120 this.image = image;
121 }
122
123
124
125
126
127 protected String language = null;
128
129 public String getLanguage() {
130 return (this.language);
131 }
132
133 public void setLanguage(String language) {
134 this.language = language;
135 }
136
137
138
139
140
141 protected String lastBuildDate = null;
142
143 public String getLastBuildDate() {
144 return (this.lastBuildDate);
145 }
146
147 public void setLastBuildDate(String lastBuildDate) {
148 this.lastBuildDate = lastBuildDate;
149 }
150
151
152
153
154
155 protected String link = null;
156
157 public String getLink() {
158 return (this.link);
159 }
160
161 public void setLink(String link) {
162 this.link = link;
163 }
164
165
166
167
168
169 protected String managingEditor = null;
170
171 public String getManagingEditor() {
172 return (this.managingEditor);
173 }
174
175 public void setManagingEditor(String managingEditor) {
176 this.managingEditor = managingEditor;
177 }
178
179
180
181
182
183 protected String pubDate = null;
184
185 public String getPubDate() {
186 return (this.pubDate);
187 }
188
189 public void setPubDate(String pubDate) {
190 this.pubDate = pubDate;
191 }
192
193
194
195
196
197 protected String rating = null;
198
199 public String getRating() {
200 return (this.rating);
201 }
202
203 public void setRating(String rating) {
204 this.rating = rating;
205 }
206
207
208
209
210
211 protected TextInput textInput = null;
212
213 public TextInput getTextInput() {
214 return (this.textInput);
215 }
216
217 public void setTextInput(TextInput textInput) {
218 this.textInput = textInput;
219 }
220
221
222
223
224
225 protected String title = null;
226
227 public String getTitle() {
228 return (this.title);
229 }
230
231 public void setTitle(String title) {
232 this.title = title;
233 }
234
235
236
237
238
239 protected double version = 0.91;
240
241 public double getVersion() {
242 return (this.version);
243 }
244
245 public void setVersion(double version) {
246 this.version = version;
247 }
248
249
250
251
252
253 protected String webMaster = null;
254
255 public String getWebMaster() {
256 return (this.webMaster);
257 }
258
259 public void setWebMaster(String webMaster) {
260 this.webMaster = webMaster;
261 }
262
263
264
265
266
267
268
269
270
271
272 public void addItem(Item item) {
273 synchronized (items) {
274 items.add(item);
275 }
276 }
277
278
279
280
281
282
283
284 public void addSkipDay(String skipDay) {
285 synchronized (skipDays) {
286 skipDays.add(skipDay);
287 }
288 }
289
290
291
292
293
294
295
296 public void addSkipHour(String skipHour) {
297 synchronized (skipHours) {
298 skipHours.add(skipHour);
299 }
300 }
301
302
303
304
305 public List getItems() {
306 return items;
307 }
308
309
310
311
312
313 public String[] findSkipDays() {
314 synchronized (skipDays) {
315 String skipDays[] = new String[this.skipDays.size()];
316 return ((String[]) this.skipDays.toArray(skipDays));
317 }
318 }
319
320
321
322
323
324 public String[] getSkipHours() {
325 return findSkipHours();
326 }
327
328
329
330
331
332 public String[] findSkipHours() {
333 synchronized (skipHours) {
334 String skipHours[] = new String[this.skipHours.size()];
335 return ((String[]) this.skipHours.toArray(skipHours));
336 }
337 }
338
339
340
341
342
343 public String[] getSkipDays() {
344 return findSkipDays();
345 }
346
347
348
349
350
351
352
353 public void removeItem(Item item) {
354 synchronized (items) {
355 items.remove(item);
356 }
357 }
358
359
360
361
362
363
364
365 public void removeSkipDay(String skipDay) {
366 synchronized (skipDays) {
367 skipDays.remove(skipDay);
368 }
369 }
370
371
372
373
374
375
376
377 public void removeSkipHour(String skipHour) {
378 synchronized (skipHours) {
379 skipHours.remove(skipHour);
380 }
381 }
382 }