org.apache.jackrabbit.core.query.lucene.constraint
Class SameNodeConstraint

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
      extended by org.apache.jackrabbit.core.query.lucene.constraint.HierarchyConstraint
          extended by org.apache.jackrabbit.core.query.lucene.constraint.SameNodeConstraint
All Implemented Interfaces:
Constraint

public class SameNodeConstraint
extends HierarchyConstraint

SameNodeConstraint implements a same node constraint.


Constructor Summary
SameNodeConstraint(SameNodeImpl constraint, SelectorImpl selector)
          Creates a same node constraint.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 with row.
context - the evaluation context.
Returns:
true if the row satisfies the constraint, false otherwise.
Throws:
IOException - if an error occurs while evaluating the constraint.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.