public class

ServiceDocument

extends ExtensionPoint
implements IServiceDocument
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.introspection.ServiceDocument

Class Overview

The ServiceDocument class defines the basic Java object model representation and XML parsing/generation support for an Atom Publishing Protocol introspection document

Summary

Nested Classes
class ServiceDocument.Handler XmlParser ElementHandler for app:service  
Fields
private XmlNamespace atomPubNs
List<Workspace> workspaces The list of workspaces associated with the service
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
ServiceDocument()
Public Methods
Workspace addWorkspace(String title)
Add a new workspace to the service document, returning the newly created workspace to the caller.
void addWorkspace(Workspace workspace)
void generate(XmlWriter w, ExtensionProfile extProfile)
Generates XML.
XmlParser.ElementHandler getHandler(ExtensionProfile p, String namespace, String localName, Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.
List<Workspace> getWorkspaces()
Returns the workspaces associated with this service.
void parse(ExtensionProfile extProfile, Reader reader)
Parses XML from a Reader.
void parse(ExtensionProfile extProfile, InputStream inputStream)
Parses XML from an InputStream.
void processEndElement()
Protected Methods
void visitChildren(ExtensionVisitor ev)
Called to visit all children of this extension point.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.introspection.IServiceDocument

Fields

private XmlNamespace atomPubNs

List<Workspace> workspaces

The list of workspaces associated with the service

Public Constructors

public ServiceDocument ()

Public Methods

public Workspace addWorkspace (String title)

Add a new workspace to the service document, returning the newly created workspace to the caller.

Parameters
title

public void addWorkspace (Workspace workspace)

Parameters
workspace

public void generate (XmlWriter w, ExtensionProfile extProfile)

Generates XML.

Parameters
w Output writer
extProfile Extension profile
Throws
IOException

public XmlParser.ElementHandler getHandler (ExtensionProfile p, String namespace, String localName, Attributes attrs)

The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

Parameters
p Extension profile
namespace Extension namespace
localName Tag name, without the namespace prefix
attrs Tag attributes
Returns
  • an element handler

public List<Workspace> getWorkspaces ()

Returns the workspaces associated with this service.

public void parse (ExtensionProfile extProfile, Reader reader)

Parses XML from a Reader.

Parameters
extProfile Extension profile
reader XML reader
Throws
ParseException
IOException

public void parse (ExtensionProfile extProfile, InputStream inputStream)

Parses XML from an InputStream.

Parameters
extProfile Extension profile
inputStream XML input stream
Throws
ParseException
IOException

public void processEndElement ()

Protected Methods

protected void visitChildren (ExtensionVisitor ev)

Called to visit all children of this extension point.

Parameters
ev The extension visitor.