Java Doc for Transformer.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » tools » migration » jboss » 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 » JOnAS 4.8.6 » org.objectweb.jonas.tools.migration.jboss 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas.tools.migration.jboss.Transformer

All known Subclasses:   org.objectweb.jonas.tools.migration.jboss.Migrate,
Transformer
public class Transformer (Code)
The Transformer class contains methods for querying one or more input documents and building a new output document. Transformation tasks such as these can also be programmed in XSL and performed by an XSLT engine, however, for certain kinds of transformations it may be useful to perform them in Java by extending the Transformer class.
author:
   Rafael H. Schloming <rhs@mit.edu>

Inner Class :protected interface NodeFilter
Inner Class :protected static class Mapper extends LinkedHashMap

Field Summary
final protected static  NodeFilterALL
     A predefined NodeFilter that accepts all nodes.
final protected static  StringLINE
     A predefined String containing the line seperator for this system.

Constructor Summary
protected  Transformer()
     Constructs a new Transformer ready to output to an empty document.

Method Summary
protected  voidclose()
     Adds a text node with the appropriate amount of whitespace and restores the previous current node.
protected  voidclose(boolean indent)
     Restores the previous current node.
protected  voidcomment(String comment)
     Adds a comment to the current node.
protected  voidget(Node node, String name, Collection result, NodeFilter filter)
     Queries a node for child elements with a given name and filters the result based on a given NodeFilter .
protected  DocumentgetDocument()
     Returns the output document.
protected  booleanisEmpty(String str)
    
protected  Nodenode(Node node, String path)
     Queries a node for a single descedent element at a given path.
protected  Listnodes(Node node, String path)
     Queries a node for all descendent elements at a given path.
protected  voidopen(String name)
     Creates a new child element of the current node with the given name and makes the new element the current node.
protected  voidopen(String name, boolean indent)
     Creates a new child element of the current node with the given name and makes the new element the current node.
protected  voidquery(Node node, String path, Collection result)
     Queries the given node for all elements at a given path.
protected  voidquery(Node node, String path, Collection result, NodeFilter filter)
     Queries the given node for all elements at a given path and filters the result.
protected  voidrename(Collection nodes, Map substitutions)
    
protected  voidrename(Node node, Map substitutions)
    
protected  voidset(String name, String value)
     Sets an attribute on the current element.
protected  Nodesingleton(Collection c)
    
protected  voidtag(String name, String value)
     Creates an element with the given name that contains a single text node with the given value and adds it as a child to the current node.
protected  voidtext(String text)
     Adds the given text to the current node.
protected  Stringvalue(Node node, String path)
     Queries a node for a string value at a given path.
protected  Listvalues(Node node, String path)
    

Field Detail
ALL
final protected static NodeFilter ALL(Code)
A predefined NodeFilter that accepts all nodes.



LINE
final protected static String LINE(Code)
A predefined String containing the line seperator for this system.




Constructor Detail
Transformer
protected Transformer()(Code)
Constructs a new Transformer ready to output to an empty document.




Method Detail
close
protected void close()(Code)
Adds a text node with the appropriate amount of whitespace and restores the previous current node.
See Also:   Transformer.close(boolean)



close
protected void close(boolean indent)(Code)
Restores the previous current node. If indent is true an appropriate amount of indenting whitespace is added before restoring the previous current node.
Parameters:
  indent - a flag indicating whether or not to indent



comment
protected void comment(String comment)(Code)
Adds a comment to the current node.
Parameters:
  comment - the text of the comment



get
protected void get(Node node, String name, Collection result, NodeFilter filter)(Code)
Queries a node for child elements with a given name and filters the result based on a given NodeFilter .
Parameters:
  node - the node to query
Parameters:
  name - the name of the child elements to get
Parameters:
  result - the collection to add the results to
Parameters:
  filter - the result filter



getDocument
protected Document getDocument()(Code)
Returns the output document. the output document



isEmpty
protected boolean isEmpty(String str)(Code)



node
protected Node node(Node node, String path)(Code)
Queries a node for a single descedent element at a given path.
Parameters:
  node - the node to query
Parameters:
  path - the path the node or null if none is found
throws:
  IllegalStateException - if more than one node is found



nodes
protected List nodes(Node node, String path)(Code)
Queries a node for all descendent elements at a given path.
Parameters:
  node - the node to query
Parameters:
  path - the path the resulting list of nodes



open
protected void open(String name)(Code)
Creates a new child element of the current node with the given name and makes the new element the current node. A text node is added with an appropriate amount of indenting whitespace before the new element is added.
Parameters:
  name - the name of the new element
See Also:   Transformer.open(String,boolean)



open
protected void open(String name, boolean indent)(Code)
Creates a new child element of the current node with the given name and makes the new element the current node. If indent is true then a text node with the appropriate amount of whitespace is added before the new element is created.
Parameters:
  name - the name of the new node
Parameters:
  indent - a flag indicating whether or not to indent



query
protected void query(Node node, String path, Collection result)(Code)
Queries the given node for all elements at a given path.
Parameters:
  node - the node to query
Parameters:
  path - the path
Parameters:
  result - the collection to add results to



query
protected void query(Node node, String path, Collection result, NodeFilter filter)(Code)
Queries the given node for all elements at a given path and filters the result.
Parameters:
  node - the node to query
Parameters:
  the - path
Parameters:
  result - the collection to add results to
Parameters:
  filter - the NodeFilter used to filter the results



rename
protected void rename(Collection nodes, Map substitutions)(Code)



rename
protected void rename(Node node, Map substitutions)(Code)



set
protected void set(String name, String value)(Code)
Sets an attribute on the current element.
Parameters:
  name - the attribute name
Parameters:
  value - the attribute value
throws:
  IllegalStateException - if the current node is not anelement



singleton
protected Node singleton(Collection c)(Code)



tag
protected void tag(String name, String value)(Code)
Creates an element with the given name that contains a single text node with the given value and adds it as a child to the current node.
Parameters:
  name - the name of the element
Parameters:
  value - the value of the text node



text
protected void text(String text)(Code)
Adds the given text to the current node.
Parameters:
  text - the text to add



value
protected String value(Node node, String path)(Code)
Queries a node for a string value at a given path.
Parameters:
  node - the node to query
Parameters:
  path - the path the value or null if there is none
throws:
  IllegalStateException - if the node exists but has novalue



values
protected List values(Node node, String path)(Code)



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.