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.feed.WireFeed;
20 import com.sun.syndication.feed.module.ModuleI;
21 import com.sun.syndication.common.ToString;
22 import com.sun.syndication.common.CopyFrom;
23
24 import java.util.Date;
25 import java.util.List;
26
27 /***
28 * Bean interface for all types of feeds.
29 * <p>
30 * It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose information.
31 * <p>
32 * @author Alejandro Abdelnur
33 *
34 */
35 public interface SyndFeedI extends ToString,Cloneable,CopyFrom {
36
37 /***
38 * Returns the real feed types the SyndFeed supports when converting from and to.
39 * <p>
40 * @return the real feed type supported.
41 */
42 List getSupportedFeedTypes();
43
44 /***
45 * Creates a rea feed containing the information of the SyndFeed.
46 * <p>
47 * The feed type of the created WireFeed is taken from the SyndFeed feedType property.
48 * <p>
49 * @return the real feed.
50 *
51 */
52 WireFeed createWireFeed();
53
54 /***
55 * Creates a real feed containing the information of the SyndFeed.
56 * <p>
57 * @param feedType the feed type for the WireFeed to be created.
58 * @return the real feed.
59 *
60 */
61 WireFeed createWireFeed(String feedType);
62
63
64 /***
65 * Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed.
66 * <p>
67 * @return the feed type, <b>null</b> if none.
68 *
69 */
70 String getFeedType();
71
72 /***
73 * Sets the wire feed type the feed will-have when coverted to a WireFeed.
74 * <p>
75 * @param feedType the feed type to set, <b>null</b> if none.
76 *
77 */
78 void setFeedType(String feedType);
79
80 /***
81 * Returns the charset encoding of a the feed. This is not set by Rome parsers.
82 * <p>
83 * @return the charset encoding of the feed.
84 *
85 */
86 public String getEncoding();
87
88 /***
89 * Sets the charset encoding of a the feed. This is not set by Rome parsers.
90 * <p>
91 * @param encoding the charset encoding of the feed.
92 *
93 */
94 public void setEncoding(String encoding);
95
96 /***
97 * Returns the feed title.
98 * <p>
99 * @return the feed title, <b>null</b> if none.
100 *
101 */
102 String getTitle();
103
104 /***
105 * Sets the feed title.
106 * <p>
107 * @param title the feed title to set, <b>null</b> if none.
108 *
109 */
110 void setTitle(String title);
111
112 /***
113 * Returns the feed link.
114 * <p>
115 * @return the feed link, <b>null</b> if none.
116 *
117 */
118 String getLink();
119
120 /***
121 * Sets the feed link.
122 * <p>
123 * @param link the feed link to set, <b>null</b> if none.
124 *
125 */
126 void setLink(String link);
127
128 /***
129 * Returns the feed description.
130 * <p>
131 * @return the feed description, <b>null</b> if none.
132 *
133 */
134 String getDescription();
135
136 /***
137 * Sets the feed description.
138 * <p>
139 * @param description the feed description to set, <b>null</b> if none.
140 *
141 */
142 void setDescription(String description);
143
144 /***
145 * Returns the feed published date.
146 * <p>
147 * This method is a convenience method, it maps to the Dublin Core module date.
148 * <p>
149 * @return the feed published date, <b>null</b> if none.
150 *
151 */
152 Date getPublishedDate();
153
154 /***
155 * Sets the feed published date.
156 * <p>
157 * This method is a convenience method, it maps to the Dublin Core module date.
158 * <p>
159 * @param publishedDate the feed published date to set, <b>null</b> if none.
160 *
161 */
162 void setPublishedDate(Date publishedDate);
163
164 /***
165 * Returns the feed author.
166 * <p>
167 * This method is a convenience method, it maps to the Dublin Core module creator.
168 * <p>
169 * @return the feed author, <b>null</b> if none.
170 *
171 */
172 String getAuthor();
173
174 /***
175 * Sets the feed author.
176 * <p>
177 * This method is a convenience method, it maps to the Dublin Core module creator.
178 * <p>
179 * @param author the feed author to set, <b>null</b> if none.
180 *
181 */
182 void setAuthor(String author);
183
184 /***
185 * Returns the feed copyright.
186 * <p>
187 * This method is a convenience method, it maps to the Dublin Core module rights.
188 * <p>
189 * @return the feed copyright, <b>null</b> if none.
190 *
191 */
192 String getCopyright();
193
194 /***
195 * Sets the feed copyright.
196 * <p>
197 * This method is a convenience method, it maps to the Dublin Core module rights.
198 * <p>
199 * @param copyright the feed copyright to set, <b>null</b> if none.
200 *
201 */
202 void setCopyright(String copyright);
203
204 /***
205 * Returns the feed image.
206 * <p>
207 * @return the feed image, <b>null</b> if none.
208 *
209 */
210 SyndImageI getImage();
211
212 /***
213 * Sets the feed image.
214 * <p>
215 * @param image the feed image to set, <b>null</b> if none.
216 *
217 */
218 void setImage(SyndImageI image);
219
220 /***
221 * Returns the feed categories.
222 * <p>
223 * This method is a convenience method, it maps to the Dublin Core module subjects.
224 * <p>
225 * @return a list of SyndCategory elements with the feed categories,
226 * an empty list if none.
227 *
228 */
229 List getCategories();
230
231 /***
232 * Sets the feed categories.
233 * <p>
234 * This method is a convenience method, it maps to the Dublin Core module subjects.
235 * <p>
236 * @param categories the list of SyndCategory elements with the feed categories to set,
237 * an empty list or <b>null</b> if none.
238 *
239 */
240 void setCategories(List categories);
241
242 /***
243 * Returns the feed entries.
244 * <p>
245 * @return a list of SyndEntry elements with the feed entries,
246 * an empty list if none.
247 *
248 */
249 List getEntries();
250
251 /***
252 * Sets the feed entries.
253 * <p>
254 * @param entries the list of SyndEntry elements with the feed entries to set,
255 * an empty list or <b>null</b> if none.
256 *
257 */
258 void setEntries(List entries);
259
260 /***
261 * Returns the feed language.
262 * <p>
263 * This method is a convenience method, it maps to the Dublin Core module language.
264 * <p>
265 * @return the feed language, <b>null</b> if none.
266 *
267 */
268 String getLanguage();
269
270 /***
271 * Sets the feed language.
272 * <p>
273 * This method is a convenience method, it maps to the Dublin Core module language.
274 * <p>
275 * @param language the feed language to set, <b>null</b> if none.
276 *
277 */
278 void setLanguage(String language);
279
280 /***
281 * Returns the module identified by a given URI.
282 * <p>
283 * @param uri the URI of the Module.
284 * @return The module with the given URI, <b>null</b> if none.
285 */
286 public ModuleI getModule(String uri);
287
288 /***
289 * Returns the feed modules.
290 * <p>
291 * @return a list of Module elements with the feed modules,
292 * an empty list if none.
293 *
294 */
295 List getModules();
296
297 /***
298 * Sets the feed modules.
299 * <p>
300 * @param modules the list of Module elements with the feed modules to set,
301 * an empty list or <b>null</b> if none.
302 *
303 */
304 void setModules(List modules);
305
306 /***
307 * Creates a deep clone of the object.
308 * <p>
309 * @return a clone of the object.
310 * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
311 *
312 */
313 public Object clone() throws CloneNotSupportedException;
314
315 }