|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.velocity.anakia.TreeWalker
This class allows you to walk a tree of JDOM Element objects. It first walks the tree itself starting at the Element passed into allElements() and stores each node of the tree in a Vector which allElements() returns as a result of its execution. You can then use a #foreach in Velocity to walk over the Vector and visit each Element node.
Field Summary | |
private java.util.Vector |
theElements
the cache of Element objects |
Constructor Summary | |
TreeWalker()
Empty constructor |
Method Summary | |
java.util.Vector |
allElements(org.jdom.Element e)
Creates a new Vector and walks the Element tree. |
private void |
treeWalk(org.jdom.Element e)
A recursive method to walk the Element tree. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Vector theElements
Constructor Detail |
public TreeWalker()
Method Detail |
public java.util.Vector allElements(org.jdom.Element e)
Element
- the starting Element nodeprivate final void treeWalk(org.jdom.Element e)
Element
- the current Element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |