Java Doc for DOMSerializerImpl.java in  » XML » xerces-2_9_1 » org » apache » xml » serialize » 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 » XML » xerces 2_9_1 » org.apache.xml.serialize 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xml.serialize.DOMSerializerImpl

DOMSerializerImpl
public class DOMSerializerImpl implements LSSerializer,DOMConfiguration(Code)
EXPERIMENTAL: Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer by delegating serialization calls to XMLSerializer. LSSerializer provides an API for serializing (writing) a DOM document out in an XML document. The XML data is written to an output stream. During serialization of XML data, namespace fixup is done when possible as defined in DOM Level 3 Core, Appendix B.
author:
   Elena Litani, IBM
author:
   Gopal Sharma, Sun Microsystems
author:
   Arun Yadav, Sun Microsystems
version:
   $Id: DOMSerializerImpl.java 476047 2006-11-17 04:27:45Z mrglavas $

Inner Class :static class DocumentMethods

Field Summary
final protected static  shortCDATA
    
final protected static  shortCOMMENTS
    
final protected static  shortDISCARDDEFAULT
    
final protected static  shortDOM_ELEMENT_CONTENT_WHITESPACE
    
final protected static  shortENTITIES
    
final protected static  shortINFOSET
    
final protected static  shortNAMESPACES
    
final protected static  shortNSDECL
    
final protected static  shortPRETTY_PRINT
    
final protected static  shortSPLITCDATA
    
final protected static  shortWELLFORMED
    
final protected static  shortXMLDECL
    
protected  shortfeatures
     REVISIT: Currently we handle 3 different configurations, would be nice just have one configuration that has different recognized parameters depending if it is used in Core/LS.

Constructor Summary
public  DOMSerializerImpl()
     Constructs a new LSSerializer.

Method Summary
public  booleancanSetParameter(String name, Object state)
    
public  DOMConfigurationgetDomConfig()
    
public  LSSerializerFiltergetFilter()
     When the application provides a filter, the serializer will call out to the filter before serializing each Node.
public  StringgetNewLine()
     DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out.
public  ObjectgetParameter(String name)
    
public  DOMStringListgetParameterNames()
     DOM Level 3 Core CR - Experimental. The list of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application.
public  voidsetFilter(LSSerializerFilter filter)
     When the application provides a filter, the serializer will call out to the filter before serializing each Node.
public  voidsetNewLine(String newLine)
     DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out.
public  voidsetParameter(String name, Object value)
    
public  booleanwrite(Node node, LSOutput destination)
     Serialize the specified node as described above in the general description of the LSSerializer interface.
public  StringwriteToString(Node wnode)
     DOM L3 EXPERIMENTAL: Serialize the specified node as described above in the description of LSSerializer.
public  booleanwriteToURI(Node node, String URI)
     Serialize the specified node as described above in the general description of the LSSerializer interface.

Field Detail
CDATA
final protected static short CDATA(Code)



COMMENTS
final protected static short COMMENTS(Code)



DISCARDDEFAULT
final protected static short DISCARDDEFAULT(Code)



DOM_ELEMENT_CONTENT_WHITESPACE
final protected static short DOM_ELEMENT_CONTENT_WHITESPACE(Code)



ENTITIES
final protected static short ENTITIES(Code)



INFOSET
final protected static short INFOSET(Code)



NAMESPACES
final protected static short NAMESPACES(Code)



NSDECL
final protected static short NSDECL(Code)



PRETTY_PRINT
final protected static short PRETTY_PRINT(Code)



SPLITCDATA
final protected static short SPLITCDATA(Code)



WELLFORMED
final protected static short WELLFORMED(Code)



XMLDECL
final protected static short XMLDECL(Code)



features
protected short features(Code)
REVISIT: Currently we handle 3 different configurations, would be nice just have one configuration that has different recognized parameters depending if it is used in Core/LS.




Constructor Detail
DOMSerializerImpl
public DOMSerializerImpl()(Code)
Constructs a new LSSerializer. The constructor turns on the namespace support in XMLSerializer and initializes the following fields: fNSBinder, fLocalNSBinder, fSymbolTable, fEmptySymbol, fXmlSymbol, fXmlnsSymbol, fNamespaceCounter, fFeatures.




Method Detail
canSetParameter
public boolean canSetParameter(String name, Object state)(Code)
DOM L3-EXPERIMENTAL: Check if parameter can be set



getDomConfig
public DOMConfiguration getDomConfig()(Code)



getFilter
public LSSerializerFilter getFilter()(Code)
When the application provides a filter, the serializer will call out to the filter before serializing each Node. Attribute nodes are never passed to the filter. The filter implementation can choose to remove the node from the stream or to terminate the serialization early.



getNewLine
public String getNewLine()(Code)
DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out. The only permitted values are these:
null
Use a default end-of-line sequence. DOM implementations should choose the default to match the usual convention for text files in the environment being used. Implementations must choose a default sequence that matches one of those allowed by 2.11 "End-of-Line Handling".
CR
The carriage-return character (#xD).
CR-LF
The carriage-return and line-feed characters (#xD #xA).
LF
The line-feed character (#xA).

The default value for this attribute is null.



getParameter
public Object getParameter(String name) throws DOMException(Code)
DOM L3-EXPERIMENTAL: Getter for boolean and object parameters



getParameterNames
public DOMStringList getParameterNames()(Code)
DOM Level 3 Core CR - Experimental. The list of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application. Note that this list can also contain parameter names defined outside this specification.



setFilter
public void setFilter(LSSerializerFilter filter)(Code)
When the application provides a filter, the serializer will call out to the filter before serializing each Node. Attribute nodes are never passed to the filter. The filter implementation can choose to remove the node from the stream or to terminate the serialization early.



setNewLine
public void setNewLine(String newLine)(Code)
DOM L3 EXPERIMENTAL: The end-of-line sequence of characters to be used in the XML being written out. The only permitted values are these:
null
Use a default end-of-line sequence. DOM implementations should choose the default to match the usual convention for text files in the environment being used. Implementations must choose a default sequence that matches one of those allowed by 2.11 "End-of-Line Handling".
CR
The carriage-return character (#xD).
CR-LF
The carriage-return and line-feed characters (#xD #xA).
LF
The line-feed character (#xA).

The default value for this attribute is null.



setParameter
public void setParameter(String name, Object value) throws DOMException(Code)
DOM L3-EXPERIMENTAL: Setter for boolean and object parameters



write
public boolean write(Node node, LSOutput destination) throws LSException(Code)
Serialize the specified node as described above in the general description of the LSSerializer interface. The output is written to the supplied LSOutput.
When writing to a LSOutput, the encoding is found by looking at the encoding information that is reachable through the LSOutput and the item to be written (or its owner document) in this order:
  1. LSOutput.encoding,
  2. Document.actualEncoding,
  3. Document.xmlEncoding.

If no encoding is reachable through the above properties, a default encoding of "UTF-8" will be used.
If the specified encoding is not supported an "unsupported-encoding" error is raised.
If no output is specified in the LSOutput, a "no-output-specified" error is raised.
Parameters:
  node - The node to serialize.
Parameters:
  destination - The destination for the serialized DOM. Returns true if node wassuccessfully serialized and false in case the nodecouldn't be serialized.



writeToString
public String writeToString(Node wnode) throws DOMException, LSException(Code)
DOM L3 EXPERIMENTAL: Serialize the specified node as described above in the description of LSSerializer. The result of serializing the node is returned as a string. Writing a Document or Entity node produces a serialized form that is well formed XML. Writing other node types produces a fragment of text in a form that is not fully defined by this document, but that should be useful to a human for debugging or diagnostic purposes.
Parameters:
  wnode - The node to be written. Returns the serialized data
exception:
  DOMException - DOMSTRING_SIZE_ERR: The resulting string is too long to fit in aDOMString.
exception:
  LSException - SERIALIZE_ERR: Unable to serialize the node. DOM applications shouldattach a DOMErrorHandler using the parameter "error-handler" to get details on error.



writeToURI
public boolean writeToURI(Node node, String URI) throws LSException(Code)
Serialize the specified node as described above in the general description of the LSSerializer interface. The output is written to the supplied URI.
When writing to a URI, the encoding is found by looking at the encoding information that is reachable through the item to be written (or its owner document) in this order:
  1. Document.inputEncoding,
  2. Document.xmlEncoding.

If no encoding is reachable through the above properties, a default encoding of "UTF-8" will be used.
If the specified encoding is not supported an "unsupported-encoding" error is raised.
Parameters:
  node - The node to serialize.
Parameters:
  URI - The URI to write to. Returns true if node wassuccessfully serialized and false in case the nodecouldn't be serialized.



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.