Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.image.xml
Class ImageProviderRequestUtils

java.lang.Object
  |
  +--oracle.cabo.image.xml.ImageProviderRequestUtils

public class ImageProviderRequestUtils
extends java.lang.Object

Utility methods for parsing and encoding ImageProviderRequest XML elements.


Method Summary
static ParserManager createDefaultManager()
          Creates a ParserManager with the default ParserFactory for the TECATE_NAMESPACE.
static ImageProviderRequest createImageProviderRequest(ImageContext context, XMLProvider provider, org.xml.sax.InputSource source)
          Creates an ImageProviderRequest from an InputSource containing a single image entry.
static ImageProviderRequest[] createImageProviderRequests(ImageContext context, XMLProvider provider, org.xml.sax.InputSource source)
          Creates an array of ImageProviderRequests from an InputSource containing multiple image entries.
static MapArea[] createMapAreas(ImageContext context, XMLProvider provider, org.xml.sax.InputSource source)
          Creates an array of MapAreas from an InputSource containing a single imageMap element.
static void encodeImageMapAreas(ImageContext context, java.lang.String namespaceURI, java.lang.String localName, MapArea[] areas, java.io.PrintWriter writer)
          Encodes the MapAreas into the XML representation.
static void encodeImageProviderRequest(ImageContext context, java.lang.String namespaceURI, java.lang.String localName, ImageType type, java.util.Dictionary properties, java.util.Dictionary responseProperties, java.io.PrintWriter writer)
          Encodes an request based on the requested image type and properties.
static void registerParserFactory(java.lang.Class expectedType, java.lang.String namespace, ParserFactory factory)
          Registers a ParserFactory which is used to parse ImageProviderRequest objects for elements in the specified namespace.
static void unregisterParserFactory(java.lang.Class expectedType, java.lang.String namespace)
          Unregisters the ParserFactory for the specified namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createImageProviderRequest

public static ImageProviderRequest createImageProviderRequest(ImageContext context,
                                                              XMLProvider provider,
                                                              org.xml.sax.InputSource source)
                                                       throws java.io.IOException,
                                                              org.xml.sax.SAXException
Creates an ImageProviderRequest from an InputSource containing a single image entry.

createImageProviderRequests

public static ImageProviderRequest[] createImageProviderRequests(ImageContext context,
                                                                 XMLProvider provider,
                                                                 org.xml.sax.InputSource source)
                                                          throws java.io.IOException,
                                                                 org.xml.sax.SAXException
Creates an array of ImageProviderRequests from an InputSource containing multiple image entries.

encodeImageProviderRequest

public static void encodeImageProviderRequest(ImageContext context,
                                              java.lang.String namespaceURI,
                                              java.lang.String localName,
                                              ImageType type,
                                              java.util.Dictionary properties,
                                              java.util.Dictionary responseProperties,
                                              java.io.PrintWriter writer)
                                       throws java.lang.IllegalArgumentException
Encodes an request based on the requested image type and properties. If an XMLEncoder can not be found for the requested ImageType, an IllegalArgumentException is thrown.
Parameters:
context - The image context
namespaceURI - The namespace URI of the root element. If null, no namespaceURI is written.
localName - The local name of the root element
type - The ImageType of the requested image
properties - The requested image properties
responseProperties - The response properties for the image generated for this request. If null, no repsonse properties are encoded.
The - PrintWriter to encode the request to

createMapAreas

public static MapArea[] createMapAreas(ImageContext context,
                                       XMLProvider provider,
                                       org.xml.sax.InputSource source)
                                throws java.io.IOException,
                                       org.xml.sax.SAXException
Creates an array of MapAreas from an InputSource containing a single imageMap element.

encodeImageMapAreas

public static void encodeImageMapAreas(ImageContext context,
                                       java.lang.String namespaceURI,
                                       java.lang.String localName,
                                       MapArea[] areas,
                                       java.io.PrintWriter writer)
Encodes the MapAreas into the XML representation.
Parameters:
context - The ImageContext
namespaceURI - The namespace URI of the root element. If null, no namespaceURI is written.
localName - The local name of the root element
areas - The MapAreas to encode
writer - The PrintWriter to which the MapAreas are written

createDefaultManager

public static ParserManager createDefaultManager()
Creates a ParserManager with the default ParserFactory for the TECATE_NAMESPACE.

registerParserFactory

public static void registerParserFactory(java.lang.Class expectedType,
                                         java.lang.String namespace,
                                         ParserFactory factory)
Registers a ParserFactory which is used to parse ImageProviderRequest objects for elements in the specified namespace.

unregisterParserFactory

public static void unregisterParserFactory(java.lang.Class expectedType,
                                           java.lang.String namespace)
Unregisters the ParserFactory for the specified namespace.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.