Known Direct Subclasses
| AtomGenerator |
The AtomGenerator class is a concrete implementation of the OutputGenerator
interface that generates GData feeds and entries using the Atom XML Syntax. |
| AtomServiceGenerator |
Generates the metadata for an Atom Service (introspection) document. |
| OpenSearchGenerator |
Generates the output for an OpenSearch description document
|
| RssGenerator |
The RssGenerator class is a concrete implementation of the OutputGenerator
interface that generates GData feeds and entries using the RSS 2.0 Syntax. |
|
Class Overview
The XmlGenerator class is an abstract base class supporting the
implementation of the OutputGenerator interface for XML content types.
Summary
| Public Methods |
|
void
|
generate(Writer w, OutputProperties outProps, S source)
Generates content to the writer based upon the provided request/response.
|
|
abstract
void
|
generateXml(XmlWriter w, OutputProperties outProps, S source)
Generates the XML content to the provided XML writer instance based
upon the query request/response attributes.
|
Fields
protected
static
final
List<ContentType>
XML_CONTENT_TYPES
The base set of matching content types for XML content. Custom subclasses
may add to this list.
Public Constructors
Public Methods
public
void
generate
(Writer w, OutputProperties outProps, S source)
Generates content to the writer based upon the provided request/response.
Parameters
| w
| Output writer. |
| outProps
| Output properties for the generated output. |
| source
| Source object for the generated output. |
public
abstract
void
generateXml
(XmlWriter w, OutputProperties outProps, S source)
Generates the XML content to the provided XML writer instance based
upon the query request/response attributes.
Protected Methods
protected
static
List<ContentType>
createMatchingXmlList
(ContentType... types)
Creates a new matching ContentType set that contains all of the basic
XML types plus an additional list of types.
protected
XmlWriter
getXmlWriter
(Writer w, OutputProperties outProps, String charset)
Returns an XmlWriter configured based upon request attributes.
Parameters
| w
| The underlying writer to write to |
| outProps
| Output properties |
| charset
| The writer's character encoding (determines which characters
need to be escaped. Note that the writer must already be configured to
use this character set. If the writer and the character set are out of
sync, the generated XML may be overly escaped (not too bad) or
malformed (pretty serious.) |
Throws
| IOException
| If an error occurs creating the XmlWriter.
|