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 content of SyndFeed entries.
28 * <p>
29 * @author Alejandro Abdelnur
30 *
31 */
32 public class SyndContent extends ObjectBean implements SyndContentI {
33 private String _type;
34 private String _value;
35
36 /***
37 * Default constructor. All properties are set to <b>null</b>.
38 * <p>
39 *
40 */
41 public SyndContent() {
42 super(SyndContentI.class);
43 }
44
45 /***
46 * Returns the content type.
47 * <p>
48 * When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
49 * <p>
50 * @return the content type, <b>null</b> if none.
51 *
52 */
53 public String getType() {
54 return _type;
55 }
56
57 /***
58 * Sets the content type.
59 * <p>
60 * When used for the description of an entry, if <b>null</b> 'text/plain' must be assumed.
61 * <p>
62 * @param type the content type to set, <b>null</b> if none.
63 *
64 */
65 public void setType(String type) {
66 _type = type;
67 }
68
69 /***
70 * Returns the content value.
71 * <p>
72 * @return the content value, <b>null</b> if none.
73 *
74 */
75 public String getValue() {
76 return _value;
77 }
78
79 /***
80 * Sets the content value.
81 * <p>
82 * @param value the content value to set, <b>null</b> if none.
83 *
84 */
85 public void setValue(String value) {
86 _value = value;
87 }
88
89
90 public Class getInterface() {
91 return SyndContentI.class;
92 }
93
94 public void copyFrom(Object obj) {
95 SYND_COPY_FROM.copy(this,obj);
96 }
97
98 private static final SyndCopyFrom SYND_COPY_FROM;
99
100 static {
101 Map basePropInterfaceMap = new HashMap();
102 basePropInterfaceMap.put("type",String.class);
103 basePropInterfaceMap.put("value",String.class);
104
105 Map basePropClassImplMap = Collections.EMPTY_MAP;
106
107 SYND_COPY_FROM = new SyndCopyFrom(SyndContentI.class,basePropInterfaceMap,basePropClassImplMap);
108 }
109
110 }