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(String[] nameGlobs,
Collection<javax.jcr.Item> children,
boolean collectNodes,
boolean collectProperties,
int maxLevel)
Constructs a
ChildrenCollectorFilter |
ChildrenCollectorFilter(String namePattern,
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,
String namePattern) |
static javax.jcr.NodeIterator |
collectChildNodes(javax.jcr.Node node,
String[] nameGlobs) |
static javax.jcr.PropertyIterator |
collectProperties(javax.jcr.Node node,
String namePattern) |
static javax.jcr.PropertyIterator |
collectProperties(javax.jcr.Node node,
String[] nameGlobs) |
protected void |
entering(javax.jcr.Node node,
int level) |
protected void |
entering(javax.jcr.Property property,
int level) |
static boolean |
matches(String name,
String pattern)
|
static boolean |
matches(String name,
String[] nameGlobs)
|
public ChildrenCollectorFilter(String namePattern, 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(String[] nameGlobs, 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,
String namePattern)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static javax.jcr.NodeIterator collectChildNodes(javax.jcr.Node node,
String[] nameGlobs)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static javax.jcr.PropertyIterator collectProperties(javax.jcr.Node node,
String namePattern)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static javax.jcr.PropertyIterator collectProperties(javax.jcr.Node node,
String[] nameGlobs)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected void entering(javax.jcr.Node node,
int level)
throws javax.jcr.RepositoryException
entering in class javax.jcr.util.TraversingItemVisitor.Defaultjavax.jcr.RepositoryExceptionprotected void entering(javax.jcr.Property property,
int level)
throws javax.jcr.RepositoryException
entering in class javax.jcr.util.TraversingItemVisitor.Defaultjavax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.