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