Class IsNodePredicate
- java.lang.Object
-
- org.apache.jackrabbit.commons.predicate.DepthPredicate
-
- org.apache.jackrabbit.commons.predicate.IsNodePredicate
-
- All Implemented Interfaces:
Predicate
public class IsNodePredicate extends DepthPredicate
Item filter that checks if an item is a node.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isNode
Polarity of this filter-
Fields inherited from class org.apache.jackrabbit.commons.predicate.DepthPredicate
maxDepth, minDepth
-
-
Constructor Summary
Constructors Constructor Description IsNodePredicate()
Default constructor.IsNodePredicate(boolean polarity)
Creates a new node item filterIsNodePredicate(boolean polarity, int minDepth, int maxDepth)
Creates a new node item filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
matches(Item item)
Returnstrue
if the item is a node and the polarity is positive (true).-
Methods inherited from class org.apache.jackrabbit.commons.predicate.DepthPredicate
evaluate
-
-
-
-
Constructor Detail
-
IsNodePredicate
public IsNodePredicate()
Default constructor.
-
IsNodePredicate
public IsNodePredicate(boolean polarity, int minDepth, int maxDepth)
Creates a new node item filter.- Parameters:
polarity
- the polarity of this filter. iftrue
it matches nodes, iffalse
it matches properties.minDepth
- the minimum depthmaxDepth
- the maximum depth- See Also:
DepthPredicate
-
IsNodePredicate
public IsNodePredicate(boolean polarity)
Creates a new node item filter- Parameters:
polarity
- the polarity of this filter. iftrue
it matches nodes, iffalse
it matches properties.
-
-
Method Detail
-
matches
protected boolean matches(Item item) throws RepositoryException
Returnstrue
if the item is a node and the polarity is positive (true).- Overrides:
matches
in classDepthPredicate
- Parameters:
item
- the item to match- Returns:
true
if the item matches;false
otherwise.- Throws:
RepositoryException
- if an error occurs.- See Also:
DepthPredicate.matches(javax.jcr.Item)
-
-