private void retrieveConstraint(final NodeQuery query, final ConstraintStack stack) { if (query == null) { return; } // add a constraint only if lower and upper bounds are defined if (query.lowerBound != -1 && query.upperBound != -1) { stack.add(query.levelConstraint, query.lowerBound, query.upperBound); } // recursively traverse the ancestors this.retrieveConstraint(query.ancestor, stack); }
this.retrieveConstraint(this.ancestor, stack);