Java Doc for ExtBaseDOMFormatter.java in  » J2EE » Enhydra-Application-Framework » org » enhydra » xml » io » 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 » J2EE » Enhydra Application Framework » org.enhydra.xml.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.enhydra.xml.io.ExtBaseDOMFormatter

All known Subclasses:   org.enhydra.xml.io.ExtXMLFormatter,  org.enhydra.xml.io.ExtHTMLFormatter,
ExtBaseDOMFormatter
abstract class ExtBaseDOMFormatter implements Formatter,DOMTraversal.Handler(Code)
Base class with common functionally XML and HTML DOM formatting functionality.


Field Summary
final protected static  charATTR_QUOTE_CHAR
     Quote character to use for attribute values.
final protected static  StringATTR_QUOTE_CHAR_ENTITY_REF
     Entity reference for attribute value quote character.
final protected static  intMAX_ENTITY_QUICK_CHECK_CHAR
     Maximum character value in an entity quick-check table.
final protected  DocumentTypefDocType
     DocumentType from document.
final protected  DocumentfDocument
     Document being formatted.
protected  intfDynamicFormattedElementCount
     Count of element open tags that were written not using preformatted text.
final protected  OutputOptionsfOptions
     The output options.
protected  WriterfOut
     Output writer.
final protected  booleanfPreFormatMode
    
protected  intfPreFormattedElementCount
     Count of preformatted element open tags that were written.
final protected  booleanfPrettyPrinting
    
final protected  StringfPublicId
     Public id to use for DOCTYPE, or null if none.
final protected  StringfSystemId
     System id to use for DOCTYPE, or null if none.
final protected  DOMTraversalfTraverser
     DOM traverser.
final protected  booleanfUsePreFormattedAttrText
     Should pre-formatted text be use for descendents of attribute nodes.
final protected  booleanfUsePreFormattedElements
     Should pre-formatted Elements be written.
final protected  booleanfUsePreFormattedText
     Should pre-formatted text be written.

Constructor Summary
protected  ExtBaseDOMFormatter(Node node, OutputOptions outputOptions, boolean forPreFormatting, String defaultEncoding, boolean[] entityQuickCheck)
     Constructor.
Parameters:
  node - Any node of the document that this formatter will beassociated with.

Method Summary
public static  DocumentInfofindDocumentInfo(Document document)
     Get the DocumentInfo object, if available.
abstract protected  StringgetCharacterEntity(char textChar)
     Get a character entity name for a character.
final public  intgetDynamicFormattedElementCount()
     Get the count of element open tags that were written not using preformatted text.
final public  intgetDynamicFormattedTextCount()
     Get the count of text nodes that were written not using preformatted text.
final public  StringgetMIMEEncoding()
    
final public  intgetPreFormattedElementCount()
     Get the count of preformatted element open tags that were written.
final public  intgetPreFormattedTextCount()
     Get the count of preformatted text nodes that were written.
final public  voidhandleComment(Comment comment)
     Handler called for Comment nodes.
final public  voidhandleEntity(Entity entity)
     Handler called for Entity nodes; should never be called.
final public  voidhandleEntityReference(EntityReference entityRef)
     Handler called for EntityReference nodes.
final public  voidhandleNotation(Notation notation)
     Handler called for Notation nodes; should never be called.
public  voidhandleText(Text text)
     Handler called for Text nodes.
final public  StringpreFormatNode(Node node)
    
final protected  voidprintIndent()
     Print indentation to the current level.
final public  booleanusedPreFormattedElements()
    
public  booleanusedPreFormattedText()
    
final public  voidwrite(Node node, Writer writer)
     Format a Node and children to the specified writer.
final protected  voidwriteAttributeValue(Attr attr)
     Write an attribute value.
abstract protected  voidwriteOpenTag(Element element, String tagName, boolean hasChildren)
     Method to write an open tag, including attributes.
final protected  voidwriteText(String text)
     Write a text string, encoding document type-specific character entities.
final protected  voidwriteln()
    

Field Detail
ATTR_QUOTE_CHAR
final protected static char ATTR_QUOTE_CHAR(Code)
Quote character to use for attribute values.



ATTR_QUOTE_CHAR_ENTITY_REF
final protected static String ATTR_QUOTE_CHAR_ENTITY_REF(Code)
Entity reference for attribute value quote character.



MAX_ENTITY_QUICK_CHECK_CHAR
final protected static int MAX_ENTITY_QUICK_CHECK_CHAR(Code)
Maximum character value in an entity quick-check table.



fDocType
final protected DocumentType fDocType(Code)
DocumentType from document.



fDocument
final protected Document fDocument(Code)
Document being formatted.



fDynamicFormattedElementCount
protected int fDynamicFormattedElementCount(Code)
Count of element open tags that were written not using preformatted text.



fOptions
final protected OutputOptions fOptions(Code)
The output options.



fOut
protected Writer fOut(Code)
Output writer.



fPreFormatMode
final protected boolean fPreFormatMode(Code)
Are we doing pre-formatting?



fPreFormattedElementCount
protected int fPreFormattedElementCount(Code)
Count of preformatted element open tags that were written.



fPrettyPrinting
final protected boolean fPrettyPrinting(Code)
Are we pretty-printing?



fPublicId
final protected String fPublicId(Code)
Public id to use for DOCTYPE, or null if none.



fSystemId
final protected String fSystemId(Code)
System id to use for DOCTYPE, or null if none.



fTraverser
final protected DOMTraversal fTraverser(Code)
DOM traverser.



fUsePreFormattedAttrText
final protected boolean fUsePreFormattedAttrText(Code)
Should pre-formatted text be use for descendents of attribute nodes. A seperate flag is required to support the omitAttributeCharEntityRefs option.



fUsePreFormattedElements
final protected boolean fUsePreFormattedElements(Code)
Should pre-formatted Elements be written. This is the same as fUsePreFormattedText, unless a URLRewriter is present, in which case it's false since we need to check the attributes for URLs.



fUsePreFormattedText
final protected boolean fUsePreFormattedText(Code)
Should pre-formatted text be written. This is only enabled if the document implements PreFormattedTextDocument and the preformatted encoding matches the output encoding. This option only controls text nodes that are not children of attributes.




Constructor Detail
ExtBaseDOMFormatter
protected ExtBaseDOMFormatter(Node node, OutputOptions outputOptions, boolean forPreFormatting, String defaultEncoding, boolean[] entityQuickCheck)(Code)
Constructor.
Parameters:
  node - Any node of the document that this formatter will beassociated with. This can also be an XMLC Document object (XMLObject).
Parameters:
  options - The output options.
Parameters:
  defaultEncoding - The default encoding for this format.
Parameters:
  forPreFormatting - Is this going to be used for preformatting?
Parameters:
  entityQuickCheck - Document-type specific table that providesa quick check of the need to encode that character as a characterentity reference. This table MUST include the double-quote character,as it it used to quote attribute values.




Method Detail
findDocumentInfo
public static DocumentInfo findDocumentInfo(Document document)(Code)
Get the DocumentInfo object, if available. This is our extension



getCharacterEntity
abstract protected String getCharacterEntity(char textChar)(Code)
Get a character entity name for a character. This is the slow-path, so its ok this is an abstract method call. The character entity name, or null if this character doesn'thave one.



getDynamicFormattedElementCount
final public int getDynamicFormattedElementCount()(Code)
Get the count of element open tags that were written not using preformatted text.



getDynamicFormattedTextCount
final public int getDynamicFormattedTextCount()(Code)
Get the count of text nodes that were written not using preformatted text.



getMIMEEncoding
final public String getMIMEEncoding()(Code)

See Also:   Formatter.getMIMEEncoding



getPreFormattedElementCount
final public int getPreFormattedElementCount()(Code)
Get the count of preformatted element open tags that were written.



getPreFormattedTextCount
final public int getPreFormattedTextCount()(Code)
Get the count of preformatted text nodes that were written.



handleComment
final public void handleComment(Comment comment) throws IOException(Code)
Handler called for Comment nodes.
See Also:   org.enhydra.xml.dom.DOMTraversal.Handler.handleComment



handleEntity
final public void handleEntity(Entity entity)(Code)
Handler called for Entity nodes; should never be called.
See Also:   org.enhydra.xml.dom.DOMTraversal.Handler.handleEntity



handleEntityReference
final public void handleEntityReference(EntityReference entityRef) throws IOException(Code)
Handler called for EntityReference nodes.
See Also:   org.enhydra.xml.dom.DOMTraversal.Handler.handleEntityReference



handleNotation
final public void handleNotation(Notation notation)(Code)
Handler called for Notation nodes; should never be called.
See Also:   org.enhydra.xml.dom.DOMTraversal.Handler.handleNotation



handleText
public void handleText(Text text) throws IOException(Code)
Handler called for Text nodes.
See Also:   org.enhydra.xml.dom.DOMTraversal.Handler.handleText



preFormatNode
final public String preFormatNode(Node node)(Code)

See Also:   Formatter.preFormatNode



printIndent
final protected void printIndent() throws IOException(Code)
Print indentation to the current level.



usedPreFormattedElements
final public boolean usedPreFormattedElements()(Code)

See Also:   Formatter.usedPreFormattedElements



usedPreFormattedText
public boolean usedPreFormattedText()(Code)

See Also:   Formatter.usedPreFormattedText



write
final public void write(Node node, Writer writer) throws IOException(Code)
Format a Node and children to the specified writer.
See Also:   Formatter.write



writeAttributeValue
final protected void writeAttributeValue(Attr attr) throws IOException(Code)
Write an attribute value. Convert characters to character entity references as needed.



writeOpenTag
abstract protected void writeOpenTag(Element element, String tagName, boolean hasChildren) throws IOException(Code)
Method to write an open tag, including attributes. Children are not processed. This is normally called by the derived class handleElement method, but its hear to allow for use by preformatter.



writeText
final protected void writeText(String text) throws IOException(Code)
Write a text string, encoding document type-specific character entities. This is an expensive procedure and has been carefully hand optimized.



writeln
final protected void writeln() throws IOException(Code)
Write a newline



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.