org.apache.fop.render.ps.extensions

Class AbstractPSExtensionElement

Implemented Interfaces:
Cloneable
Known Direct Subclasses:
AbstractPSCommentElement, PSSetPageDeviceElement

public abstract class AbstractPSExtensionElement
extends FONode

Base class for the PostScript-specific extension elements.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.fop.fo.FONode

FONode.FONodeIterator

Field Summary

protected PSExtensionAttachment
attachment
extension attachment

Fields inherited from class org.apache.fop.fo.FONode

FOX_URI, FO_URI, locator, log, parent, siblings

Constructor Summary

AbstractPSExtensionElement(FONode parent)
Default constructor

Method Summary

protected void
addCharacters(char[] data, int start, int length, PropertyList pList, Locator locator)
Adds characters (does nothing here)
protected void
endOfNode()
ExtensionAttachment
getExtensionAttachment()
String
getNamespaceURI()
String
getNormalNamespacePrefix()
protected abstract ExtensionAttachment
instantiateExtensionAttachment()
Instantiates extension attachment object
protected void
validateChildNode(Locator loc, String nsURI, String localName)
Blocks XSL FO's from having non-FO parents.

Methods inherited from class org.apache.fop.fo.FONode

addCharacters, addChildNode, attachSiblings, attributeError, attributeWarning, bind, canHaveMarkers, charIterator, clone, clone, createPropertyList, decorateWithContextInfo, endOfNode, errorText, gatherContextInfo, getChildNodes, getChildNodes, getContentHandlerFactory, getContextInfo, getExtensionAttachment, getFOEventHandler, getLocalName, getLocator, getLocatorString, getLogger, getName, getName, getNameId, getNamespaceURI, getNodeString, getNormalNamespacePrefix, getParent, getRoot, getUserAgent, inMarker, invalidChildError, invalidChildError, missingChildElementError, missingPropertyError, nodesOutOfOrderError, processNode, removeChild, setLocator, startOfNode, tooManyNodesError, tooManyNodesError, validateChildNode, validateChildNode, warningText

Field Details

attachment

protected PSExtensionAttachment attachment
extension attachment

Constructor Details

AbstractPSExtensionElement

public AbstractPSExtensionElement(FONode parent)
Default constructor
Parameters:
parent - parent of this node

Method Details

addCharacters

protected void addCharacters(char[] data,
                             int start,
                             int length,
                             PropertyList pList,
                             Locator locator)
Adds characters (does nothing here)
Overrides:
addCharacters in interface FONode
Parameters:
data - array of characters containing text to be added
start - starting array element to add
length - of data array to add
pList - currently applicable PropertyList
locator - location in fo source file.

endOfNode

protected void endOfNode()
            throws FOPException
Overrides:
endOfNode in interface FONode
Throws:
FOPException - if there's a problem during processing

getExtensionAttachment

public ExtensionAttachment getExtensionAttachment()
Overrides:
getExtensionAttachment in interface FONode
Returns:
the extension attachment if one is created by the extension element, null otherwise.

getNamespaceURI

public String getNamespaceURI()
Overrides:
getNamespaceURI in interface FONode
Returns:
a String representation of this object

getNormalNamespacePrefix

public String getNormalNamespacePrefix()
Overrides:
getNormalNamespacePrefix in interface FONode
Returns:
a String representation of this object

instantiateExtensionAttachment

protected abstract ExtensionAttachment instantiateExtensionAttachment()
Instantiates extension attachment object
Returns:
extension attachment

validateChildNode

protected void validateChildNode(Locator loc,
                                 String nsURI,
                                 String localName)
            throws ValidationException
Blocks XSL FO's from having non-FO parents.
Overrides:
validateChildNode in interface FONode
Parameters:
loc - location in the FO source file
nsURI - namespace of incoming node
localName - (e.g. "table" for "fo:table")
Throws:
ValidationException - if incoming node not valid for parent

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