| org.mmbase.bridge.util.TreeList org.mmbase.bridge.util.GrowingTreeList
GrowingTreeList | public class GrowingTreeList extends TreeList (Code) | | This version of
TreeList is automaticly growing with the same 'branch' every time when that is possible. For that
it needs a kind of template query for every branch, which is defined by the constructor.
author: Michiel Meeuwissen version: $Id: GrowingTreeList.java,v 1.19 2007/02/10 17:44:03 nklasens Exp $ since: MMBase-1.7 |
Constructor Summary | |
public | GrowingTreeList(NodeQuery q, int maxDepth, NodeManager nodeManager, String role, String searchDir) Parameters: q - The 'base' query defining the minimal depth of the tree elements. | public | GrowingTreeList(NodeQuery q, int maxDepth) This may be used in combination with
Queries.addPath(tree.getTemplate(), (String) path.getValue(this), (String) searchDirs.getValue(this));
So you add a template constisting of a bunch of elements. | public | GrowingTreeList(TreeList tl, int maxDepth) |
maxNumberOfSteps | protected int maxNumberOfSteps(Code) | | |
GrowingTreeList | public GrowingTreeList(NodeQuery q, int maxDepth, NodeManager nodeManager, String role, String searchDir)(Code) | | Parameters: q - The 'base' query defining the minimal depth of the tree elements. The trunk of the tree. Parameters: maxDepth - You must supply a maximal depth of the nodes, because MMBase is basicly a network rather then a tree, sotree representations could be infinitely deep. Parameters: nodeManager - Destination Nodemanager in the tree Parameters: role - Role of the relations in the tree Parameters: searchDir - Direction of the relations in the tree since: MMBase-1.7.1 |
GrowingTreeList | public GrowingTreeList(NodeQuery q, int maxDepth)(Code) | | This may be used in combination with
Queries.addPath(tree.getTemplate(), (String) path.getValue(this), (String) searchDirs.getValue(this));
So you add a template constisting of a bunch of elements.
|
GrowingTreeList | public GrowingTreeList(TreeList tl, int maxDepth)(Code) | | |
addPathElement | protected void addPathElement()(Code) | | Grows the branches of the tree, with the leave.
|
getLeafTemplate | public NodeQuery getLeafTemplate()(Code) | | The leave template is the 'last' template. This is the same as getTemplate, only, the
constraints set on this, are only used if the template is used 'on the end'.
It boils down to the fact that constraints set on the query don't change the tree itself, but
only constraint the 'leaves', so it makes for a kind of tree-search.
since: MMBase-1.8 |
getTemplate | public NodeQuery getTemplate()(Code) | | Returns the Query which is used as a template for the leaves to 'grow' the query. You can change it, add
sort-orders and add constraints before the tree is 'started'. All but the first step of this
query are added. This query itself is never executed, though marked used, to avoid changes on
it after the list has started.
Query which is used as a template since: MMBase-1.7.1 |
setMaxDepth | public void setMaxDepth(int maxDepth)(Code) | | As long as the tree is not 'started' yet, max depth can still be changed.
Parameters: maxDepth - max number of Steps since: MMBase-1.7.1 |
|
|