com.google.gdata.data.introspection
Class Workspace
java.lang.Object
com.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.introspection.Workspace
- All Implemented Interfaces:
- Extension
public class Workspace
- extends ExtensionPoint
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 |
Methods inherited from class com.google.gdata.data.ExtensionPoint |
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild |
Methods inherited from class com.google.gdata.data.AbstractExtension |
eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Workspace
public Workspace()
Workspace
public Workspace(TextConstruct title)
getTitle
public TextConstruct getTitle()
setTitle
public void setTitle(TextConstruct v)
getCollections
public java.util.List<Collection> getCollections()
addCollection
public void addCollection(Collection coll)
visitChildren
protected void visitChildren(ExtensionVisitor ev)
throws ExtensionVisitor.StoppedException
- Description copied from class:
ExtensionPoint
- Called to visit all children of this extension point.
- Overrides:
visitChildren
in class ExtensionPoint
- Parameters:
ev
- the extension visitor.
- Throws:
ExtensionVisitor.StoppedException
generate
public void generate(XmlWriter w,
ExtensionProfile extProfile)
throws java.io.IOException
- Description copied from interface:
Extension
- Generates an XML representation for the extension.
- Specified by:
generate
in interface Extension
- Overrides:
generate
in class AbstractExtension
- Parameters:
w
- XML writerextProfile
- extension profile
- Throws:
java.io.IOException
consumeAttributes
public void consumeAttributes(AttributeHelper attrHelper)
throws ParseException
- Description copied from class:
AbstractExtension
- Consumes attributes from the attribute helper. May also use
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.
- Overrides:
consumeAttributes
in class AbstractExtension
- Parameters:
attrHelper
- attribute helper
- Throws:
ParseException
- any parsing exception
getHandler
public XmlParser.ElementHandler getHandler(ExtensionProfile p,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
- Description copied from class:
AbstractExtension
- The default implementation uses the
AbstractExtension.AttributesHandler
to handle
parsing the extension.
- Specified by:
getHandler
in interface Extension
- Overrides:
getHandler
in class ExtensionPoint
- Parameters:
p
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributes
- Returns:
- an element handler
processEndElement
public void processEndElement()
throws ParseException
- Throws:
ParseException