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.module.DCSubject;
21 import com.sun.syndication.feed.module.DCSubjectI;
22
23 /***
24 * Bean for categories of SyndFeed feeds and entries.
25 * <p>
26 * @author Alejandro Abdelnur
27 *
28 */
29 public class SyndCategory extends ObjectBean implements SyndCategoryI {
30 private DCSubjectI _subject;
31 private String _name;
32 private String _taxonomyUri;
33
34 /***
35 * Package private constructor, used by SyndCategoryListFacade.
36 * <p>
37 * @param subject the DC subject to wrap.
38 *
39 */
40 SyndCategory(DCSubjectI subject) {
41 _subject = subject;
42 }
43
44 /***
45 * Package private constructor, used by SyndCategoryListFacade.
46 * <p>
47 * @return the DC subject being wrapped.
48 *
49 */
50 DCSubjectI getSubject() {
51 return _subject;
52 }
53
54 /***
55 * Default constructor. All properties are set to <b>null</b>.
56 * <p>
57 *
58 */
59 public SyndCategory() {
60 this(new DCSubject());
61 }
62
63 /***
64 * Returns the category name.
65 * <p>
66 * @return the category name, <b>null</b> if none.
67 *
68 */
69 public String getName() {
70 return _subject.getValue();
71 }
72
73 /***
74 * Sets the category name.
75 * <p>
76 * @param name the category name to set, <b>null</b> if none.
77 *
78 */
79 public void setName(String name) {
80 _subject.setValue(name);
81 }
82
83 /***
84 * Returns the category taxonomy URI.
85 * <p>
86 * @return the category taxonomy URI, <b>null</b> if none.
87 *
88 */
89 public String getTaxonomyUri() {
90 return _subject.getTaxonomyUri();
91 }
92
93 /***
94 * Sets the category taxonomy URI.
95 * <p>
96 * @param taxonomyUri the category taxonomy URI to set, <b>null</b> if none.
97 *
98 */
99 public void setTaxonomyUri(String taxonomyUri) {
100 _subject.setTaxonomyUri(taxonomyUri);
101 }
102
103 }