Java Doc for Format.java in  » Workflow-Engines » OpenWFE » org » jdom » output » 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 » Workflow Engines » OpenWFE » org.jdom.output 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jdom.output.Format

Format
public class Format implements Cloneable(Code)
Class to encapsulate XMLOutputter format options. Typical users can use the standard format configurations obtained by Format.getRawFormat (no whitespace changes), Format.getPrettyFormat (whitespace beautification), and Format.getCompactFormat (whitespace normalization).

Several modes are available to effect the way textual content is printed. See the documentation for TextMode for details.
version:
   $Revision: 1.1 $, $Date: 2005/04/27 09:32:42 $
author:
   Jason Hunter


Inner Class :class DefaultEscapeStrategy implements EscapeStrategy
Inner Class :public static class TextMode

Field Summary
 Stringencoding
    
 EscapeStrategyescapeStrategy
    
 booleanexpandEmptyElements
    
 booleanignoreTrAXEscapingPIs
    
 Stringindent
    
 StringlineSeparator
    
 TextModemode
    
 booleanomitDeclaration
    
 booleanomitEncoding
    


Method Summary
protected  Objectclone()
    
public static  FormatgetCompactFormat()
     Returns a new Format object that performs whitespace normalization, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy.
public  StringgetEncoding()
     Returns the configured output encoding.
public  EscapeStrategygetEscapeStrategy()
    
public  booleangetExpandEmptyElements()
     Returns whether empty elements are expanded.
public  booleangetIgnoreTrAXEscapingPIs()
     Returns whether JAXP TrAX processing instructions for disabling/enabling output escaping are ignored.
public  StringgetIndent()
     Returns the indent string in use.
public  StringgetLineSeparator()
     Returns the current line separator.
public  booleangetOmitDeclaration()
     Returns whether the XML declaration will be omitted.
public  booleangetOmitEncoding()
     Returns whether the XML declaration encoding will be omitted.
public static  FormatgetPrettyFormat()
     Returns a new Format object that performs whitespace beautification with 2-space indents, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy.
public static  FormatgetRawFormat()
     Returns a new Format object that performs no whitespace changes, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy.
public  Format.TextModegetTextMode()
     Returns the current text output style.
public  FormatsetEncoding(String encoding)
     Sets the output encoding.
public  FormatsetEscapeStrategy(EscapeStrategy strategy)
     Sets the EscapeStrategy to use for character escaping.
public  FormatsetExpandEmptyElements(boolean expandEmptyElements)
     This will set whether empty elements are expanded from <tagName/> to <tagName></tagName>.
Parameters:
  expandEmptyElements - boolean indicating whether or notempty elements should be expanded.
public  voidsetIgnoreTrAXEscapingPIs(boolean ignoreTrAXEscapingPIs)
     This will set whether JAXP TrAX processing instructions for disabling/enabling output escaping are ignored.
public  FormatsetIndent(String indent)
     This will set the indent String to use; this is usually a String of empty spaces.
public  FormatsetLineSeparator(String separator)
     This will set the newline separator (lineSeparator). The default is \r\n.
public  FormatsetOmitDeclaration(boolean omitDeclaration)
     This will set whether the XML declaration (<?xml version="1.0"?gt;) will be omitted or not.
public  FormatsetOmitEncoding(boolean omitEncoding)
     This will set whether the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) includes the encoding of the document.
public  FormatsetTextMode(Format.TextMode mode)
     This sets the text output style.

Field Detail
encoding
String encoding(Code)
The encoding format



escapeStrategy
EscapeStrategy escapeStrategy(Code)
entity escape logic



expandEmptyElements
boolean expandEmptyElements(Code)
Whether or not to expand empty elements to <tagName></tagName> - default is false



ignoreTrAXEscapingPIs
boolean ignoreTrAXEscapingPIs(Code)
Whether TrAX output escaping disabling/enabling PIs are ignored or processed - default is false



indent
String indent(Code)
The default indent is no spaces (as original document)



lineSeparator
String lineSeparator(Code)
New line separator



mode
TextMode mode(Code)
text handling mode



omitDeclaration
boolean omitDeclaration(Code)
Whether or not to output the XML declaration - default is false



omitEncoding
boolean omitEncoding(Code)
Whether or not to output the encoding in the XML declaration - default is false





Method Detail
clone
protected Object clone()(Code)



getCompactFormat
public static Format getCompactFormat()(Code)
Returns a new Format object that performs whitespace normalization, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy. Tweaks can be made to the returned Format instance without affecting other instances. a Format with whitespace normalization



getEncoding
public String getEncoding()(Code)
Returns the configured output encoding. the output encoding



getEscapeStrategy
public EscapeStrategy getEscapeStrategy()(Code)
Returns the current escape strategy the current escape strategy



getExpandEmptyElements
public boolean getExpandEmptyElements()(Code)
Returns whether empty elements are expanded. whether empty elements are expanded



getIgnoreTrAXEscapingPIs
public boolean getIgnoreTrAXEscapingPIs()(Code)
Returns whether JAXP TrAX processing instructions for disabling/enabling output escaping are ignored. whether or not TrAX ouput escaping PIs are ignored.



getIndent
public String getIndent()(Code)
Returns the indent string in use. the indent string in use



getLineSeparator
public String getLineSeparator()(Code)
Returns the current line separator. the current line separator



getOmitDeclaration
public boolean getOmitDeclaration()(Code)
Returns whether the XML declaration will be omitted. whether the XML declaration will be omitted



getOmitEncoding
public boolean getOmitEncoding()(Code)
Returns whether the XML declaration encoding will be omitted. whether the XML declaration encoding will be omitted



getPrettyFormat
public static Format getPrettyFormat()(Code)
Returns a new Format object that performs whitespace beautification with 2-space indents, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy. Tweaks can be made to the returned Format instance without affecting other instances. a Format with whitespace beautification



getRawFormat
public static Format getRawFormat()(Code)
Returns a new Format object that performs no whitespace changes, uses the UTF-8 encoding, doesn't expand empty elements, includes the declaration and encoding, and uses the default entity escape strategy. Tweaks can be made to the returned Format instance without affecting other instances. a Format with no whitespace changes



getTextMode
public Format.TextMode getTextMode()(Code)
Returns the current text output style. the current text output style



setEncoding
public Format setEncoding(String encoding)(Code)
Sets the output encoding. The name should be an accepted XML encoding.
Parameters:
  encoding - the encoding format. Use XML-style names like"UTF-8" or "ISO-8859-1" or "US-ASCII" a pointer to this Format for chaining



setEscapeStrategy
public Format setEscapeStrategy(EscapeStrategy strategy)(Code)
Sets the EscapeStrategy to use for character escaping.
Parameters:
  strategy - the EscapeStrategy to use a pointer to this Format for chaining



setExpandEmptyElements
public Format setExpandEmptyElements(boolean expandEmptyElements)(Code)
This will set whether empty elements are expanded from <tagName/> to <tagName></tagName>.
Parameters:
  expandEmptyElements - boolean indicating whether or notempty elements should be expanded. a pointer to this Format for chaining



setIgnoreTrAXEscapingPIs
public void setIgnoreTrAXEscapingPIs(boolean ignoreTrAXEscapingPIs)(Code)
This will set whether JAXP TrAX processing instructions for disabling/enabling output escaping are ignored. Disabling output escaping allows using XML text as element content and outputing it verbatim, i.e. as element children would be.

When processed, these processing instructions are removed from the generated XML text and control whether the element text content is output verbatim or with escaping of the pre-defined entities in XML 1.0. The text to be output verbatim shall be surrounded by the <?javax.xml.transform.disable-output-escaping ?> and <?javax.xml.transform.enable-output-escaping ?> PIs.

When ignored, the processing instructions are present in the generated XML text and the pre-defined entities in XML 1.0 are escaped.

Default: false.


Parameters:
  ignoreTrAXEscapingPIs - boolean indicatingwhether or not TrAX ouput escaping PIs are ignored.
See Also:   javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING
See Also:   javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING



setIndent
public Format setIndent(String indent)(Code)
This will set the indent String to use; this is usually a String of empty spaces. If you pass null, or the empty string (""), then no indentation will happen. Default: none (null)
Parameters:
  indent - String to use for indentation. a pointer to this Format for chaining



setLineSeparator
public Format setLineSeparator(String separator)(Code)
This will set the newline separator (lineSeparator). The default is \r\n. Note that if the "newlines" property is false, this value is irrelevant. To make it output the system default line ending string, call setLineSeparator(System.getProperty("line.separator"))

To output "UNIX-style" documents, call setLineSeparator("\n"). To output "Mac-style" documents, call setLineSeparator("\r"). DOS-style documents use CR-LF ("\r\n"), which is the default.

Note that this only applies to newlines generated by the outputter. If you parse an XML document that contains newlines embedded inside a text node, and you do not set TextMode.NORMALIZE, then the newlines will be output verbatim, as "\n" which is how parsers normalize them.


See Also:   Format.setTextMode
Parameters:
  separator - String line separator to use. a pointer to this Format for chaining



setOmitDeclaration
public Format setOmitDeclaration(boolean omitDeclaration)(Code)
This will set whether the XML declaration (<?xml version="1.0"?gt;) will be omitted or not. It is common to omit this in uses such as SOAP and XML-RPC calls.
Parameters:
  omitDeclaration - boolean indicating whether or notthe XML declaration should be omitted. a pointer to this Format for chaining



setOmitEncoding
public Format setOmitEncoding(boolean omitEncoding)(Code)
This will set whether the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) includes the encoding of the document. It is common to omit this in uses such as WML and other wireless device protocols.
Parameters:
  omitEncoding - boolean indicating whether or notthe XML declaration should indicate the document encoding. a pointer to this Format for chaining



setTextMode
public Format setTextMode(Format.TextMode mode)(Code)
This sets the text output style. Options are available as static TextMode instances. The default is TextMode.PRESERVE . a pointer to this Format for chaining



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.