org.apache.jackrabbit.commons.predicate
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
|
Field Summary |
protected String |
nodeType
The nodetype to check |
protected boolean |
propsOnly
indicates if only props should be checked |
| Fields inherited from interface org.apache.jackrabbit.commons.predicate.Predicate |
TRUE |
|
Method Summary |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodeType
protected final String nodeType
- The nodetype to check
propsOnly
protected final boolean propsOnly
- indicates if only props should be checked
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 - if true 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 - if true only properties are checked
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 and
propsOnly
flag is true it returns false.
- Overrides:
matches in class DepthPredicate
- 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)
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.