Java Doc for FONode.java in  » Graphic-Library » fop » org » apache » fop » fo » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » fop » org.apache.fop.fo 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.fop.fo.FONode

All known Subclasses:   org.apache.fop.fo.FOText,  org.apache.fop.fo.extensions.xmp.AbstractMetadataElement,  org.apache.fop.render.afp.extensions.AbstractAFPExtensionObject,  org.apache.fop.fo.extensions.destination.Destination,  org.apache.fop.fo.XMLObj,  org.apache.fop.render.ps.extensions.AbstractPSExtensionObject,  org.apache.fop.fo.FObj,
FONode
abstract public class FONode implements Cloneable(Code)
Base class for nodes in the XML tree

Inner Class :public interface FONodeIterator extends ListIterator

Field Summary
final protected static  StringFOX_URI
    
final protected static  StringFO_URI
    
protected  Locatorlocator
    
protected static  Loglog
    
protected  FONodeparent
    
protected  FONode[]siblings
    

Constructor Summary
protected  FONode(FONode parent)
     Main constructor.

Method Summary
protected  voidaddCharacters(char[] data, int start, int end, PropertyList pList, Locator locator)
    
protected  voidaddChildNode(FONode child)
     Adds a node as a child of this node.
protected static  voidattachSiblings(FONode precedingSibling, FONode followingSibling)
    
protected  voidattributeError(String problem)
    
protected  voidattributeWarning(String problem)
    
public  voidbind(PropertyList propertyList)
     Bind the given PropertyList to this node Does nothing by default.
protected  booleancanHaveMarkers()
    
public  CharIteratorcharIterator()
    
public  FONodeclone(FONode cloneparent, boolean removeChildren)
    
protected  Objectclone()
    
protected  PropertyListcreatePropertyList(PropertyList pList, FOEventHandler foEventHandler)
     Create a property list for this node.
public static  StringdecorateWithContextInfo(String text, FONode node)
     Decorates a log or warning message with context information on the given node.
protected  voidendOfNode()
     Primarily used for making final content model validation checks and/or informing the FOEventHandler that the end of this FO has been reached.
protected static  StringerrorText(Locator loc)
    
protected  StringgatherContextInfo()
     Gathers context information for the getContextInfo() method.
public  FONodeIteratorgetChildNodes()
     Return an iterator over all the child nodes of this FObj.
public  FONodeIteratorgetChildNodes(FONode childNode)
     Return an iterator over the object's child nodes starting at the passed node.
public  ContentHandlerFactorygetContentHandlerFactory()
     This method is overridden by extension elements and allows the extension element to return a ContentHandlerFactory.
public  StringgetContextInfo()
     Returns a String containing as much context information as possible about a node.
public  ExtensionAttachmentgetExtensionAttachment()
     This method is overridden by extension elements and allows the extension element to return a pass-through attachment which the parent formatting objects should simply carry with them but otherwise ignore.
public  FOEventHandlergetFOEventHandler()
     Recursively goes up the FOTree hierarchy until the fo:root is found, which returns the parent FOEventHandler.
abstract public  StringgetLocalName()
     Returns the local name (i.e.
public  LocatorgetLocator()
    
public static  StringgetLocatorString(Locator loc)
     Helper function to format a Locator instance.
public  LoggetLogger()
     Returns the logger for the node.
public  StringgetName()
    
public  StringgetName(String prefix)
    
public  intgetNameId()
    
public  StringgetNamespaceURI()
    
public static  StringgetNodeString(String namespaceURI, String localName)
     Helper function to standardize the names of all namespace URI - local name pairs in text messages.
abstract public  StringgetNormalNamespacePrefix()
     the normally ussed namespace prefix for this kind of node (ex.
public  FONodegetParent()
    
public  RootgetRoot()
    
public  FOUserAgentgetUserAgent()
     Returns the user agent for the node.
protected  booleaninMarker()
    
protected  voidinvalidChildError(Locator loc, String nsURI, String lName)
    
protected  voidinvalidChildError(Locator loc, String nsURI, String lName, String ruleViolated)
    
protected  voidmissingChildElementError(String contentModel)
     Helper function to throw an error caused by missing mandatory child elements.
protected  voidmissingPropertyError(String propertyName)
    
protected  voidnodesOutOfOrderError(Locator loc, String tooLateNode, String tooEarlyNode)
    
public  voidprocessNode(String elementName, Locator locator, Attributes attlist, PropertyList pList)
     Initialize the node with its name, location information, and attributes The attributes must be used immediately as the sax attributes will be altered for the next element.
public  voidremoveChild(FONode child)
     Removes a child node.
public  voidsetLocator(Locator locator)
    
protected  voidstartOfNode()
     Called after processNode() is called.
protected  voidtooManyNodesError(Locator loc, String nsURI, String lName)
    
protected  voidtooManyNodesError(Locator loc, String offendingNode)
    
protected  voidvalidateChildNode(Locator loc, String namespaceURI, String localName)
     Checks to make sure, during SAX processing of input document, that the incoming node is valid for the this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called within FObj constructor
Parameters:
  loc - location in the FO source file
Parameters:
  namespaceURI - namespace of incoming node
Parameters:
  localName - (e.g.
protected static  StringwarningText(Locator loc)
    

Field Detail
FOX_URI
final protected static String FOX_URI(Code)



FO_URI
final protected static String FO_URI(Code)
the XSL-FO namespace URI



locator
protected Locator locator(Code)
Marks location of this object from the input FO Call locator.getSystemId(), getLineNumber(), getColumnNumber() for file, line, column information



log
protected static Log log(Code)
Logger for fo-tree related messages *



parent
protected FONode parent(Code)
Parent FO node



siblings
protected FONode[] siblings(Code)
pointer to the sibling nodes




Constructor Detail
FONode
protected FONode(FONode parent)(Code)
Main constructor.
Parameters:
  parent - parent of this node




Method Detail
addCharacters
protected void addCharacters(char[] data, int start, int end, PropertyList pList, Locator locator) throws FOPException(Code)
Adds characters (does nothing here)
Parameters:
  data - array of characters containing text to be added
Parameters:
  start - starting array element to add
Parameters:
  end - ending array element to add
Parameters:
  pList - currently applicable PropertyList
Parameters:
  locator - location in fo source file.
throws:
  FOPException - if there's a problem during processing



addChildNode
protected void addChildNode(FONode child) throws FOPException(Code)
Adds a node as a child of this node. The default implementation of this method just ignores any child node being added.
Parameters:
  child - child node to be added to the childNodes of this node
throws:
  FOPException - if there's a problem during processing



attachSiblings
protected static void attachSiblings(FONode precedingSibling, FONode followingSibling)(Code)



attributeError
protected void attributeError(String problem) throws ValidationException(Code)
Helper function to standardize property error exceptions (e.g., not specifying either an internal- or an external-destination property for an FO:link)
Parameters:
  problem - text to display that indicates the problem
throws:
  ValidationException - the validation error provoked by the method call



attributeWarning
protected void attributeWarning(String problem)(Code)
Helper function to standardize attribute warnings (e.g., currently unsupported properties)
Parameters:
  problem - text to display that indicates the problem



bind
public void bind(PropertyList propertyList) throws FOPException(Code)
Bind the given PropertyList to this node Does nothing by default. Subclasses should override this method in case they want to use the properties available on the PropertyList.
Parameters:
  propertyList - the PropertyList
throws:
  FOPException - if there was an error whenprocessing the PropertyList



canHaveMarkers
protected boolean canHaveMarkers()(Code)
true if markers are valid children



charIterator
public CharIterator charIterator()(Code)
an iterator for the characters in this node



clone
public FONode clone(FONode cloneparent, boolean removeChildren) throws FOPException(Code)
Perform a shallow cloning operation, set its parent, and optionally clean the list of child nodes
Parameters:
  cloneparent - the intended parent of the clone
Parameters:
  removeChildren - if true, clean the list of child nodes the cloned FO node
throws:
  FOPException - if there's a problem while cloning the node



clone
protected Object clone()(Code)
Perform a shallow cloning operation
See Also:   java.lang.Object.clone the cloned object



createPropertyList
protected PropertyList createPropertyList(PropertyList pList, FOEventHandler foEventHandler) throws FOPException(Code)
Create a property list for this node. Return null if the node does not need a property list.
Parameters:
  pList - the closest parent propertylist.
Parameters:
  foEventHandler - The FOEventHandler where the PropertyListMaker instance can be found. A new property list.
throws:
  FOPException - if there's a problem during processing



decorateWithContextInfo
public static String decorateWithContextInfo(String text, FONode node)(Code)
Decorates a log or warning message with context information on the given node.
Parameters:
  text - the original message
Parameters:
  node - the context node the decorated text



endOfNode
protected void endOfNode() throws FOPException(Code)
Primarily used for making final content model validation checks and/or informing the FOEventHandler that the end of this FO has been reached.
throws:
  FOPException - if there's a problem during processing



errorText
protected static String errorText(Locator loc)(Code)
Helper function to return "Error(line#/column#)" string for above exception messages
Parameters:
  loc - org.xml.sax.Locator object String opening error text



gatherContextInfo
protected String gatherContextInfo()(Code)
Gathers context information for the getContextInfo() method. the collected context information or null, if none is available



getChildNodes
public FONodeIterator getChildNodes()(Code)
Return an iterator over all the child nodes of this FObj. A ListIterator.



getChildNodes
public FONodeIterator getChildNodes(FONode childNode)(Code)
Return an iterator over the object's child nodes starting at the passed node.
Parameters:
  childNode - First node in the iterator A ListIterator or null if child node isn't a child ofthis FObj.



getContentHandlerFactory
public ContentHandlerFactory getContentHandlerFactory()(Code)
This method is overridden by extension elements and allows the extension element to return a ContentHandlerFactory. This factory can create ContentHandler implementations that handle foreign XML content by either building up a specific DOM, a Java object or something else. the ContentHandlerFactory or null if not applicable



getContextInfo
public String getContextInfo()(Code)
Returns a String containing as much context information as possible about a node. Call this methods only in exceptional conditions because this method may perform quite extensive information gathering inside the FO tree. a String containing



getExtensionAttachment
public ExtensionAttachment getExtensionAttachment()(Code)
This method is overridden by extension elements and allows the extension element to return a pass-through attachment which the parent formatting objects should simply carry with them but otherwise ignore. This mechanism is used to pass non-standard information from the FO tree through to the layout engine and the renderers. the extension attachment if one is created by the extension element, null otherwise.



getFOEventHandler
public FOEventHandler getFOEventHandler()(Code)
Recursively goes up the FOTree hierarchy until the fo:root is found, which returns the parent FOEventHandler. the FOEventHandler object that is the parent of the FO Tree



getLocalName
abstract public String getLocalName()(Code)
Returns the local name (i.e. without namespace prefix) of the node the local name of this node



getLocator
public Locator getLocator()(Code)
the location information for this element or null, if not available



getLocatorString
public static String getLocatorString(Locator loc)(Code)
Helper function to format a Locator instance.
Parameters:
  loc - org.xml.sax.Locator object String the formatted text



getLogger
public Log getLogger()(Code)
Returns the logger for the node. the logger



getName
public String getName()(Code)
Returns the fully qualified name of the node the fully qualified name of this node



getName
public String getName(String prefix)(Code)
Returns the fully qualified name of the node
Parameters:
  prefix - the namespace prefix to build the name with (may be null) the fully qualified name of this node



getNameId
public int getNameId()(Code)
Returns the Constants class integer value of this node the integer enumeration of this FO (e.g., FO_ROOT)if a formatting object, FO_UNKNOWN_NODE otherwise



getNamespaceURI
public String getNamespaceURI()(Code)
the namespace URI for this node



getNodeString
public static String getNodeString(String namespaceURI, String localName)(Code)
Helper function to standardize the names of all namespace URI - local name pairs in text messages. For readability, using fo:, fox:, svg:, for those namespaces even though that prefix may not have been chosen in the document.
Parameters:
  namespaceURI - URI of node found (e.g., "http://www.w3.org/1999/XSL/Format")
Parameters:
  localName - local name of node, (e.g., "root" for "fo:root") the prefix:localname, if fo/fox/svg, or a longer representationwith the unabbreviated URI otherwise.



getNormalNamespacePrefix
abstract public String getNormalNamespacePrefix()(Code)
the normally ussed namespace prefix for this kind of node (ex. "fo" for XSL-FO)



getParent
public FONode getParent()(Code)
the parent node of this node



getRoot
public Root getRoot()(Code)
Returns the root node of this tree the root node



getUserAgent
public FOUserAgent getUserAgent()(Code)
Returns the user agent for the node. FOUserAgent



inMarker
protected boolean inMarker()(Code)



invalidChildError
protected void invalidChildError(Locator loc, String nsURI, String lName) throws ValidationException(Code)
Helper function to return "invalid child" exceptions (e.g., fo:block appearing immediately under fo:root)
Parameters:
  loc - org.xml.sax.Locator object of the error (*not* parent node)
Parameters:
  nsURI - namespace URI of incoming invalid node
Parameters:
  lName - local name (i.e., no prefix) of incoming node
throws:
  ValidationException - the validation error provoked by the method call



invalidChildError
protected void invalidChildError(Locator loc, String nsURI, String lName, String ruleViolated) throws ValidationException(Code)
Helper function to return "invalid child" exceptions with more complex validation rules (i.e., needing more explanation of the problem)
Parameters:
  loc - org.xml.sax.Locator object of the error (*not* parent node)
Parameters:
  nsURI - namespace URI of incoming invalid node
Parameters:
  lName - local name (i.e., no prefix) of incoming node
Parameters:
  ruleViolated - text explanation of problem
throws:
  ValidationException - the validation error provoked by the method call



missingChildElementError
protected void missingChildElementError(String contentModel) throws ValidationException(Code)
Helper function to throw an error caused by missing mandatory child elements. E.g., fo:layout-master-set not having any page-master child element.
Parameters:
  contentModel - The XSL Content Model for the fo: object or a similar description indicating the necessary child elements.
throws:
  ValidationException - the validation error provoked by the method call



missingPropertyError
protected void missingPropertyError(String propertyName) throws ValidationException(Code)
Helper function to throw an error caused by missing mandatory properties
Parameters:
  propertyName - the name of the missing property.
throws:
  ValidationException - the validation error provoked by the method call



nodesOutOfOrderError
protected void nodesOutOfOrderError(Locator loc, String tooLateNode, String tooEarlyNode) throws ValidationException(Code)
Helper function to standardize "out of order" exceptions (e.g., fo:layout-master-set appearing after fo:page-sequence)
Parameters:
  loc - org.xml.sax.Locator object of the error (*not* parent node)
Parameters:
  tooLateNode - string name of node that should be earlier in document
Parameters:
  tooEarlyNode - string name of node that should be later in document
throws:
  ValidationException - the validation error provoked by the method call



processNode
public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException(Code)
Initialize the node with its name, location information, and attributes The attributes must be used immediately as the sax attributes will be altered for the next element.
Parameters:
  elementName - element name (e.g., "fo:block")
Parameters:
  locator - Locator object (ignored by default)
Parameters:
  attlist - Collection of attributes passed to us from the parser.
Parameters:
  pList - the property list of the parent node
throws:
  FOPException - for errors or inconsistencies in the attributes



removeChild
public void removeChild(FONode child)(Code)
Removes a child node. Used by the child nodes to remove themselves, for example table-body if it has no children.
Parameters:
  child - child node to be removed



setLocator
public void setLocator(Locator locator)(Code)
Set the location information for this element
Parameters:
  locator - the org.xml.sax.Locator object



startOfNode
protected void startOfNode() throws FOPException(Code)
Called after processNode() is called. Subclasses can do additional processing.
throws:
  FOPException - if there's a problem during processing



tooManyNodesError
protected void tooManyNodesError(Locator loc, String nsURI, String lName) throws ValidationException(Code)
Helper function to standardize "too many" error exceptions (e.g., two fo:declarations within fo:root)
Parameters:
  loc - org.xml.sax.Locator object of the error (*not* parent node)
Parameters:
  nsURI - namespace URI of incoming invalid node
Parameters:
  lName - local name (i.e., no prefix) of incoming node
throws:
  ValidationException - the validation error provoked by the method call



tooManyNodesError
protected void tooManyNodesError(Locator loc, String offendingNode) throws ValidationException(Code)
Helper function to standardize "too many" error exceptions (e.g., two fo:declarations within fo:root) This overrloaded method helps make the caller code better self-documenting
Parameters:
  loc - org.xml.sax.Locator object of the error (*not* parent node)
Parameters:
  offendingNode - incoming node that would cause a duplication.
throws:
  ValidationException - the validation error provoked by the method call



validateChildNode
protected void validateChildNode(Locator loc, String namespaceURI, String localName) throws ValidationException(Code)
Checks to make sure, during SAX processing of input document, that the incoming node is valid for the this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called within FObj constructor
Parameters:
  loc - location in the FO source file
Parameters:
  namespaceURI - namespace of incoming node
Parameters:
  localName - (e.g. "table" for "fo:table")
throws:
  ValidationException - if incoming node not valid for parent



warningText
protected static String warningText(Locator loc)(Code)
Helper function to return "Warning(line#/column#)" string for warning messages
Parameters:
  loc - org.xml.sax.Locator object String opening warning text



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.