1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.commons.digester.rss;
20
21 import java.io.PrintWriter;
22 import java.io.Serializable;
23
24
25
26
27
28
29
30
31 public class Image implements Serializable {
32
33
34
35
36
37
38
39
40 protected String description = null;
41
42 public String getDescription() {
43 return (this.description);
44 }
45
46 public void setDescription(String description) {
47 this.description = description;
48 }
49
50
51
52
53
54 protected int height = 31;
55
56 public int getHeight() {
57 return (this.height);
58 }
59
60 public void setHeight(int height) {
61 this.height = height;
62 }
63
64
65
66
67
68 protected String link = null;
69
70 public String getLink() {
71 return (this.link);
72 }
73
74 public void setLink(String link) {
75 this.link = link;
76 }
77
78
79
80
81
82 protected String title = null;
83
84 public String getTitle() {
85 return (this.title);
86 }
87
88 public void setTitle(String title) {
89 this.title = title;
90 }
91
92
93
94
95
96 protected String url = null;
97
98 public String getURL() {
99 return (this.url);
100 }
101
102 public void setURL(String url) {
103 this.url = url;
104 }
105
106
107
108
109
110 protected int width = 31;
111
112 public int getWidth() {
113 return (this.width);
114 }
115
116 public void setWidth(int width) {
117 this.width = width;
118 }
119
120
121
122
123
124
125
126
127
128
129
130 void render(PrintWriter writer) {
131
132 writer.println(" <image>");
133
134 writer.print(" <title>");
135 writer.print(title);
136 writer.println("</title>");
137
138 writer.print(" <url>");
139 writer.print(url);
140 writer.println("</url>");
141
142 if (link != null) {
143 writer.print(" <link>");
144 writer.print(link);
145 writer.println("</link>");
146 }
147
148 writer.print(" <width>");
149 writer.print(width);
150 writer.println("</width>");
151
152 writer.print(" <height>");
153 writer.print(height);
154 writer.println("</height>");
155
156 if (description != null) {
157 writer.print(" <description>");
158 writer.print(description);
159 writer.println("</description>");
160 }
161
162 writer.println(" </image>");
163
164 }
165
166
167 }