01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.query.qom;
05:
06: /**
07: * Selects a subset of the nodes in the repository based on node type.
08: * <p/>
09: * A selector selects every node in the repository, subject to access control
10: * constraints, that satisfies at least one of the following conditions:
11: * <ul>
12: * <li>the node's primary node type is {@link #getNodeTypeName nodeType},
13: * or</li>
14: * <li>the node's primary node type is a subtype of
15: * {@link #getNodeTypeName nodeType}, or</li>
16: * <li>the node has a mixin node type that is
17: * {@link #getNodeTypeName nodeType}, or</li>
18: * <li>the node has a mixin node type that is a subtype of
19: * {@link #getNodeTypeName nodeType}.</li>
20: * </ul>
21: * <p/>
22: * The query is invalid if {@link #getNodeTypeName nodeType} or
23: * {@link #getSelectorName selectorName} is not a syntactically valid JCR name.
24: * <p/>
25: * The query is invalid if {@link #getSelectorName selectorName} is identical
26: * to the {@link #getSelectorName selectorName} of another selector in the
27: * query.
28: * <p/>
29: * If {@link #getNodeTypeName nodeType} is a valid JCR name but not the name
30: * of a node type available in the repository, the query is valid but the
31: * selector selects no nodes.
32: *
33: * @since JCR 2.0
34: */
35: public interface Selector extends Source {
36: /**
37: * Gets the name of the required node type.
38: *
39: * @return the node type name; non-null
40: */
41: public String getNodeTypeName();
42:
43: /**
44: * Gets the selector name.
45: * <p/>
46: * A selector's name can be used elsewhere in the query to identify the
47: * selector.
48: *
49: * @return the selector name; non-null
50: */
51: public String getSelectorName();
52: }
53:
54: // EOF
|