com.google.gdata.data.introspection
Class ServiceDocument
java.lang.Object
com.google.gdata.data.AbstractExtension
com.google.gdata.data.ExtensionPoint
com.google.gdata.data.introspection.ServiceDocument
- All Implemented Interfaces:
- Extension
public class ServiceDocument
- extends ExtensionPoint
The ServiceDocument class defines the basic Java object model
representation and XML parsing/generation support for an
Atom Publishing Protocol introspection document
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 |
consumeAttributes, 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 |
ServiceDocument
public ServiceDocument()
getWorkspaces
public java.util.List<Workspace> getWorkspaces()
addWorkspace
public void addWorkspace(Workspace workspace)
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
- Generates XML.
- Specified by:
generate
in interface Extension
- Overrides:
generate
in class AbstractExtension
- Parameters:
w
- output writerextProfile
- extension profile
- Throws:
java.io.IOException
parse
public void parse(ExtensionProfile extProfile,
java.io.Reader reader)
throws java.io.IOException,
ParseException
- Parses XML from a Reader.
- Parameters:
extProfile
- extension profilereader
- XML reader
- Throws:
java.io.IOException
ParseException
parse
public void parse(ExtensionProfile extProfile,
java.io.InputStream inputStream)
throws java.io.IOException,
ParseException
- Parses XML from an InputStream.
- Parameters:
extProfile
- extension profileinputStream
- XML input stream
- Throws:
java.io.IOException
ParseException
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