Class DescendantNodeConstraint

  • All Implemented Interfaces:
    Constraint

    public class DescendantNodeConstraint
    extends HierarchyConstraint
    DescendantNodeConstraint implements a descendant node constraint.
    • Constructor Detail

      • DescendantNodeConstraint

        public DescendantNodeConstraint​(DescendantNodeImpl constraint,
                                        SelectorImpl selector)
        Creates a new descendant node constraint from the given QOM constraint.
        Parameters:
        constraint - the QOM descendant 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 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.