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.Default
breadthFirst, 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, leaving
visit, visit
public ChildrenCollector(Collection children, boolean collectNodes, boolean collectProperties, int maxLevel)
ChildrenCollector
children
- 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.Default
RepositoryException
protected void entering(Property property, int level) throws RepositoryException
entering
in class TraversingItemVisitor.Default
RepositoryException
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.