public class Workspace extends ExtensionPoint implements IWorkspace
Modifier and Type | Class and Description |
---|---|
class |
Workspace.Handler
XmlParser ElementHandler for
app:workspace |
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
Constructor and Description |
---|
Workspace() |
Workspace(TextConstruct title) |
Modifier and Type | Method and Description |
---|---|
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) |
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 Workspace()
public Workspace(TextConstruct title)
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 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 attributespublic void processEndElement() throws ParseException
ParseException