org.apache.fop.fo
Class FOTreeBuilder
DefaultHandler
org.apache.fop.fo.FOTreeBuilder
public class FOTreeBuilder
extends DefaultHandler
SAX Handler that passes parsed data to the various
FO objects, where they can be used either to build
an FO Tree, or used by Structure Renderers to build
other data structures.
delegate
protected ContentHandler delegate
Current delegate ContentHandler to receive the SAX events
elementMappingRegistry
protected ElementMappingRegistry elementMappingRegistry
The registry for ElementMapping instances
log
protected Log log
logging instance
mainFOHandler
protected org.apache.fop.fo.FOTreeBuilder.MainFOHandler mainFOHandler
Main DefaultHandler that handles the FO namespace.
rootFObj
protected Root rootFObj
The root of the formatting object tree
FOTreeBuilder
public FOTreeBuilder(String outputFormat,
FOUserAgent foUserAgent,
OutputStream stream)
throws FOPException
FOTreeBuilder
constructor
outputFormat
- the MIME type of the output format to use (ex. "application/pdf").foUserAgent
- the FOUserAgent
in effect for this processstream
- the OutputStream
to direct the results to
FOPException
- if the FOTreeBuilder
cannot be properly created
characters
public void characters(char[] data,
int start,
int length)
throws SAXException
endDocument
public void endDocument()
throws SAXException
endElement
public void endElement(String uri,
String localName,
String rawName)
throws SAXException
error
public void error(SAXParseException e)
fatalError
public void fatalError(SAXParseException e)
throws SAXException
getEffectiveLocator
protected Locator getEffectiveLocator()
- a
Locator
instance if it is available and not disabled
getEventHandler
public FOEventHandler getEventHandler()
- the FOEventHandler object
getResults
public FormattingResults getResults()
Returns the results of the rendering process. Information includes
the total number of pages generated and the number of pages per
page-sequence.
- the results of the rendering process.
setDocumentLocator
public void setDocumentLocator(Locator locator)
startDocument
public void startDocument()
throws SAXException
startElement
public void startElement(String namespaceURI,
String localName,
String rawName,
Attributes attlist)
throws SAXException
warning
public void warning(SAXParseException e)
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.