Class DeclaringTypePredicate
- java.lang.Object
-
- org.apache.jackrabbit.commons.predicate.DepthPredicate
-
- org.apache.jackrabbit.commons.predicate.DeclaringTypePredicate
-
- All Implemented Interfaces:
Predicate
public class DeclaringTypePredicate extends DepthPredicate
Filter that checks the declared type of an item
-
-
Constructor Summary
Constructors Constructor Description DeclaringTypePredicate(String nodeType, boolean propsOnly)
Creates a new filter for the given nodetype and flagsDeclaringTypePredicate(String nodeType, boolean propsOnly, int minDepth, int maxDepth)
Creates a new filter for the given nodetype and flags.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
matches(Item item)
Matches if the declaring nodetype of the item is equal to the one specified in this filter.-
Methods inherited from class org.apache.jackrabbit.commons.predicate.DepthPredicate
evaluate
-
-
-
-
Field Detail
-
nodeType
protected final String nodeType
The nodetype to check
-
propsOnly
protected final boolean propsOnly
indicates if only props should be checked
-
-
Constructor Detail
-
DeclaringTypePredicate
public DeclaringTypePredicate(String nodeType, boolean propsOnly, int minDepth, int maxDepth)
Creates a new filter for the given nodetype and flags.- Parameters:
nodeType
- the nodetype name to checkpropsOnly
- iftrue
only properties are checkedminDepth
- the minimal depthmaxDepth
- the maximal depth
-
DeclaringTypePredicate
public DeclaringTypePredicate(String nodeType, boolean propsOnly)
Creates a new filter for the given nodetype and flags- Parameters:
nodeType
- the nodetype name to checkpropsOnly
- iftrue
only properties are checked
-
-
Method Detail
-
matches
protected boolean matches(Item item) throws RepositoryException
Matches if the declaring nodetype of the item is equal to the one specified in this filter. If the item is a node andpropsOnly
flag istrue
it returnsfalse
.- 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)
-
-