org.apache.fop.image.analyser

Class XMLReader

Implemented Interfaces:
ImageReader

public class XMLReader
extends java.lang.Object
implements ImageReader

ImageReader object for XML document image type.

Nested Class Summary

static interface
XMLReader.Converter
This interface is to be implemented for XML to image converters.

Method Summary

FopImage.ImageInfo
createDocument(InputStream input, FOUserAgent ua)
Creates an ImageInfo object from an XML image read from a stream.
String
getMimeType()
Returns the MIME type supported by this implementation.
protected FopImage.ImageInfo
loadImage(String uri, InputStream bis, FOUserAgent ua)
Creates an ImageInfo object from an XML image read from a stream.
static void
setConverter(String ns, XMLReader.Converter conv)
Registers a Converter implementation with XMLReader.
FopImage.ImageInfo
verifySignature(String uri, InputStream fis, FOUserAgent ua)

Method Details

createDocument

public FopImage.ImageInfo createDocument(InputStream input,
                                         FOUserAgent ua)
Creates an ImageInfo object from an XML image read from a stream.
Parameters:
input - The InputStream
ua - The user agent
Returns:
An ImageInfo object describing the image

getMimeType

public String getMimeType()
Returns the MIME type supported by this implementation.
Returns:
The MIME type

loadImage

protected FopImage.ImageInfo loadImage(String uri,
                                       InputStream bis,
                                       FOUserAgent ua)
Creates an ImageInfo object from an XML image read from a stream. (todo) This means the external svg document will be loaded twice. Possibly need a slightly different design for the image stuff.
Parameters:
uri - The URI to the image
bis - The InputStream
ua - The user agent
Returns:
An ImageInfo object describing the image

setConverter

public static void setConverter(String ns,
                                XMLReader.Converter conv)
Registers a Converter implementation with XMLReader.
Parameters:
ns - The namespace to associate with this converter
conv - The actual Converter implementation

verifySignature

public FopImage.ImageInfo verifySignature(String uri,
                                          InputStream fis,
                                          FOUserAgent ua)
            throws IOException
Specified by:
verifySignature in interface ImageReader
See Also:
ImageReader

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.