public class ChildrenCollectorFilter
extends javax.jcr.util.TraversingItemVisitor.Default
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.| Constructor and Description |
|---|
ChildrenCollectorFilter(java.lang.String[] nameGlobs,
java.util.Collection<javax.jcr.Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a
ChildrenCollectorFilter |
ChildrenCollectorFilter(java.lang.String namePattern,
java.util.Collection<javax.jcr.Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a
ChildrenCollectorFilter |
| Modifier and Type | Method and Description |
|---|---|
static javax.jcr.NodeIterator |
collectChildNodes(javax.jcr.Node node,
java.lang.String namePattern) |
static javax.jcr.NodeIterator |
collectChildNodes(javax.jcr.Node node,
java.lang.String[] nameGlobs) |
static javax.jcr.PropertyIterator |
collectProperties(javax.jcr.Node node,
java.lang.String namePattern) |
static javax.jcr.PropertyIterator |
collectProperties(javax.jcr.Node node,
java.lang.String[] nameGlobs) |
static boolean |
matches(java.lang.String name,
java.lang.String pattern)
|
static boolean |
matches(java.lang.String name,
java.lang.String[] nameGlobs)
|
public ChildrenCollectorFilter(java.lang.String namePattern,
java.util.Collection<javax.jcr.Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
ChildrenCollectorFilternamePattern - 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)public ChildrenCollectorFilter(java.lang.String[] nameGlobs,
java.util.Collection<javax.jcr.Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
ChildrenCollectorFilternameGlobs - 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)public static javax.jcr.NodeIterator collectChildNodes(javax.jcr.Node node,
java.lang.String namePattern)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static javax.jcr.NodeIterator collectChildNodes(javax.jcr.Node node,
java.lang.String[] nameGlobs)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static javax.jcr.PropertyIterator collectProperties(javax.jcr.Node node,
java.lang.String namePattern)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static javax.jcr.PropertyIterator collectProperties(javax.jcr.Node node,
java.lang.String[] nameGlobs)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static boolean matches(java.lang.String name,
java.lang.String pattern)
Node.getNodes(String)public static boolean matches(java.lang.String name,
java.lang.String[] nameGlobs)
Node.getNodes(String)Copyright © 2010 - 2025 Adobe. All Rights Reserved