public class Collection extends ExtensionPoint implements Reference, ICollection
Modifier and Type | Class and Description |
---|---|
class |
Collection.Handler
XmlParser ElementHandler for
app:workspace |
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
Constructor and Description |
---|
Collection() |
Collection(java.lang.String href) |
Collection(java.lang.String href,
TextConstruct title) |
Collection(java.lang.String href,
TextConstruct title,
java.lang.String... accepts) |
Modifier and Type | Method and Description |
---|---|
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) |
addExtension, addRepeatingExtension, declareExtensions, generateCumulativeXmlBlob, getExtension, getExtensions, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit
disableStrictValidation, enableStrictValidation, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
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)
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
public void setHref(java.lang.String href)
Reference
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 profilejava.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 helperParseException
- 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