|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.commons.predicate.DepthPredicate org.apache.jackrabbit.commons.predicate.NodeTypePredicate
public class NodeTypePredicate
Filters on the node type of a node.
Field Summary | |
---|---|
protected String |
nodeType
the nodetype to filter on |
protected boolean |
respectSupertype
indicates if supertypes should be respected |
Fields inherited from class org.apache.jackrabbit.commons.predicate.DepthPredicate |
---|
maxDepth, minDepth |
Constructor Summary | |
---|---|
NodeTypePredicate(String nodeType,
boolean respectSupertype)
Creates a new node type filter. |
|
NodeTypePredicate(String nodeType,
boolean respectSupertype,
int minDepth,
int maxDepth)
Creates a new node type filter. |
Method Summary | |
---|---|
protected boolean |
matches(Item item)
Returns true if the item is a node and if the configured
nodetype is equal to the primary type of the node. |
Methods inherited from class org.apache.jackrabbit.commons.predicate.DepthPredicate |
---|
evaluate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String nodeType
protected final boolean respectSupertype
Constructor Detail |
---|
public NodeTypePredicate(String nodeType, boolean respectSupertype, int minDepth, int maxDepth)
nodeType
- the node type to filter onrespectSupertype
- indicates if supertype should be respectedminDepth
- the minimal depthmaxDepth
- the maximal depthpublic NodeTypePredicate(String nodeType, boolean respectSupertype)
nodeType
- the node type to filter onrespectSupertype
- indicates if supertype should be respectedMethod Detail |
---|
protected boolean matches(Item item) throws RepositoryException
true
if the item is a node and if the configured
nodetype is equal to the primary type of the node. if supertypes are
respected it also returns true
if the items nodetype
extends from the configured node type (Node.isNodeType() check).
matches
in class DepthPredicate
item
- the item to match
true
if the item matches; false
otherwise.
RepositoryException
- if an error occurs.DepthPredicate.matches(javax.jcr.Item)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |