|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.introspection.Categories
public class Categories
The Categories class implements the data model for the AtomPub categories element, as described in Sec 7.2.1 of the AtomPub specification.
| Nested Class Summary | |
|---|---|
class |
Categories.Handler
The Handler class implements the XmlParser.ElementHandler for
parsing an app:categories element. |
| Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
|---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
| Constructor Summary | |
|---|---|
Categories()
Constructs a new empty Categories instance for the purposes of parsing an AtomPub categories element or document. |
|
Categories(boolean fixed,
java.lang.String defaultScheme,
Category... categories)
Constructs a Categories instance with in-line category descriptions. |
|
Categories(java.lang.String href)
Constructs a Categories instance that references an out-of-line list of categories stored in a category document. |
|
| Method Summary | |
|---|---|
void |
addCategory(Category category)
Adds a new category to the category list. |
void |
generate(XmlWriter w,
ExtensionProfile extProfile)
Generates XML. |
java.util.List<Category> |
getCategoryList()
Returns the list of in-line categories or null if there is no
associated list. |
java.lang.String |
getDefaultScheme()
Returns the default scheme used for nested categories if not specified directly on the instance. |
XmlParser.ElementHandler |
getHandler(ExtensionProfile p,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
The default implementation uses the AttributesHandler to handle
parsing the extension. |
java.lang.String |
getHref()
Returns the location of an external AtomPub categories document that describes the list of categories. |
boolean |
isFixed()
Returns true if the Categories instance contains in-line category
data that is a fixed set. |
void |
parseAtom(ExtensionProfile extProfile,
XmlParser parser)
Parses a Categories element using data read from the specified parser instance. |
void |
validate()
Checks the attributes to see if there are any problems. |
| Methods inherited from class com.google.gdata.data.ExtensionPoint |
|---|
addExtension, addRepeatingExtension, declareExtensions, generateCumulativeXmlBlob, getExtension, getExtensions, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit |
| Methods inherited from class com.google.gdata.data.AbstractExtension |
|---|
disableStrictValidation, enableStrictValidation, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Categories()
parseAtom(ExtensionProfile, XmlParser)
public Categories(boolean fixed,
java.lang.String defaultScheme,
Category... categories)
fixed - true if the list of categories is a fixed set,
false if an open set.defaultScheme - the default scheme uri value that will be used for all
nested category elements that do not have a scheme.categories - list of categories.public Categories(java.lang.String href)
href - | Method Detail |
|---|
public boolean isFixed()
true if the Categories instance contains in-line category
data that is a fixed set.
true there is a fixed set of categories.public java.lang.String getDefaultScheme()
null if there is no default
scheme.
null.public java.lang.String getHref()
null if none.public java.util.List<Category> getCategoryList()
null if there is no
associated list.
null.public void addCategory(Category category)
category - new category to add.
public XmlParser.ElementHandler getHandler(ExtensionProfile p,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
AbstractExtensionAttributesHandler to handle
parsing the extension.
getHandler in interface ExtensiongetHandler in class ExtensionPointp - extension profilenamespace - extension namespacelocalName - tag name, without the namespace prefixattrs - tag attributes
public void validate()
throws java.lang.IllegalStateException
AbstractExtension
java.lang.IllegalStateException - if any problems are found with the
attributes
public void parseAtom(ExtensionProfile extProfile,
XmlParser parser)
throws java.io.IOException,
ParseException
extProfile - Extension profile.parser - XML input parse.
java.io.IOException
ParseException
public void generate(XmlWriter w,
ExtensionProfile extProfile)
throws java.io.IOException
generate in interface Extensiongenerate in class AbstractExtensionw - output writerextProfile - extension profile
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||