public abstract class XmlRenderer extends Object implements Renderer
XMLRenderer uses the options hashtable specify the requested
character encoding for the output data. If no encoding is specified,
the default encoding from the session's Localizer is used.
Like all Renderers, an XMLRenderer must provide a constructor with
the following signature:
XMLRenderer(S_LibrarySession) throws IfsException
.
Modifier and Type | Field and Description |
---|---|
static String |
CHAR_ENCODING
The hashtable key for specifying a character encoding to the
renderAsStream method.
|
protected Localizer |
m_Localizer
The localizer from the session which created this XMLRenderer
|
Constructor and Description |
---|
XmlRenderer(S_LibrarySession ls)
Constructs an XMLRenderer.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Document |
createTree(S_LibraryObject slo,
Hashtable options)
Creates a DOM tree representing the S_LibraryObject passed in.
|
Reader |
renderAsReader(S_LibraryObject slo,
Hashtable options)
Renders the specified LibraryObject as a Reader.
|
InputStream |
renderAsStream(S_LibraryObject slo,
Hashtable options)
Renders the specified LibraryObject as an InputStream.
|
String |
renderAsString(S_LibraryObject slo,
Hashtable options)
Renders the specified LibraryObject as a String.
|
public static final String CHAR_ENCODING
protected Localizer m_Localizer
public XmlRenderer(S_LibrarySession ls) throws IfsException
ls
- The LibrarySession constructing the XMLRendererIfsException
- thrown if the operation failedpublic final InputStream renderAsStream(S_LibraryObject slo, Hashtable options) throws IfsException
renderAsStream
in interface Renderer
slo
- The object to be renderedoptions
- A hashtable containing options configuring renderingIfsException
- thrown if the operation failspublic final Reader renderAsReader(S_LibraryObject slo, Hashtable options) throws IfsException
renderAsReader
in interface Renderer
slo
- The object to be renderedoptions
- A hashtable containing options configuring renderingIfsException
- thrown if the operation failspublic final String renderAsString(S_LibraryObject slo, Hashtable options) throws IfsException
slo
- The object to be renderedoptions
- A hashtable containing options configuring renderingIfsException
- thrown if the operation failsprotected abstract Document createTree(S_LibraryObject slo, Hashtable options) throws IfsException
XMLRenderer will renderer the returned XMLDocument. The options available are:
slo
- the object to be renderedoptions
- the options table- see method descriptionIfsException
- thrown if an error occured during this
operationCopyright © 2023. All rights reserved.