Package org.apache.jackrabbit.util
Class ChildrenCollectorFilter
java.lang.Object
javax.jcr.util.TraversingItemVisitor
javax.jcr.util.TraversingItemVisitor.Default
org.apache.jackrabbit.util.ChildrenCollectorFilter
- All Implemented Interfaces:
ItemVisitor
ChildrenCollectorFilter is a utility class
which can be used to 'collect' child items of a
node whose names match a certain pattern. It implements the
ItemVisitor interface.-
Nested Class Summary
Nested classes/interfaces inherited from class javax.jcr.util.TraversingItemVisitor
TraversingItemVisitor.Default -
Constructor Summary
ConstructorsConstructorDescriptionChildrenCollectorFilter(String[] nameGlobs, Collection<Item> children, boolean collectNodes, boolean collectProperties, int maxLevel) Constructs aChildrenCollectorFilterChildrenCollectorFilter(String namePattern, Collection<Item> children, boolean collectNodes, boolean collectProperties, int maxLevel) Constructs aChildrenCollectorFilter -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeIteratorcollectChildNodes(Node node, String namePattern) static NodeIteratorcollectChildNodes(Node node, String[] nameGlobs) static PropertyIteratorcollectProperties(Node node, String namePattern) static PropertyIteratorcollectProperties(Node node, String[] nameGlobs) static booleanstatic booleanMethods inherited from class javax.jcr.util.TraversingItemVisitor
visit, visit
-
Constructor Details
-
ChildrenCollectorFilter
public ChildrenCollectorFilter(String namePattern, Collection<Item> children, boolean collectNodes, boolean collectProperties, int maxLevel) Constructs aChildrenCollectorFilter- Parameters:
namePattern- the pattern which should be applied to the names of the childrenchildren- 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)
-
ChildrenCollectorFilter
public ChildrenCollectorFilter(String[] nameGlobs, Collection<Item> children, boolean collectNodes, boolean collectProperties, int maxLevel) Constructs aChildrenCollectorFilter- Parameters:
nameGlobs- an array of globbing strings which should be applied to the names of the childrenchildren- 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 Details
-
collectChildNodes
public static NodeIterator collectChildNodes(Node node, String namePattern) throws RepositoryException - Throws:
RepositoryException
-
collectChildNodes
public static NodeIterator collectChildNodes(Node node, String[] nameGlobs) throws RepositoryException - Throws:
RepositoryException
-
collectProperties
public static PropertyIterator collectProperties(Node node, String namePattern) throws RepositoryException - Throws:
RepositoryException
-
collectProperties
public static PropertyIterator collectProperties(Node node, String[] nameGlobs) throws RepositoryException - Throws:
RepositoryException
-
matches
- See Also:
-
matches
- See Also:
-