public class ServiceDocument extends ExtensionPoint implements IServiceDocument
Modifier and Type | Class and Description |
---|---|
class |
ServiceDocument.Handler
XmlParser ElementHandler for
app:service |
ExtensionPoint.CumulativeBlobHandler, ExtensionPoint.ExtensionHandler
Constructor and Description |
---|
ServiceDocument() |
Modifier and Type | Method and Description |
---|---|
Workspace |
addWorkspace(java.lang.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,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
The default implementation uses the
AttributesHandler to handle
parsing the extension. |
java.util.List<Workspace> |
getWorkspaces()
Returns the workspaces associated with this service.
|
void |
parse(ExtensionProfile extProfile,
java.io.InputStream inputStream)
Parses XML from an InputStream.
|
void |
parse(ExtensionProfile extProfile,
java.io.Reader reader)
Parses XML from a Reader.
|
void |
processEndElement() |
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 java.util.List<Workspace> getWorkspaces()
IServiceDocument
getWorkspaces
in interface IServiceDocument
public void addWorkspace(Workspace workspace)
public Workspace addWorkspace(java.lang.String title)
IServiceDocument
addWorkspace
in interface IServiceDocument
public void generate(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
generate
in interface Extension
generate
in class AbstractExtension
w
- output writerextProfile
- extension profilejava.io.IOException
public void parse(ExtensionProfile extProfile, java.io.Reader reader) throws java.io.IOException, ParseException
extProfile
- extension profilereader
- XML readerjava.io.IOException
ParseException
public void parse(ExtensionProfile extProfile, java.io.InputStream inputStream) throws java.io.IOException, ParseException
extProfile
- extension profileinputStream
- XML input streamjava.io.IOException
ParseException
public 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