|
|||||||||
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.Workspace
public class Workspace
The Workspace class defines the basic Java object model representation and XML parsing/generation support for an AtomPub workspace. 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 workspace title where the final version uses an atom:title element. elements.
Nested Class Summary | |
---|---|
class |
Workspace.Handler
XmlParser ElementHandler for app:workspace |
Nested classes/interfaces inherited from class com.google.gdata.data.ExtensionPoint |
---|
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler |
Constructor Summary | |
---|---|
Workspace()
|
|
Workspace(TextConstruct title)
|
Method Summary | |
---|---|
void |
addCollection(Collection coll)
|
Collection |
addCollection(java.lang.String collectionUri,
java.lang.String title,
java.lang.String... acceptedTypes)
Add a new collection to the list of collections associated with this workspace. |
void |
consumeAttributes(AttributeHelper attrHelper)
Consumes attributes from the attribute helper. |
void |
generate(XmlWriter w,
ExtensionProfile extProfile)
Generates an XML representation for the extension. |
java.util.List<Collection> |
getCollections()
Returns the collections associated with this workspace. |
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. |
TextConstruct |
getTitle()
|
void |
processEndElement()
|
void |
setTitle(TextConstruct v)
|
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 Workspace()
public Workspace(TextConstruct title)
Method Detail |
---|
public TextConstruct getTitle()
public void setTitle(TextConstruct v)
public java.util.List<Collection> getCollections()
IWorkspace
getCollections
in interface IWorkspace
public void addCollection(Collection coll)
public Collection addCollection(java.lang.String collectionUri, java.lang.String title, java.lang.String... acceptedTypes)
IWorkspace
addCollection
in interface IWorkspace
public void generate(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
Extension
generate
in interface Extension
generate
in class AbstractExtension
w
- XML 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
public void processEndElement() throws ParseException
ParseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |