|
fop 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.AbstractRenderer
org.apache.fop.render.PrintRenderer
org.apache.fop.render.xml.AbstractXMLRenderer
public abstract class AbstractXMLRenderer
Abstract xml renderer base class.
Field Summary | |
---|---|
protected org.xml.sax.helpers.AttributesImpl |
atts
AttributesImpl instance that can be used during XML generation. |
static java.lang.String |
CDATA
CDATA type |
protected RendererContext |
context
The renderer context. |
static org.xml.sax.Attributes |
EMPTY_ATTS
An empty Attributes object used when no attributes are needed. |
protected java.util.List |
extensionAttachments
A list of ExtensionAttachements received through processOffDocumentItem() |
protected org.xml.sax.ContentHandler |
handler
ContentHandler that the generated XML is written to |
static java.lang.String |
NS
Main namespace in use. |
protected java.io.OutputStream |
out
The OutputStream to write the generated XML to. |
Fields inherited from class org.apache.fop.render.PrintRenderer |
---|
embedFontInfoList, fontInfo, fontResolver |
Fields inherited from class org.apache.fop.render.AbstractRenderer |
---|
containingBPPosition, containingIPPosition, currentBPPosition, currentIPPosition, currentPageViewport, log, userAgent |
Fields inherited from interface org.apache.fop.render.Renderer |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractXMLRenderer(FOUserAgent userAgent)
|
Method Summary | |
---|---|
protected void |
addAttribute(org.apache.xmlgraphics.util.QName name,
java.lang.String value)
Adds a new attribute to the protected member variable "atts". |
protected void |
addAttribute(java.lang.String name,
int value)
Adds a new attribute to the protected member variable "atts". |
protected void |
addAttribute(java.lang.String name,
java.awt.geom.Rectangle2D rect)
Adds a new attribute to the protected member variable "atts". |
protected void |
addAttribute(java.lang.String name,
java.lang.String value)
Adds a new attribute to the protected member variable "atts". |
protected void |
characters(java.lang.String text)
Sends plain text to the XML |
protected void |
comment(java.lang.String comment)
Writes a comment to the generated XML. |
protected void |
endElement(java.lang.String tagName)
Ends an element. |
protected void |
handleDocumentExtensionAttachments()
Handle document extension attachments. |
protected abstract void |
handleExtensionAttachments(java.util.List attachments)
Handles a list of extension attachments |
protected void |
handlePageExtensionAttachments(PageViewport page)
Handles page extension attachments |
protected void |
handleSAXException(org.xml.sax.SAXException saxe)
Handles SAXExceptions. |
void |
processOffDocumentItem(OffDocumentItem oDI)
Tells the renderer to process an item not explicitly placed on the document (e.g., PDF bookmarks). |
protected abstract void |
renderBookmarkTree(BookmarkData odi)
Renders a bookmark tree |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Sets an outside TransformerHandler to use instead of the default one create in this class in startRenderer(). |
protected void |
startElement(java.lang.String tagName)
Starts a new element (without attributes). |
protected void |
startElement(java.lang.String tagName,
org.xml.sax.Attributes atts)
Starts a new element. |
void |
startRenderer(java.io.OutputStream outputStream)
Initiates the rendering phase. |
void |
stopRenderer()
Signals the end of the rendering phase. |
Methods inherited from class org.apache.fop.render.PrintRenderer |
---|
addFontList, createRendererContext, getFontFromArea, getFontInfo, getFontList, getFontResolver, getInternalFontNameForArea, instantiateRendererContext, renderDocument, setFontList, setupFontInfo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.fop.render.Renderer |
---|
getMimeType |
Field Detail |
---|
public static final java.lang.String NS
public static final java.lang.String CDATA
public static final org.xml.sax.Attributes EMPTY_ATTS
protected org.xml.sax.helpers.AttributesImpl atts
protected org.xml.sax.ContentHandler handler
protected java.io.OutputStream out
protected RendererContext context
protected java.util.List extensionAttachments
Constructor Detail |
---|
public AbstractXMLRenderer(FOUserAgent userAgent)
userAgent
- the user agent that contains configuration details. This cannot be null.Method Detail |
---|
protected void handleSAXException(org.xml.sax.SAXException saxe)
saxe
- the SAXException to handleprotected void handlePageExtensionAttachments(PageViewport page)
page
- the page viewportprotected void comment(java.lang.String comment)
comment
- the commentprotected void startElement(java.lang.String tagName)
tagName
- tag name of the elementprotected void startElement(java.lang.String tagName, org.xml.sax.Attributes atts)
tagName
- tag name of the elementatts
- attributes to addprotected void endElement(java.lang.String tagName)
tagName
- tag name of the elementprotected void characters(java.lang.String text)
text
- the textprotected void addAttribute(java.lang.String name, java.lang.String value)
name
- name of the attributevalue
- value of the attributeprotected void addAttribute(org.apache.xmlgraphics.util.QName name, java.lang.String value)
name
- name of the attributevalue
- value of the attributeprotected void addAttribute(java.lang.String name, int value)
name
- name of the attributevalue
- value of the attributeprotected void addAttribute(java.lang.String name, java.awt.geom.Rectangle2D rect)
name
- name of the attributerect
- a Rectangle2D to format and use as attribute valuepublic void startRenderer(java.io.OutputStream outputStream) throws java.io.IOException
startRenderer
in interface Renderer
startRenderer
in class AbstractRenderer
outputStream
- The OutputStream to use for output
java.io.IOException
- If an I/O error occurspublic void stopRenderer() throws java.io.IOException
stopRenderer
in interface Renderer
stopRenderer
in class AbstractRenderer
java.io.IOException
- If an I/O error occurspublic void processOffDocumentItem(OffDocumentItem oDI)
processOffDocumentItem
in interface Renderer
processOffDocumentItem
in class AbstractRenderer
oDI
- The off-document item to be renderedprotected void handleDocumentExtensionAttachments()
public void setContentHandler(org.xml.sax.ContentHandler handler)
handler
- Overriding TransformerHandlerprotected abstract void handleExtensionAttachments(java.util.List attachments)
attachments
- a list of extension attachmentsprotected abstract void renderBookmarkTree(BookmarkData odi)
odi
- the bookmark data
|
fop 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |