Java Doc for Schema.java in  » Portal » Open-Portal » soif » 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 » Portal » Open Portal » soif 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   soif.Schema

Schema
public class Schema implements Cloneable(Code)
Schema is used to manage schema meta data. Uses a tree w/ next pointing to subsequent peers and child pointing to subtrees. Assumes the schema described is heirarchical.

The schema is represented as a binary tree, the nodes of which carry either a table (SchemaTblNode) or a column (SchemaColNode). The table nodes are invented on the fly as a convenience, the SOIF representation revolves around columns. Data associated with different columns is represented by multi-value SOIF, the data associated with a column is grouped on by the multi-value. The schema eliminates the multi-value during construction, grouping on the SchemaColNode class. When the toSOIF() method is used, the numbering is created by that method as it traverses the nodes. Removing the multi-value makes the nodes easier to work with in a general way. Also, if the schema is edited, adding or deleting columns, the tree doesn't have to be traversed for unused multi-values.

Interestingly, the actual schema is not a tree, but rather a graph with no duplicate tables. A table can have multiple parents, all tables up the graph from it qualify as parents. The schema is constructed and managed with the expectation that at any given level, the attributes are followed by the subtable references. When the schema is dumped toSOIF, duplicate tables are eliminated in order to create the graph. When editing a given instance of a table in the hierarchy, it is necessary to synch it with other instances of the table in the hierarchy. This is accomplished by maintaining an array of columns which are pointed back to by the binary tree - only one copy per column. This stick of dynamite is lit, baby.

Mercifully, the hierarchy issue is now also moot, since we're flattening the tree for now. Currently, only attributes in the root table are supported. This issue may be revisited in future releases, but note that toSOIF()'s current incarnation will not produce correct "unduplicated graph" SOIF.

Note that some methods were created before the current paradigm was established and will be reviewed for efficiency in future releases.



Field Summary
public  StringSOIFschemaName
    
public  BinaryTreebinaryTree
    
public  AVPairslist
     List of av pairs about the schema.
public  StringschemaName
    
public  Stringurl
    

Constructor Summary
public  Schema()
     Constructor.
public  Schema(SOIF soif)
     Constructor.

Method Summary
public  voidclearDisplay()
     Clear all the display flags.
public  voidclearSort()
     Clear all the sort flags.
public  Objectclone()
    
public  String[]getAll()
     Get the list of attributes that are editable in an array format.
public  StringgetAllString()
     Get the list of attributes that are editable in a comma seperated string.
public  String[]getDisplay()
     Get the list of attributes to be displayed in an array format.
public  StringgetDisplayString()
     Get the list of attributes to be displayed in a comma seperated string.
public  String[]getEditable()
     Get the list of attributes that are editable in an array format.
public  StringgetEditableString()
     Get the list of attributes that are editable in a comma seperated string.
public  StringgetIndexableString()
     Get the list of attributes that are indexable in a comma seperated string.
public  String[]getNonEditable()
     Get the list of attributes that are editable in an array format.
public  StringgetNonEditableString()
     Get the list of attributes that are editable in a comma seperated string.
public  String[]getSort()
     Get the list of attributes to be sorted by in an array format.
public  StringgetSortString()
     Get the list of attributes to be sorted by in a comma seperated string.
public  voidhideInternal()
     Hide internal attributes by marking the display flag false.
public  voidhideInternalOrUnIndexed()
     Hide both unindexed and internal attributes by marking the display flag false.
public  voidhideTablesWithAllHidden()
     Hide tables where all the attributes are themselves all hidden.
public  voidhideUnIndexed()
     Hide unindexed attributes by marking the display flag false.
public  booleanisValid()
     Return whether or not the schema is valid.
public  voidsetDefaultDisplay()
     Reset display flags to the default in the schema.
public  voidsetDefaultSort()
     Reset sort flags to the default in the schema.
public  StringtoSOIF()
     SOIFify SOIF list.
public  StringtoString()
    
public  StringtoStringTree(boolean fullnode, boolean tree)
     Dump the tree out in a couple of different ways.

Field Detail
SOIFschemaName
public String SOIFschemaName(Code)
SOIF Schema name



binaryTree
public BinaryTree binaryTree(Code)
Binary tree representation of the schema



list
public AVPairs list(Code)
List of av pairs about the schema.



schemaName
public String schemaName(Code)
Schema name



url
public String url(Code)
URL




Constructor Detail
Schema
public Schema()(Code)
Constructor.



Schema
public Schema(SOIF soif)(Code)
Constructor.




Method Detail
clearDisplay
public void clearDisplay()(Code)
Clear all the display flags.



clearSort
public void clearSort()(Code)
Clear all the sort flags.



clone
public Object clone()(Code)



getAll
public String[] getAll()(Code)
Get the list of attributes that are editable in an array format.



getAllString
public String getAllString()(Code)
Get the list of attributes that are editable in a comma seperated string.



getDisplay
public String[] getDisplay()(Code)
Get the list of attributes to be displayed in an array format.



getDisplayString
public String getDisplayString()(Code)
Get the list of attributes to be displayed in a comma seperated string.



getEditable
public String[] getEditable()(Code)
Get the list of attributes that are editable in an array format.



getEditableString
public String getEditableString()(Code)
Get the list of attributes that are editable in a comma seperated string.



getIndexableString
public String getIndexableString()(Code)
Get the list of attributes that are indexable in a comma seperated string.



getNonEditable
public String[] getNonEditable()(Code)
Get the list of attributes that are editable in an array format.



getNonEditableString
public String getNonEditableString()(Code)
Get the list of attributes that are editable in a comma seperated string.



getSort
public String[] getSort()(Code)
Get the list of attributes to be sorted by in an array format.



getSortString
public String getSortString()(Code)
Get the list of attributes to be sorted by in a comma seperated string.



hideInternal
public void hideInternal()(Code)
Hide internal attributes by marking the display flag false.



hideInternalOrUnIndexed
public void hideInternalOrUnIndexed()(Code)
Hide both unindexed and internal attributes by marking the display flag false.



hideTablesWithAllHidden
public void hideTablesWithAllHidden()(Code)
Hide tables where all the attributes are themselves all hidden.



hideUnIndexed
public void hideUnIndexed()(Code)
Hide unindexed attributes by marking the display flag false.



isValid
public boolean isValid()(Code)
Return whether or not the schema is valid.



setDefaultDisplay
public void setDefaultDisplay()(Code)
Reset display flags to the default in the schema.



setDefaultSort
public void setDefaultSort()(Code)
Reset sort flags to the default in the schema.



toSOIF
public String toSOIF()(Code)
SOIFify SOIF list.



toString
public String toString()(Code)



toStringTree
public String toStringTree(boolean fullnode, boolean tree)(Code)
Dump the tree out in a couple of different ways.
Parameters:
  fullnode - dump the info in the node
Parameters:
  tree - dump the tree structure



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.