public class Category extends java.lang.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 |
---|---|
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.
|
Constructor and Description |
---|
Category() |
Category(java.lang.String category)
Constructs a new category from a Category string.
|
Category(java.lang.String scheme,
java.lang.String term)
Constructs a new category.
|
Category(java.lang.String scheme,
java.lang.String term,
java.lang.String label)
Constructs a new category.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
void |
generateAtom(XmlWriter w)
Generates XML in the Atom format.
|
void |
generateRss(XmlWriter w)
Generates XML in the RSS format.
|
java.lang.String |
getLabel()
Returns the category label or
null if there is no label value. |
java.lang.String |
getLabelLang() |
java.lang.String |
getScheme()
Returns the category scheme or
null if the category does not have
a scheme. |
java.lang.String |
getTerm()
Returns the category term.
|
int |
hashCode() |
void |
setLabel(java.lang.String v) |
void |
setLabelLang(java.lang.String v) |
void |
setScheme(java.lang.String v) |
void |
setTerm(java.lang.String v) |
java.lang.String |
toString() |
public static final char SCHEME_PREFIX
public static final char SCHEME_SUFFIX
public Category()
public Category(java.lang.String category)
category
- the category stringpublic Category(java.lang.String scheme, java.lang.String term)
public Category(java.lang.String scheme, java.lang.String term, java.lang.String label)
public java.lang.String getScheme()
ICategory
null
if the category does not have
a scheme.public void setScheme(java.lang.String v)
public java.lang.String getTerm()
ICategory
public void setTerm(java.lang.String v)
public java.lang.String getLabel()
ICategory
null
if there is no label value.public void setLabel(java.lang.String v)
public java.lang.String getLabelLang()
public void setLabelLang(java.lang.String v)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void generateAtom(XmlWriter w) throws java.io.IOException
w
- Output writer.java.io.IOException
public void generateRss(XmlWriter w) throws java.io.IOException
w
- Output writer.java.io.IOException