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 child of a
08: * node reachable by absolute path {@link #getPath path}.
09: * <p/>
10: * A node-tuple satisfies the constraint only if:
11: * <pre> selectorNode.getParent().isSame(session.getNode(path))</pre>
12: * would return true, where <code>selectorNode</code> is the node for the
13: * specified selector.
14: * <p/>
15: * The query is invalid if:
16: * <ul>
17: * <li>{@link #getSelectorName selector} is not the name of a selector in the
18: * query, or</li>
19: * <li>{@link #getPath path} is not a syntactically valid absolute path. Note,
20: * however, that if the path is syntactically valid but does not identify a
21: * node in the repository (or the node is not visible to this session,
22: * because of access control constraints), the query is valid but the
23: * constraint is not satisfied.</li>
24: * </ul>
25: *
26: * @since JCR 2.0
27: */
28: public interface ChildNode extends Constraint {
29: /**
30: * Gets the name of the selector against which to apply this constraint.
31: *
32: * @return the selector name; non-null
33: */
34: public String getSelectorName();
35:
36: /**
37: * Gets the absolute path.
38: *
39: * @return the path; non-null
40: */
41: public String getPath();
42: }
43:
44: // EOF
|