Java Doc for TreeList.java in  » Database-ORM » MMBase » org » mmbase » bridge » util » 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 » Database ORM » MMBase » org.mmbase.bridge.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mmbase.bridge.util.TreeList

All known Subclasses:   org.mmbase.bridge.util.GrowingTreeList,
TreeList
public class TreeList extends AbstractSequentialBridgeList implements NodeList(Code)
Queries a Tree from MMBase. A Tree is presented as a List of MultiLevel results (ClusterNodes), combined with a smart iterator which iterates through the elements of these lists as if it was one list ordered as a Tree.
author:
   Michiel Meeuwissen
version:
   $Id: TreeList.java,v 1.30 2008/02/28 12:23:51 michiel Exp $
since:
   MMBase-1.7

Inner Class :protected class Branch
Inner Class :protected class TreeItr implements TreeIterator

Field Summary
final public static  StringREAL_NODES
    
final protected  List<Branch>branches
    
protected  Cloudcloud
    
protected  booleanfoundEnd
    
protected  intleafConstraintOffset
    
protected  intmax
    
protected  intnumberOfSteps
    
protected  inttopQuery
    

Constructor Summary
public  TreeList(NodeQuery q)
    
Parameters:
  q - The 'base' query defining the minimal depth of the tree elements.
public  TreeList(TreeList tl)
    

Method Summary
public static  voiddoTest(java.io.Writer writer, NodeQuery q)
    
public  CloudgetCloud()
    
protected  NodeListgetLeafList(int queryNumber)
     Executes one query as a 'leaf' query.
public  NodeQuerygetLeafQuery()
     Returns the top most query, associated with the last call to TreeList.grow .
protected  NodeListgetList(int queryNumber)
    
public  intgetMax()
    
public  NodegetNode(int i)
    
protected static  NodeQuerygetQuery(String[] args)
     For testing only.
protected  NodegetRealNode(int queryIndex, int index)
    
public  RelationStepgrow(NodeManager nodeManager, String role, String searchDir)
     Grows branches of the Tree, which means that one new query will be created which is one relationStep longer than the longest one until now.
public  ListIterator<Node>listIterator(int ind)
    
public static  voidmain(String[] args)
    
public  NodeIteratornodeIterator()
    
public  voidsetLeafConstraint(Constraint constraint)
     Sets a 'leaf constraint' on the last 'growed' step.
public  voidsetMax(int m)
    
public  intsize()
    
protected  voidsizeCheck()
     Checks if the size of the List needs to be (re)determined, and if not, does so.
public  NodeListsubList(int start, int end)
    
public  NodeListsubNodeList(int start, int end)
    
public  StringtoString()
    
public  TreeIteratortreeIterator()
    
protected  TreeIteratortreeIterator(int ind)
    

Field Detail
REAL_NODES
final public static String REAL_NODES(Code)



branches
final protected List<Branch> branches(Code)



cloud
protected Cloud cloud(Code)



foundEnd
protected boolean foundEnd(Code)



leafConstraintOffset
protected int leafConstraintOffset(Code)



max
protected int max(Code)

since:
   MMBase-1.8.1



numberOfSteps
protected int numberOfSteps(Code)



topQuery
protected int topQuery(Code)




Constructor Detail
TreeList
public TreeList(NodeQuery q)(Code)

Parameters:
  q - The 'base' query defining the minimal depth of the tree elements. The trunk of the tree.



TreeList
public TreeList(TreeList tl)(Code)
Copy-constructor
since:
   MMBase-1.8




Method Detail
doTest
public static void doTest(java.io.Writer writer, NodeQuery q)(Code)



getCloud
public Cloud getCloud()(Code)

since:
   MMBase-1.8



getLeafList
protected NodeList getLeafList(int queryNumber)(Code)
Executes one query as a 'leaf' query.
since:
   MMBase-1.8



getLeafQuery
public NodeQuery getLeafQuery()(Code)
Returns the top most query, associated with the last call to TreeList.grow .
since:
   MMBase-1.8



getList
protected NodeList getList(int queryNumber)(Code)
Executes one query if that did not happen yet, and stores the result in the 'results' List NodeList or null if queryNumber too big
throws:
  IndexOutOfBoundsException - if queryNumber < 0



getMax
public int getMax()(Code)

since:
   MMBase-1.8.1



getNode
public Node getNode(int i)(Code)



getQuery
protected static NodeQuery getQuery(String[] args)(Code)
For testing only. Based on RMMCI, please use the System property to specify de cloud context -Dmmbase.defaultcloudcontext=rmi://localhost:1111/remotecontext
Parameters:
  args - the start node (in one argument)



getRealNode
protected Node getRealNode(int queryIndex, int index)(Code)
Returns node 'index' of query result 'queryIndex' as a 'real' node (so not a cluster node)



grow
public RelationStep grow(NodeManager nodeManager, String role, String searchDir)(Code)
Grows branches of the Tree, which means that one new query will be created which is one relationStep longer than the longest one until now. This new relationStep is returned, which can be used to create new constraints. null if no relationstep is added because that would not increase the number of results.



listIterator
public ListIterator<Node> listIterator(int ind)(Code)



main
public static void main(String[] args)(Code)



nodeIterator
public NodeIterator nodeIterator()(Code)



setLeafConstraint
public void setLeafConstraint(Constraint constraint)(Code)
Sets a 'leaf constraint' on the last 'growed' step. A leaf constraint is a constraint which is only used on leafs, so if the tree is grown further, the leaf constraint will not be passed to the branches.
since:
   MMBase-1.8



setMax
public void setMax(int m)(Code)

since:
   MMBase-1.8.1



size
public int size()(Code)



sizeCheck
protected void sizeCheck()(Code)
Checks if the size of the List needs to be (re)determined, and if not, does so. After growing a List the size needs recalculation.
since:
   MMBase-1.7.1



subList
public NodeList subList(int start, int end)(Code)



subNodeList
public NodeList subNodeList(int start, int end)(Code)



toString
public String toString()(Code)



treeIterator
public TreeIterator treeIterator()(Code)



treeIterator
protected TreeIterator treeIterator(int ind)(Code)



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