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:
- javax.jcr.ItemVisitor
public class ChildrenCollector
- extends javax.jcr.util.TraversingItemVisitor.Default
ChildrenCollector is a utility class
which can be used to 'collect' child elements of a
node. It implements the ItemVisitor
interface.
| Nested classes/interfaces inherited from class javax.jcr.util.TraversingItemVisitor |
javax.jcr.util.TraversingItemVisitor.Default |
| Fields inherited from class javax.jcr.util.TraversingItemVisitor |
breadthFirst, maxLevel |
|
Constructor Summary |
ChildrenCollector(java.util.Collection children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a ChildrenCollector |
|
Method Summary |
protected void |
entering(javax.jcr.Node node,
int level)
|
protected void |
entering(javax.jcr.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChildrenCollector
public ChildrenCollector(java.util.Collection children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
- Constructs a
ChildrenCollector
- 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)
entering
protected void entering(javax.jcr.Node node,
int level)
throws javax.jcr.RepositoryException
-
- Overrides:
entering in class javax.jcr.util.TraversingItemVisitor.Default
- Throws:
javax.jcr.RepositoryException
entering
protected void entering(javax.jcr.Property property,
int level)
throws javax.jcr.RepositoryException
-
- Overrides:
entering in class javax.jcr.util.TraversingItemVisitor.Default
- Throws:
javax.jcr.RepositoryException
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.