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 #getDescendantSelectorName descendantSelector} node
08: * is a descendant of the {@link #getAncestorSelectorName ancestorSelector}
09: * node. A node-tuple satisfies the constraint only if:
10: * <pre> descendantSelectorNode.getAncestor(n).isSame(ancestorSelectorNode) &&
11: * descendantSelectorNode.getDepth() > n</pre>
12: * would return true some some non-negative integer <code>n</code>, where
13: * <code>descendantSelectorNode</code> is the node for
14: * {@link #getDescendantSelectorName descendantSelector} and
15: * <code>ancestorSelectorNode</code> is the node for
16: * {@link #getAncestorSelectorName ancestorSelector}.
17: * <p/>
18: * The query is invalid if:
19: * <ul>
20: * <li>{@link #getDescendantSelectorName descendantSelector} is not the name
21: * of a selector in the query, or</li>
22: * <li>{@link #getAncestorSelectorName ancestorSelector} is not the name of a
23: * selector in the query, or</li>
24: * <li>{@link #getDescendantSelectorName descendantSelector} is the same as
25: * {@link #getAncestorSelectorName ancestorSelector}.
26: * </ul>
27: *
28: * @since JCR 2.0
29: */
30: public interface DescendantNodeJoinCondition extends JoinCondition {
31: /**
32: * Gets the name of the descendant selector.
33: *
34: * @return the selector name; non-null
35: */
36: public String getDescendantSelectorName();
37:
38: /**
39: * Gets the name of the ancestor selector.
40: *
41: * @return the selector name; non-null
42: */
43: public String getAncestorSelectorName();
44: }
45:
46: // EOF
|