public class ChildrenCollector extends TraversingItemVisitor.Default
ChildrenCollector is a utility class
which can be used to 'collect' child elements of a
node. It implements the ItemVisitor
interface.TraversingItemVisitor.DefaultbreadthFirst, maxLevel| Constructor and Description |
|---|
ChildrenCollector(Collection children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a
ChildrenCollector |
| Modifier and Type | Method and Description |
|---|---|
protected void |
entering(Node node,
int level) |
protected void |
entering(Property property,
int level) |
leaving, leavingvisit, visitpublic ChildrenCollector(Collection children, boolean collectNodes, boolean collectProperties, int maxLevel)
ChildrenCollectorchildren - where the matching children should be addedcollectNodes - true, if child nodes should be collected; otherwise falsecollectProperties - true, if child properties should be collected; otherwise falsemaxLevel - number of hierarchy levels to traverse
(e.g. 1 for direct children only, 2 for children and their children, and so on)protected void entering(Node node, int level) throws RepositoryException
entering in class TraversingItemVisitor.DefaultRepositoryExceptionprotected void entering(Property property, int level) throws RepositoryException
entering in class TraversingItemVisitor.DefaultRepositoryExceptionCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.