Class HierarchyConstraint
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
-
- org.apache.jackrabbit.core.query.lucene.constraint.HierarchyConstraint
-
- All Implemented Interfaces:
Constraint
- Direct Known Subclasses:
ChildNodeConstraint
,DescendantNodeConstraint
,SameNodeConstraint
public abstract class HierarchyConstraint extends SelectorBasedConstraint
HierarchyConstraint
is a base class for hierarchy related constraints.
-
-
Constructor Summary
Constructors Constructor Description HierarchyConstraint(String path, SelectorImpl selector)
Creates a new hierarchy constraint with the given basepath
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NodeId
getBaseNodeId(EvaluationContext context)
Returns the id of the base node ornull
if there is no node at the base path.-
Methods inherited from class org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
getSelector, getSelectorIndex
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.core.query.lucene.constraint.Constraint
evaluate
-
-
-
-
Constructor Detail
-
HierarchyConstraint
public HierarchyConstraint(String path, SelectorImpl selector)
Creates a new hierarchy constraint with the given basepath
.- Parameters:
path
- the base path.selector
- the selector this constraint is placed on.
-
-
Method Detail
-
getBaseNodeId
protected final NodeId getBaseNodeId(EvaluationContext context)
Returns the id of the base node ornull
if there is no node at the base path.- Parameters:
context
- the evaluation context.- Returns:
- the id or
null
if it doesn't exist.
-
-