949596979899100101102103104
} public void init(Env env, Element root, String base) throws Exception { tree = new Tree(null); this.root = root; if (base == null || base == "") base = "/";
218219220221222223224225226227228
NavItem link = parent.findURL(test.getLink()); if (link == null) return null; Tree parentTree = link.getTree(); linkTree(link.getTree(), tree.getFirst()); this.tree = parent.tree; return this; }
237238239240241242243244245246
{ for (Tree child = subTree.getFirst(); child != null; child = child.getNext()) { NavItem item = (NavItem) child.getData(); Tree childTree = destTree.append(item); item.setTree(childTree); linkTree(childTree, child); } }
268269270271272273274275276277278279
url = normalizeURL(url); Iterator iter = tree.dfs(); while (iter.hasNext()) { Tree tree = (Tree) iter.next(); NavItem item = (NavItem) tree.getData(); if (item.getLink().equals(url)) { return item; } }
307308309310311312313314315316317
desc = descPattern.evalString(elt); item.setDescription(desc); item.setProduct(_productPattern.evalString(elt)); Tree childTree = tree.append(item); item.setTree(childTree); fillChildren(env, childTree, childNode.getFirstChild(), base); } }