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
AbstractExtension.AttributesHandler
xmlBlob
localName, namespace
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
AbstractExtension.AttributesHandler to handle
parsing the extension. |
TextConstruct |
getTitle() |
void |
processEndElement() |
void |
setTitle(TextConstruct v) |
protected void |
visitChildren(ExtensionVisitor ev)
Called to visit all children of this extension point.
|
addExtension, addExtension, addRepeatingExtension, addRepeatingExtension, checkRequiredExtensions, createExtensionInstance, declareExtensions, generate, generateCumulativeXmlBlob, generateExtensions, generateStartElement, getExtension, getExtensionDescription, getExtensionHandler, getExtensions, getManifest, getRepeatingExtension, getRepeatingExtensions, getXmlBlob, hasExtension, hasRepeatingExtension, initializeArbitraryXml, parseCumulativeXmlBlob, removeExtension, removeExtension, removeRepeatingExtension, setExtension, setXmlBlob, visit, visitChild
disableStrictValidation, enableStrictValidation, eq, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, putAttributes, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
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
protected void visitChildren(ExtensionVisitor ev) throws ExtensionVisitor.StoppedException
ExtensionPoint
visitChildren
in class ExtensionPoint
ev
- the extension visitor.ExtensionVisitor.StoppedException
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.consumeAttributes
in class AbstractExtension
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
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