public class NodeTypePredicate extends DepthPredicate
| Modifier and Type | Field and Description |
|---|---|
protected String |
nodeType
the nodetype to filter on
|
protected boolean |
respectSupertype
indicates if supertypes should be respected
|
maxDepth, minDepth| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
evaluateprotected final String nodeType
protected final boolean respectSupertype
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 respectedprotected 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 DepthPredicateitem - the item to matchtrue if the item matches; false otherwise.RepositoryException - if an error occurs.DepthPredicate.matches(javax.jcr.Item)Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.