Class SameNodeConstraint
- 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.SameNodeConstraint
-
- All Implemented Interfaces:
Constraint
public class SameNodeConstraint extends HierarchyConstraint
SameNodeConstraintimplements a same node constraint.
-
-
Constructor Summary
Constructors Constructor Description SameNodeConstraint(SameNodeImpl constraint, SelectorImpl selector)Creates a same node constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(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
-
SameNodeConstraint
public SameNodeConstraint(SameNodeImpl constraint, SelectorImpl selector)
Creates a same node constraint.- Parameters:
constraint- the QOM constraint.selector- the selector for this constraint.
-
-
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:
trueif the row satisfies the constraint,falseotherwise.- Throws:
IOException- if an error occurs while evaluating the constraint.
-
-