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