public class Category extends Object implements ICategory
For the purposes of comparison, two Category instances are considered to be identical if they have matching schemes and terms. The label attributes are not used for the purpose of testing equality.
| Modifier and Type | Class and Description |
|---|---|
class |
Category.AtomHandler
<atom:category> parser. |
| Modifier and Type | Field and Description |
|---|---|
protected String |
label
Human-readable label.
|
protected String |
labelLang
Language.
|
protected String |
scheme
Scheme (domain).
|
static char |
SCHEME_PREFIX
The character used to prefix any (optional) scheme in the compound
scheme+term Category format.
|
static char |
SCHEME_SUFFIX
The character used to suffix any (optional) scheme in the compound
scheme+term Category format.
|
protected String |
term
Term.
|
| Constructor and Description |
|---|
Category() |
Category(String category)
Constructs a new category from a Category string.
|
Category(String scheme,
String term)
Constructs a new category.
|
Category(String scheme,
String term,
String label)
Constructs a new category.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
void |
generateAtom(XmlWriter w)
Generates XML in the Atom format.
|
void |
generateRss(XmlWriter w)
Generates XML in the RSS format.
|
String |
getLabel()
Returns the category label or
null if there is no label value. |
String |
getLabelLang() |
String |
getScheme()
Returns the category scheme or
null if the category does not have
a scheme. |
String |
getTerm()
Returns the category term.
|
int |
hashCode() |
void |
setLabel(String v) |
void |
setLabelLang(String v) |
void |
setScheme(String v) |
void |
setTerm(String v) |
String |
toString() |
public static final char SCHEME_PREFIX
public static final char SCHEME_SUFFIX
protected String scheme
protected String term
protected String label
protected String labelLang
public Category()
public Category(String category)
category - the category stringpublic String getScheme()
ICategorynull if the category does not have
a scheme.public void setScheme(String v)
public String getTerm()
ICategorypublic void setTerm(String v)
public String getLabel()
ICategorynull if there is no label value.public void setLabel(String v)
public String getLabelLang()
public void setLabelLang(String v)
public void generateAtom(XmlWriter w) throws IOException
w - Output writer.IOExceptionpublic void generateRss(XmlWriter w) throws IOException
w - Output writer.IOExceptionCopyright © 2012. All Rights Reserved.