Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.server.renderers
Class XmlRenderer

    java.lang.Object

      |

      +--oracle.ifs.server.renderers.XmlRenderer

All Implemented Interfaces:
  Renderer

Direct Known Subclasses:
  SimpleXmlRenderer

public abstract class XmlRenderer
extends java.lang.Object
implements Renderer

An XMLRenderer creates a representation of a LibraryObject in XML format. Classes which extend XMLRenderer convert a given LibraryObject into an XMLDocument representation. XMLRenderer itself converts the XMLDocument into a InputStream or Reader.

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`.

Field Summary
`static java.lang.String` | `CHAR_ENCODING` The hashtable key for specifying a character encoding to the renderAsStream method.

Constructor Summary
`XmlRenderer(S_LibrarySession ls)` Constructs an XMLRenderer.

Method Summary
`protected abstract oracle.xml.parser.v2.XMLDocument` | `createTree(S_LibraryObject slo, java.util.Hashtable options)` Creates a DOM tree representing the S_LibraryObject passed in.
`java.io.Reader` | `renderAsReader(S_LibraryObject slo, java.util.Hashtable options)` Renders the specified LibraryObject as a Reader.
`java.io.InputStream` | `renderAsStream(S_LibraryObject slo, java.util.Hashtable options)` Renders the specified LibraryObject as an InputStream.
`java.lang.String` | `renderAsString(S_LibraryObject slo, java.util.Hashtable options)` Renders the specified LibraryObject as a String.

Field Detail

### CHAR_ENCODING

    public static final java.lang.String CHAR_ENCODING

  The hashtable key for specifying a character encoding to the renderAsStream method. The key's value must be a String.

Constructor Detail

### XmlRenderer

    public XmlRenderer(S_LibrarySession ls)
                throws IfsException

  Constructs an XMLRenderer.
  Parameters:
    `ls` - The LibrarySession constructing the XMLRenderer
  Throws:
    `IfsException` - thrown if the operation failed

Method Detail

### renderAsStream

    public final java.io.InputStream renderAsStream(S_LibraryObject slo,
                                                    java.util.Hashtable options)
                                             throws IfsException

  Renders the specified LibraryObject as an InputStream.
  Specified by:
    `renderAsStream` in interface `Renderer`
  Parameters:
    `slo` - The object to be rendered
    `options` - A hashtable containing options configuring rendering
  Returns:
    the InputStream
  Throws:
    `IfsException` - thrown if the operation fails

### renderAsReader

    public final java.io.Reader renderAsReader(S_LibraryObject slo,
                                               java.util.Hashtable options)
                                        throws IfsException

  Renders the specified LibraryObject as a Reader.
  Specified by:
    `renderAsReader` in interface `Renderer`
  Parameters:
    `slo` - The object to be rendered
    `options` - A hashtable containing options configuring rendering
  Returns:
    the Reader
  Throws:
    `IfsException` - thrown if the operation fails

### renderAsString

    public final java.lang.String renderAsString(S_LibraryObject slo,
                                                 java.util.Hashtable options)
                                          throws IfsException

  Renders the specified LibraryObject as a String.
  Parameters:
    `slo` - The object to be rendered
    `options` - A hashtable containing options configuring rendering
  Returns:
    the String
  Throws:
    `IfsException` - thrown if the operation fails

### createTree

    protected abstract oracle.xml.parser.v2.XMLDocument createTree(S_LibraryObject slo,
                                                                   java.util.Hashtable options)
                                                            throws IfsException

  Creates a DOM tree representing the S_LibraryObject passed in.

  XMLRenderer will renderer the returned XMLDocument. The options available are:

  CHARACTER_SET
    Sets the character encoding for this document
  Parameters:
    `slo` - the object to be rendered
    `options` - the options table- see method description
  Returns:
    the XMLDocument to render
  Throws:
    `IfsException` - thrown if an error occured during this operation

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD