1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.feed.atom;
18
19 import com.sun.syndication.common.ObjectBean;
20 import com.sun.syndication.common.Enum;
21
22 /***
23 * Bean for content elements of Atom feeds.
24 * <p>
25 * @author Alejandro Abdelnur
26 *
27 */
28 public class Content extends ObjectBean {
29
30 /***
31 * Enumeration type for the 'mode' property of Atom content elements.
32 * <p>
33 * @author Alejandro Abdelnur
34 *
35 */
36 public static class Mode extends Enum {
37
38 private Mode(String name) {
39 super(name);
40 }
41
42 }
43
44 public static final Mode XML = new Mode("xml");
45 public static final Mode BASE64 = new Mode("base64");
46 public static final Mode ESCAPED = new Mode("escaped");
47
48 private String _type;
49 private Mode _mode;
50 private String _value;
51
52 /***
53 * Default constructor. All properties are set to <b>null</b>.
54 * <p>
55 *
56 */
57 public Content() {
58 }
59
60 /***
61 * Returns the content type.
62 * <p>
63 * @return the content type, <b>null</b> if none.
64 *
65 */
66 public String getType() {
67 return _type;
68 }
69
70 /***
71 * Sets the content type.
72 * <p>
73 * @param type the content type, <b>null</b> if none.
74 *
75 */
76 public void setType(String type) {
77 _type = type;
78 }
79
80 /***
81 * Returns the content mode.
82 * <p>
83 * The mode indicates how the value was/will-be encoded in the XML feed.
84 * <p>
85 * @return the content mode, <b>null</b> if none.
86 *
87 */
88 public Mode getMode() {
89 return _mode;
90 }
91
92 /***
93 * Sets the content mode.
94 * <p>
95 * The mode indicates how the value was/will-be encoded in the XML feed.
96 * <p>
97 * @param mode the content mode, <b>null</b> if none.
98 *
99 */
100 public void setMode(Mode mode) {
101 _mode = mode;
102 }
103
104 /***
105 * Returns the content value.
106 * <p>
107 * The return value should be decoded.
108 * <p>
109 * @return the content value, <b>null</b> if none.
110 *
111 */
112 public String getValue() {
113 return _value;
114 }
115
116 /***
117 * Sets the content value.
118 * <p>
119 * The value being set should be decoded.
120 * <p>
121 * @param value the content value, <b>null</b> if none.
122 *
123 */
124 public void setValue(String value) {
125 _value = value;
126 }
127
128 }
129
130