|
|||||||||
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.Collection
public class Collection
The Collection class defines the basic Java object model representation and XML parsing/generation support for an APP collection. The implementation is versioned to support the AtomPub draft version 9 introspection format (used for the GData v1 implementation) as well as the final RFC5023 format (used for all other versions). The key difference between the two is that draft used an attribute for the collection title and a comma-delimited list for accepted MIME types, where the final version uses atom:title and repeating app:accept elements.
Nested Class Summary | |
---|---|
class |
Collection.Handler
XmlParser ElementHandler for app:workspace |
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
Constructor Summary | |
---|---|
Collection()
|
|
Collection(java.lang.String href)
|
|
Collection(java.lang.String href,
TextConstruct title)
|
|
Collection(java.lang.String href,
TextConstruct title,
java.lang.String... accepts)
|
Method Summary | |
---|---|
void |
addAccept(java.lang.String accept)
|
void |
addCategories(Categories c)
|
void |
consumeAttributes(AttributeHelper attrHelper)
Consumes attributes from the attribute helper. |
void |
generate(XmlWriter w,
ExtensionProfile extProfile)
Generates XML. |
java.util.List<java.lang.String> |
getAcceptList()
Returns a list of accept values. |
static java.lang.String |
getAtomEntryAcceptType()
Returns the accept type used in Atom service document to represent the fact that the service accepts Atom entry posting. |
java.util.List<Categories> |
getCategoriesList()
|
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 value of the resource reference. |
TextConstruct |
getTitle()
Returns the title of the collection. |
java.lang.String |
getType()
The mime type of the collection |
void |
setHref(java.lang.String href)
Sets the value of the resource reference. |
void |
setTitle(TextConstruct title)
|
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 Collection()
public Collection(java.lang.String href)
public Collection(java.lang.String href, TextConstruct title)
public Collection(java.lang.String href, TextConstruct title, java.lang.String... accepts)
Method Detail |
---|
public static java.lang.String getAtomEntryAcceptType()
public TextConstruct getTitle()
ICollection
getTitle
in interface ICollection
public void setTitle(TextConstruct title)
public java.lang.String getHref()
Reference
getHref
in interface Reference
public void setHref(java.lang.String href)
Reference
setHref
in interface Reference
href
- the resource href.public java.lang.String getType()
public java.util.List<java.lang.String> getAcceptList()
ICollection
getAcceptList
in interface ICollection
public void addAccept(java.lang.String accept)
public java.util.List<Categories> getCategoriesList()
public void addCategories(Categories c)
public void generate(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
generate
in interface Extension
generate
in class AbstractExtension
w
- output writerextProfile
- extension profile
java.io.IOException
public void consumeAttributes(AttributeHelper attrHelper) throws ParseException
AbstractExtension
AttributeHelper.consumeContent(boolean)
to consume the element's text
content. Called from AbstractExtension.getHandler(com.google.gdata.data.ExtensionProfile, java.lang.String, java.lang.String, org.xml.sax.Attributes)
. Default implementation does
nothing, though generally this is discouraged unless there really are no
attributes.
attrHelper
- attribute helper
ParseException
- any parsing exceptionpublic XmlParser.ElementHandler getHandler(ExtensionProfile p, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
AbstractExtension
AttributesHandler
to handle
parsing the extension.
getHandler
in interface Extension
getHandler
in class ExtensionPoint
p
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |