org.apache.fop.svg

Class AbstractFOPTranscoder

Known Direct Subclasses:
AbstractPSTranscoder, PDFTranscoder

public abstract class AbstractFOPTranscoder
extends SVGAbstractTranscoder

This is the common base class of all of FOP's transcoders.

Nested Class Summary

protected class
AbstractFOPTranscoder.FOPErrorHandler
This is the default transcoder error handler for FOP.
protected class
AbstractFOPTranscoder.FOPTranscoderUserAgent
A user agent implementation for FOP's Transcoders.

Field Summary

static TranscodingHints.Key
KEY_STROKE_TEXT
The key to specify whether to stroke text instead of using text operations.
static Boolean
VALUE_FORMAT_OFF
The value to turn off text stroking.
static Boolean
VALUE_FORMAT_ON
The value to turn on text stroking.
protected UserAgent
userAgent
The user agent dedicated to this Transcoder.

Constructor Summary

AbstractFOPTranscoder()
Constructs a new FOP-style transcoder.

Method Summary

protected DocumentFactory
createDocumentFactory(DOMImplementation domImpl, String parserClassname)
Creates a DocumentFactory that is used to create an SVG DOM tree.
protected UserAgent
createUserAgent()
Creates and returns the default user agent for this transcoder.
protected Log
getLogger()
Returns the logger associated with this transcoder.
void
setEntityResolver(EntityResolver resolver)
Sets the EntityResolver that should be used when building SVG documents.
void
setLogger(Log logger)

Field Details

KEY_STROKE_TEXT

public static final TranscodingHints.Key KEY_STROKE_TEXT
The key to specify whether to stroke text instead of using text operations.

VALUE_FORMAT_OFF

public static final Boolean VALUE_FORMAT_OFF
The value to turn off text stroking.

VALUE_FORMAT_ON

public static final Boolean VALUE_FORMAT_ON
The value to turn on text stroking.

userAgent

protected UserAgent userAgent
The user agent dedicated to this Transcoder.

Constructor Details

AbstractFOPTranscoder

public AbstractFOPTranscoder()
Constructs a new FOP-style transcoder.

Method Details

createDocumentFactory

protected DocumentFactory createDocumentFactory(DOMImplementation domImpl,
                                                String parserClassname)
Creates a DocumentFactory that is used to create an SVG DOM tree. The specified DOM Implementation is ignored and the Batik SVG DOM Implementation is automatically used.
Parameters:
domImpl - the DOM Implementation (not used)
parserClassname - the XML parser classname
Returns:
the document factory

createUserAgent

protected UserAgent createUserAgent()
Creates and returns the default user agent for this transcoder. Override this method if you need non-default behaviour.
Returns:
UserAgent the newly created user agent

getLogger

protected final Log getLogger()
Returns the logger associated with this transcoder. It returns a SimpleLog if no logger has been explicitly set.
Returns:
Logger the logger for the transcoder.

setEntityResolver

public void setEntityResolver(EntityResolver resolver)
Sets the EntityResolver that should be used when building SVG documents.
Parameters:
resolver - the resolver

setLogger

public void setLogger(Log logger)

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