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

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.constraint.SelectorBasedConstraint
      extended by 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
HierarchyConstraint(String path, SelectorImpl selector)
          Creates a new hierarchy constraint with the given base path.
 
Method Summary
protected  NodeId getBaseNodeId(EvaluationContext context)
          Returns the id of the base node or null 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 base path.

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 or null if there is no node at the base path.

Parameters:
context - the evaluation context.
Returns:
the id or null if it doesn't exist.


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