Java Doc for TreeBuilder.java in  » IDE-Netbeans » schema2beans » org » netbeans » modules » schema2beansdev » 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 » IDE Netbeans » schema2beans » org.netbeans.modules.schema2beansdev 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.schema2beansdev.TreeBuilder

TreeBuilder
public class TreeBuilder implements DocDefHandler,TreeParser,HasPrefixGuesser(Code)
This class implements the Document Definition handler in order to build the internal tree representation of the DD DTD.


Field Summary
 GenBeans.Configconfig
    
 StringdocRoot
    
 MapnameHash
    
 GraphNoderootNode
    

Constructor Summary
 TreeBuilder(GenBeans.Config config)
    

Method Summary
public  voidaddExtraDataCurLink(Object data)
    
public  voidaddExtraDataCurLink(Object[] data)
    
public  voidaddExtraDataNode(String uniqueName, String typeName, Object data)
    
public  voidaddExtraDataNode(String uniqueName, String typeName, Object[] data)
    
public  voidcharacter(char c)
     Called each time a character | is found.
public  booleandoesElementExist(String typeName)
    
public  Stringdump()
    
static  voiddumpAttributes(GraphNode elt, StringBuffer str, String indent)
    
static  voiddumpTree(List children, StringBuffer str, String indent, boolean tree)
    
static  voiddumpTree(GraphLink l, StringBuffer str, String indent, boolean tree)
    
public  voidelement(String uniqueName, String typeName, String attrName, String attrNamespace, int instance, boolean externalType, String defaultValue)
     Called for each word found in a DTD definition.
public  voidelement(String uniqueName, String typeName, int instance)
    
public  voidendDocument()
     Called when the DTD parsing is over. At this time, the DTD object graph is entirely built.
public  voidendElement()
    
public  voidendGroupElements(int instance)
     We are done creating the elements of a same group, set the current link to the parent of the group.
public  StringgetDefaultNamespace()
    
public  GraphNodegetNode(String uniqueName)
    
public  GraphNode[]getNodes()
     TreeParser interface.
public  PrefixGuessergetPrefixGuesser()
    
public  GraphNodegetRoot()
    
static  StringinstanceToString(int instance, boolean bean)
    
public  voidjavaType(String uniqueName, String name, String javaType)
     Called to request that the graph node named name be of a certain Java class.
public  voidnillable(boolean value)
    
 voidpopLevel()
    
 voidpushLevel()
    
public  voidsetAbstract(String uniqueName, String name, boolean value)
    
public  voidsetDefaultNamespace(String ns)
    
public  voidsetExtendedProperty(String uniqueName, String typeName, String propertyName, Object value)
    
public  voidsetExtension(String uniqueName, String typeName, String extendsName)
    
public  voidsetPrefixGuesser(PrefixGuesser guesser)
    
public  voidsetUnion(String uniqueName, String typeName, boolean value)
    
public  voidstartDocument(String root)
     Called once, when the DTD is started to be parsed.
public  voidstartElement(String uniqueName, String typeName, int type)
     Called each time a DTD
public  voidstartGroupElements()
     Called when a parenthese is found, meaning that the following elements (element() calls) should be considered as semantically grouped. Creates a child GraphLink from the current link to group all the further elements of this group.
static  StringtypeToString(int type)
    

Field Detail
config
GenBeans.Config config(Code)



docRoot
String docRoot(Code)



nameHash
Map nameHash(Code)



rootNode
GraphNode rootNode(Code)




Constructor Detail
TreeBuilder
TreeBuilder(GenBeans.Config config)(Code)




Method Detail
addExtraDataCurLink
public void addExtraDataCurLink(Object data)(Code)



addExtraDataCurLink
public void addExtraDataCurLink(Object[] data)(Code)



addExtraDataNode
public void addExtraDataNode(String uniqueName, String typeName, Object data) throws Schema2BeansException(Code)



addExtraDataNode
public void addExtraDataNode(String uniqueName, String typeName, Object[] data) throws Schema2BeansException(Code)



character
public void character(char c)(Code)
Called each time a character | is found.



doesElementExist
public boolean doesElementExist(String typeName)(Code)



dump
public String dump()(Code)



dumpAttributes
static void dumpAttributes(GraphNode elt, StringBuffer str, String indent)(Code)



dumpTree
static void dumpTree(List children, StringBuffer str, String indent, boolean tree)(Code)



dumpTree
static void dumpTree(GraphLink l, StringBuffer str, String indent, boolean tree)(Code)



element
public void element(String uniqueName, String typeName, String attrName, String attrNamespace, int instance, boolean externalType, String defaultValue)(Code)
Called for each word found in a DTD definition. This can be a comment, element or attlist definition. For example, this method is called for each name element found within the scope of an element (. The first element name doesn't generate a call to this method (@see startElement). This is where the subtree of the element definition is built. The element to add might be a child or sibling to the previous element. If the element is preceded by a '(', this is child (@see startGroupElements), otherwise the element is a sibling.
Parameters:
  name - the name of the element defined within the declaration.
Parameters:
  instance - has one of the three values: TYPE_0_1,TYPE_1, TYPE_0_N, TYPE_1_N



element
public void element(String uniqueName, String typeName, int instance)(Code)



endDocument
public void endDocument()(Code)
Called when the DTD parsing is over. At this time, the DTD object graph is entirely built. The method checks the consitency of the built graph, and cleans things up a bit.



endElement
public void endElement()(Code)
Done with an element



endGroupElements
public void endGroupElements(int instance)(Code)
We are done creating the elements of a same group, set the current link to the parent of the group. This will allow either to start creating siblings (if element() is called) or go the next parent level (if this same method is called again).



getDefaultNamespace
public String getDefaultNamespace()(Code)



getNode
public GraphNode getNode(String uniqueName)(Code)



getNodes
public GraphNode[] getNodes()(Code)
TreeParser interface. This is what the BeanBuilder uses to get elements of the tree. The goal is to try to keep separated the object graph implementation from its usage. Not sure, this is very useful though, since the tree builder knows the gory details of the graph. Just a gentle way to ask for the graph.



getPrefixGuesser
public PrefixGuesser getPrefixGuesser()(Code)



getRoot
public GraphNode getRoot()(Code)



instanceToString
static String instanceToString(int instance, boolean bean)(Code)



javaType
public void javaType(String uniqueName, String name, String javaType)(Code)
Called to request that the graph node named name be of a certain Java class. If the current element type is an attribute, then we set the javaType of that attribute instead.
Parameters:
  javaType - is the name of a Java class (eg, "java.lang.Integer", or "int").



nillable
public void nillable(boolean value)(Code)



popLevel
void popLevel()(Code)



pushLevel
void pushLevel()(Code)



setAbstract
public void setAbstract(String uniqueName, String name, boolean value)(Code)



setDefaultNamespace
public void setDefaultNamespace(String ns)(Code)



setExtendedProperty
public void setExtendedProperty(String uniqueName, String typeName, String propertyName, Object value) throws Schema2BeansException(Code)
set an extended property on a GraphNode



setExtension
public void setExtension(String uniqueName, String typeName, String extendsName) throws Schema2BeansException(Code)



setPrefixGuesser
public void setPrefixGuesser(PrefixGuesser guesser)(Code)



setUnion
public void setUnion(String uniqueName, String typeName, boolean value) throws Schema2BeansException(Code)



startDocument
public void startDocument(String root)(Code)
Called once, when the DTD is started to be parsed. Create the GraphNode root element.
Parameters:
  root - root elemement name of the document (as the DOCTYPEspecifies in the XML document)



startElement
public void startElement(String uniqueName, String typeName, int type)(Code)
Called each time a DTD Parameters:
  name - the name of the element
Parameters:
  typeName - is the name to use for the attribute
Parameters:
  type - the type (as a constant) of the element (for exampleELEMENT or ATTLIST)



startGroupElements
public void startGroupElements()(Code)
Called when a parenthese is found, meaning that the following elements (element() calls) should be considered as semantically grouped. Creates a child GraphLink from the current link to group all the further elements of this group. If any propriety is defined for this group (as *, ? or + or |) this will be set later on the current link (as the parent of any of the elements graph link objects).



typeToString
static String typeToString(int type)(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.