Package org.apache.jackrabbit.util
Class ChildrenCollector
- java.lang.Object
-
- javax.jcr.util.TraversingItemVisitor
-
- javax.jcr.util.TraversingItemVisitor.Default
-
- org.apache.jackrabbit.util.ChildrenCollector
-
- All Implemented Interfaces:
ItemVisitor
public class ChildrenCollector extends TraversingItemVisitor.Default
ChildrenCollector
is a utility class which can be used to 'collect' child elements of a node. It implements theItemVisitor
interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.jcr.util.TraversingItemVisitor
TraversingItemVisitor.Default
-
-
Field Summary
-
Fields inherited from class javax.jcr.util.TraversingItemVisitor
breadthFirst, maxLevel
-
-
Constructor Summary
Constructors Constructor Description ChildrenCollector(Collection children, boolean collectNodes, boolean collectProperties, int maxLevel)
Constructs aChildrenCollector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
entering(Node node, int level)
protected void
entering(Property property, int level)
-
Methods inherited from class javax.jcr.util.TraversingItemVisitor.Default
leaving, leaving
-
Methods inherited from class javax.jcr.util.TraversingItemVisitor
visit, visit
-
-
-
-
Constructor Detail
-
ChildrenCollector
public ChildrenCollector(Collection children, boolean collectNodes, boolean collectProperties, int maxLevel)
Constructs aChildrenCollector
- Parameters:
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)
-
-
Method Detail
-
entering
protected void entering(Node node, int level) throws RepositoryException
- Overrides:
entering
in classTraversingItemVisitor.Default
- Throws:
RepositoryException
-
entering
protected void entering(Property property, int level) throws RepositoryException
- Overrides:
entering
in classTraversingItemVisitor.Default
- Throws:
RepositoryException
-
-