1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.io.impl;
18
19 import com.sun.syndication.io.FeedException;
20 import com.sun.syndication.feed.rss.Description;
21 import org.jdom.Attribute;
22 import org.jdom.Element;
23
24 /***
25 * Feed Generator for RSS 0.94
26 * <p/>
27 *
28 * @author Elaine Chien
29 *
30 */
31
32 public class RSS094Generator extends RSS093Generator {
33
34 private static final String VERSION = "0.94";
35
36 public RSS094Generator() {
37 super("rss_0.94");
38 }
39
40 protected RSS094Generator(String feedType) {
41 super(feedType);
42 }
43
44 protected String getVersion() {
45 return VERSION;
46 }
47
48 protected Element generateDescriptionElement(Description description)
49 throws FeedException {
50
51 Element descriptionElement = new Element("description");
52 if (description.getType() != null) {
53 descriptionElement.setAttribute(new Attribute("type",description.getType()));
54 }
55 descriptionElement.addContent(description.getValue());
56
57 return descriptionElement;
58 }
59
60 }