Java Doc for TypedXmlWriter.java in  » 6.0-JDK-Modules-com.sun » xml » com » sun » xml » internal » txw2 » 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 » 6.0 JDK Modules com.sun » xml » com.sun.xml.internal.txw2 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.xml.internal.txw2.TypedXmlWriter

All known Subclasses:   com.sun.xml.internal.txw2.ContainerElement,
TypedXmlWriter
public interface TypedXmlWriter (Code)
Defines common operations for all typed XML writers. Root of all typed XML writer interfaces.

This interface defines a series of methods to allow client applications to write arbitrary well-formed documents.
author:
   Kohsuke Kawaguchi





Method Summary
 void_attribute(String localName, Object value)
     Adds an attribute of the given name and the value.
 void_attribute(String nsUri, String localName, Object value)
     Adds an attribute of the given name and the value.
 void_attribute(QName attributeName, Object value)
     Adds an attribute of the given name and the value.
 T_cast(Class<T> targetInterface)
     Returns a different interface for this typed XML Writer.

Semantically, this operation is a 'cast' --- it returns the same underlying writer in a different interface.

 void_cdata(Object value)
     Appends CDATA section.
 void_comment(Object value)
     Appends a comment.
 T_element(String localName, Class<T> contentModel)
     Appends a new child element.
 T_element(String nsUri, String localName, Class<T> contentModel)
     Appends a new child element.
 T_element(QName tagName, Class<T> contentModel)
     Appends a new child element.
 T_element(Class<T> contentModel)
     Appends a new child element.

This version of the _element method requires the T class to be annotated with XmlElement annotation.

 void_namespace(String uri)
     Declares a new namespace URI on this element.
 void_namespace(String uri, String prefix)
     Declares a new namespace URI on this element to a specific prefix.
Parameters:
  uri - can be empty, but must not be null.
Parameters:
  prefix - If non-empty, this prefix is bound to the URIon this element.
 void_namespace(String uri, boolean requirePrefix)
     Declares a new namespace URI on this element.
 void_pcdata(Object value)
     Appends text data.
 voidblock()
     Blocks the writing of the start tag so that new attributes can be added even after child elements are appended.
 voidcommit()
     Commits this element (and all its descendants) to the output.
 voidcommit(boolean includingAllPredecessors)
     Commits this element (and all its descendants) to the output.

Once a writer is committed, nothing can be added to it further. Committing allows TXW to output a part of the document even if the rest has not yet been written.
Parameters:
  includingAllPredecessors - if false, this operation will _commit this writer and all itsdescendants writers.

 DocumentgetDocument()
     Gets the Document object that this writer is writing to.



Method Detail
_attribute
void _attribute(String localName, Object value)(Code)
Adds an attribute of the given name and the value.

Short for

_attribute("",localName,value);

See Also:   TypedXmlWriter._attribute(String,String,Object)



_attribute
void _attribute(String nsUri, String localName, Object value)(Code)
Adds an attribute of the given name and the value.

Short for

_attribute(new QName(nsUri,localName),value);

See Also:   TypedXmlWriter._attribute(QName,Object)



_attribute
void _attribute(QName attributeName, Object value)(Code)
Adds an attribute of the given name and the value.
Parameters:
  attributeName - must not be null.
Parameters:
  value - value of the attribute.must not be null.See the documentation for the conversion rules.



_cast
T _cast(Class<T> targetInterface)(Code)
Returns a different interface for this typed XML Writer.

Semantically, this operation is a 'cast' --- it returns the same underlying writer in a different interface. The returned new writer and the current writer will write to the same element.

But this is different from Java's ordinary cast because the returned object is not always the same as the current object. always return non-null.




_cdata
void _cdata(Object value)(Code)
Appends CDATA section.
Parameters:
  value - must not be null.See the documentation for the conversion rules.



_comment
void _comment(Object value) throws UnsupportedOperationException(Code)
Appends a comment.
Parameters:
  value - must not be null.See the documentation for the conversion rules.
throws:
  UnsupportedOperationException - if the underlying XmlSerializer does not supportwriting comments, this exception can be thrown.



_element
T _element(String localName, Class<T> contentModel)(Code)
Appends a new child element.

Short for

_element(URI of this element,localName,contentModel);

The namespace URI will be inherited from the parent element.
See Also:   TypedXmlWriter._element(String,String,Class)




_element
T _element(String nsUri, String localName, Class<T> contentModel)(Code)
Appends a new child element.

The newly created child element is appended at the end of the children.
Parameters:
  nsUri - The namespace URI of the newly created element.
Parameters:
  localName - The local name of the newly created element.
Parameters:
  contentModel - The typed XML writer interface used to write the children ofthe new child element.always return non-null TypedXmlWriter that can be usedto write the contents of the newly created child element.




_element
T _element(QName tagName, Class<T> contentModel)(Code)
Appends a new child element.

Short for

_element(tagName.getNamespaceURI(),tagName.getLocalPart(),contentModel);

See Also:   TypedXmlWriter._element(String,String,Class)



_element
T _element(Class<T> contentModel)(Code)
Appends a new child element.

This version of the _element method requires the T class to be annotated with XmlElement annotation. The element name will be taken from there.
See Also:   TypedXmlWriter._element(String,String,Class)




_namespace
void _namespace(String uri)(Code)
Declares a new namespace URI on this element.

The runtime system will assign an unique prefix for the URI.
Parameters:
  uri - can be empty, but must not be null.




_namespace
void _namespace(String uri, String prefix)(Code)
Declares a new namespace URI on this element to a specific prefix.
Parameters:
  uri - can be empty, but must not be null.
Parameters:
  prefix - If non-empty, this prefix is bound to the URIon this element. If empty, then the runtime will still try touse the URI as the default namespace, but it may fail to do sobecause of the constraints in the XML.
throws:
  IllegalArgumentException - if the same prefix is already declared on this element.



_namespace
void _namespace(String uri, boolean requirePrefix)(Code)
Declares a new namespace URI on this element.

The runtime system will assign an unique prefix for the URI.
Parameters:
  uri - can be empty, but must not be null.
Parameters:
  requirePrefix - if false, this method behaves just like TypedXmlWriter._namespace(String).if true, this guarantees that the URI is bound to a non empty prefix.




_pcdata
void _pcdata(Object value)(Code)
Appends text data.
Parameters:
  value - must not be null.See the documentation for the conversion rules.



block
void block()(Code)
Blocks the writing of the start tag so that new attributes can be added even after child elements are appended.

This blocks the output at the token before the start tag until the TypedXmlWriter.commit() method is called to _commit this element.

For more information, see the TXW documentation.




commit
void commit()(Code)
Commits this element (and all its descendants) to the output.

Short for _commit(true).




commit
void commit(boolean includingAllPredecessors)(Code)
Commits this element (and all its descendants) to the output.

Once a writer is committed, nothing can be added to it further. Committing allows TXW to output a part of the document even if the rest has not yet been written.
Parameters:
  includingAllPredecessors - if false, this operation will _commit this writer and all itsdescendants writers. If true, in addition to those writers,this operation will close all the writers before this writerin the document order.




getDocument
Document getDocument()(Code)
Gets the Document object that this writer is writing to. always non-null.



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