Class ChildNodeConstraint
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
-
- org.apache.jackrabbit.core.query.lucene.constraint.HierarchyConstraint
-
- org.apache.jackrabbit.core.query.lucene.constraint.ChildNodeConstraint
-
- All Implemented Interfaces:
Constraint
public class ChildNodeConstraint extends HierarchyConstraint
ChildNodeConstraint
implements a child node constraint.
-
-
Constructor Summary
Constructors Constructor Description ChildNodeConstraint(ChildNodeImpl constraint, SelectorImpl selector)
Creates a child node constraint from the given QOMconstraint
on the givenselector
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(ScoreNode[] row, Name[] selectorNames, EvaluationContext context)
Evaluates this constraint for the given row.-
Methods inherited from class org.apache.jackrabbit.core.query.lucene.constraint.HierarchyConstraint
getBaseNodeId
-
Methods inherited from class org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
getSelector, getSelectorIndex
-
-
-
-
Constructor Detail
-
ChildNodeConstraint
public ChildNodeConstraint(ChildNodeImpl constraint, SelectorImpl selector)
Creates a child node constraint from the given QOMconstraint
on the givenselector
.- Parameters:
constraint
- the QOM child node constraint.selector
- the selector.
-
-
Method Detail
-
evaluate
public boolean evaluate(ScoreNode[] row, Name[] selectorNames, EvaluationContext context) throws IOException
Evaluates this constraint for the given row.- Parameters:
row
- the current row of score nodes.selectorNames
- the selector names associated withrow
.context
- the evaluation context.- Returns:
true
if the row satisfies the constraint,false
otherwise.- Throws:
IOException
- if an error occurs while evaluating the constraint.
-
-