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 super(Content.class);
59 }
60
61 /***
62 * Returns the content type.
63 * <p>
64 * @return the content type, <b>null</b> if none.
65 *
66 */
67 public String getType() {
68 return _type;
69 }
70
71 /***
72 * Sets the content type.
73 * <p>
74 * @param type the content type, <b>null</b> if none.
75 *
76 */
77 public void setType(String type) {
78 _type = type;
79 }
80
81 /***
82 * Returns the content mode.
83 * <p>
84 * The mode indicates how the value was/will-be encoded in the XML feed.
85 * <p>
86 * @return the content mode, <b>null</b> if none.
87 *
88 */
89 public Mode getMode() {
90 return _mode;
91 }
92
93 /***
94 * Sets the content mode.
95 * <p>
96 * The mode indicates how the value was/will-be encoded in the XML feed.
97 * <p>
98 * @param mode the content mode, <b>null</b> if none.
99 *
100 */
101 public void setMode(Mode mode) {
102 _mode = mode;
103 }
104
105 /***
106 * Returns the content value.
107 * <p>
108 * The return value should be decoded.
109 * <p>
110 * @return the content value, <b>null</b> if none.
111 *
112 */
113 public String getValue() {
114 return _value;
115 }
116
117 /***
118 * Sets the content value.
119 * <p>
120 * The value being set should be decoded.
121 * <p>
122 * @param value the content value, <b>null</b> if none.
123 *
124 */
125 public void setValue(String value) {
126 _value = value;
127 }
128
129 }
130
131