01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.query.qom;
05:
06: /**
07: * Tests whether the {@link #getSelectorName selector} node is a descendant
08: * of a node reachable by absolute path {@link #getPath path}.
09: * <p/>
10: * A node-tuple satisfies the constraint only if:
11: * <pre> selectorNode.getAncestor(n).isSame(session.getNode(path)) &&
12: * selectorNode.getDepth() > n</pre>
13: * would return true for some non-negative integer <code>n</code>, where
14: * {@link #getSelectorName selectorNode} is the node for the specified
15: * selector.
16: * <p/>
17: * The query is invalid if:
18: * <ul>
19: * <li>{@link #getSelectorName selector} is not the name of a selector in the
20: * query, or</li>
21: * <li>{@link #getPath path} is not a syntactically valid absolute path. Note,
22: * however, that if the path is syntactically valid but does not identify a
23: * node in the repository (or the node is not visible to this session,
24: * because of access control constraints), the query is valid but the
25: * constraint is not satisfied.</li>
26: * </ul>
27: *
28: * @since JCR 2.0
29: */
30: public interface DescendantNode extends Constraint {
31: /**
32: * Gets the name of the selector against which to apply this constraint.
33: *
34: * @return the selector name; non-null
35: */
36: public String getSelectorName();
37:
38: /**
39: * Gets the absolute path.
40: *
41: * @return the path; non-null
42: */
43: public String getPath();
44: }
45:
46: // EOF
|