Java Doc for TransformerBase.java in  » GIS » GeoTools-2.4.1 » org » geotools » xml » transform » 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 » GIS » GeoTools 2.4.1 » org.geotools.xml.transform 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.xml.transform.TransformerBase

All known Subclasses:   org.geotools.gml.producer.GeometryTransformer,  org.geotools.styling.SLDTransformer,  org.geotools.gml.producer.FeatureTypeTransformer,  org.geotools.filter.FilterTransformer,  org.geotools.gml.producer.FeatureTransformer,
TransformerBase
abstract public class TransformerBase (Code)
TransformerBase provides support for writing Object->XML encoders. The basic pattern for useage is to extend TransformerBase and implement the createTranslator(ContentHandler) method. This is easiest done by extending the inner class TranslatorSupport. A Translator uses a ContentHandler to issue SAX events to a javax.xml.transform.Transformer. If possible, make the translator public so it can be used by others as well.
author:
   Ian Schneider

Inner Class :public class Task implements Runnable
Inner Class :abstract protected static class TranslatorSupport implements Translator
Inner Class :public static class SchemaLocationSupport
Inner Class :protected static class XMLReaderSupport extends XMLFilterImpl

Field Summary
final public static  StringXMLNS_NAMESPACE
    


Method Summary
public  TaskcreateTransformTask(Object object, StreamResult result)
     Create a Transformation task.
public  TransformercreateTransformer()
     Create a Transformer which is initialized with the settings of this TransformerBase.
abstract public  TranslatorcreateTranslator(ContentHandler handler)
     Create a Translator to issue SAXEvents to a ContentHandler.
public  XMLReaderSupportcreateXMLReader(Object object)
     Create an XMLReader to use in the transformation.
public  CharsetgetEncoding()
     Gets the charset to declare in the header of the response. the charset to encode with.
public  intgetIndentation()
     Get the number of spaces to indent the output xml.
public  booleanisNamespaceDeclartionEnabled()
     Should this transformer declare namespace prefixes in the first element it outputs? Defaults to true.
public  booleanisOmitXMLDeclaration()
     Will this transformation omit the standard XML declaration.
public  voidsetEncoding(Charset charset)
     Sets the charset to declare in the xml header returned.
public  voidsetIndentation(int amt)
     Set the number of spaces to indent the output xml.
public  voidsetNamespaceDeclarationEnabled(boolean enabled)
     Enable declaration of namespace prefixes in the first element.
public  voidsetOmitXMLDeclaration(boolean xmlDecl)
     Set this transformer to omit/include the XML declaration.
public  voidtransform(Object object, java.io.OutputStream out)
     Perform the XML encoding on the given object to the given OutputStream.
public  voidtransform(Object object, java.io.Writer out)
     Perform the XML encoding on the given object to the given Writer.
public  voidtransform(Object object, StreamResult result)
     Perform the XML encoding on the given object to the given OutputStream.
public  Stringtransform(Object object)
     Perform the XML encoding of the given object into an internal buffer and return the resulting String.

Field Detail
XMLNS_NAMESPACE
final public static String XMLNS_NAMESPACE(Code)





Method Detail
createTransformTask
public Task createTransformTask(Object object, StreamResult result) throws TransformerException(Code)
Create a Transformation task. This is a Runnable task which supports aborting any processing. It will not start until the run method is called.



createTransformer
public Transformer createTransformer() throws TransformerException(Code)
Create a Transformer which is initialized with the settings of this TransformerBase.



createTranslator
abstract public Translator createTranslator(ContentHandler handler)(Code)
Create a Translator to issue SAXEvents to a ContentHandler.



createXMLReader
public XMLReaderSupport createXMLReader(Object object)(Code)
Create an XMLReader to use in the transformation.



getEncoding
public Charset getEncoding()(Code)
Gets the charset to declare in the header of the response. the charset to encode with.



getIndentation
public int getIndentation()(Code)
Get the number of spaces to indent the output xml. Defaults to -1. The number of spaces to indent, or -1, to disable.



isNamespaceDeclartionEnabled
public boolean isNamespaceDeclartionEnabled()(Code)
Should this transformer declare namespace prefixes in the first element it outputs? Defaults to true. true if namespaces will be declared, false otherwise



isOmitXMLDeclaration
public boolean isOmitXMLDeclaration()(Code)
Will this transformation omit the standard XML declaration. Defaults to false true if the XML declaration will be omitted, false otherwise.



setEncoding
public void setEncoding(Charset charset)(Code)
Sets the charset to declare in the xml header returned.
Parameters:
  charset - A charset object of the desired encoding



setIndentation
public void setIndentation(int amt)(Code)
Set the number of spaces to indent the output xml. Default to -1.
Parameters:
  amt - The number of spaces to indent if > 0, otherwise disable.



setNamespaceDeclarationEnabled
public void setNamespaceDeclarationEnabled(boolean enabled)(Code)
Enable declaration of namespace prefixes in the first element. Defaults to true;
Parameters:
  enabled - Enable namespace declaration.



setOmitXMLDeclaration
public void setOmitXMLDeclaration(boolean xmlDecl)(Code)
Set this transformer to omit/include the XML declaration. Defaults to false
Parameters:
  xmlDecl - Omit/include the XML declaration.



transform
public void transform(Object object, java.io.OutputStream out) throws TransformerException(Code)
Perform the XML encoding on the given object to the given OutputStream. Calls transform(Object,StreamResult);



transform
public void transform(Object object, java.io.Writer out) throws TransformerException(Code)
Perform the XML encoding on the given object to the given Writer. Calls transform(Object,StreamResult);



transform
public void transform(Object object, StreamResult result) throws TransformerException(Code)
Perform the XML encoding on the given object to the given OutputStream. Calls createTransformer(),createXMLReader() and Transformer.transform().



transform
public String transform(Object object) throws TransformerException(Code)
Perform the XML encoding of the given object into an internal buffer and return the resulting String. Calls transform(Object,Writer). It should be noted the most efficient mechanism of encoding is using the OutputStream or Writer methods



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.