1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.feed.synd;
18
19 import com.sun.syndication.common.ObjectBean;
20 import com.sun.syndication.feed.synd.impl.SyndCopyFrom;
21
22 import java.util.HashMap;
23 import java.util.Map;
24 import java.util.Collections;
25
26 /***
27 * Bean for images of SyndFeed feeds.
28 * <p>
29 * @author Alejandro Abdelnur
30 *
31 */
32 public class SyndImage extends ObjectBean implements SyndImageI {
33 private String _title;
34 private String _url;
35 private String _link;
36 private String _description;
37
38 /***
39 * Default constructor. All properties are set to <b>null</b>.
40 * <p>
41 *
42 */
43 public SyndImage() {
44 super(SyndImageI.class);
45 }
46
47 /***
48 * Returns the image title.
49 * <p>
50 * @return the image title, <b>null</b> if none.
51 *
52 */
53 public String getTitle() {
54 return _title;
55 }
56
57 /***
58 * Sets the image title.
59 * <p>
60 * @param title the image title to set, <b>null</b> if none.
61 *
62 */
63 public void setTitle(String title) {
64 _title = title;
65 }
66
67 /***
68 * Returns the image URL.
69 * <p>
70 * @return the image URL, <b>null</b> if none.
71 *
72 */
73 public String getUrl() {
74 return _url;
75 }
76
77 /***
78 * Sets the image URL.
79 * <p>
80 * @param url the image URL to set, <b>null</b> if none.
81 *
82 */
83 public void setUrl(String url) {
84 _url = url;
85 }
86
87 /***
88 * Returns the image link.
89 * <p>
90 * @return the image link, <b>null</b> if none.
91 *
92 */
93 public String getLink() {
94 return _link;
95 }
96
97 /***
98 * Sets the image link.
99 * <p>
100 * @param link the image link to set, <b>null</b> if none.
101 *
102 */
103 public void setLink(String link) {
104 _link = link;
105 }
106
107 /***
108 * Returns the image description.
109 * <p>
110 * @return the image description, <b>null</b> if none.
111 *
112 */
113 public String getDescription() {
114 return _description;
115 }
116
117 /***
118 * Sets the image description.
119 * <p>
120 * @param description the image description to set, <b>null</b> if none.
121 *
122 */
123 public void setDescription(String description) {
124 _description = description;
125 }
126
127 public Class getInterface() {
128 return SyndImageI.class;
129 }
130
131 public void copyFrom(Object syndImage) {
132 SYND_COPY_FROM.copy(this,syndImage);
133 }
134
135 private static final SyndCopyFrom SYND_COPY_FROM;
136
137 static {
138 Map basePropInterfaceMap = new HashMap();
139 basePropInterfaceMap.put("title",String.class);
140 basePropInterfaceMap.put("url",String.class);
141 basePropInterfaceMap.put("link",String.class);
142 basePropInterfaceMap.put("description",String.class);
143
144 Map basePropClassImplMap = Collections.EMPTY_MAP;
145
146 SYND_COPY_FROM = new SyndCopyFrom(SyndImageI.class,basePropInterfaceMap,basePropClassImplMap);
147 }
148
149 }