1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 package org.jaxen;
47
48 import java.util.Iterator;
49
50 /***
51 * Interface for navigating around an arbitrary object model
52 * accessing certain parts by name for performance.
53 * <p>
54 * This interface must only be implemented by those models that
55 * can support this named access behaviour.
56 *
57 * @author Stephen Colebourne
58 */
59 public interface NamedAccessNavigator extends Navigator {
60
61 /***
62 * Retrieve an <code>Iterator</code> that returns the <code>child</code>
63 * xpath axis where the names of the children match the supplied name
64 * and optional namespace.
65 * <p>
66 * This method must only return element nodes with the correct name.
67 * <p>
68 * If the namespaceURI is null, no namespace should be used.
69 * The prefix will never be null.
70 *
71 * @param contextNode the origin context node
72 * @param localName the local name of the children to return, always present
73 * @param namespacePrefix the prefix of the namespace of the children to return
74 * @param namespaceURI the uri of the namespace of the children to return
75 *
76 * @return an Iterator capable of traversing the named children, or null if none
77 *
78 * @throws UnsupportedAxisException if the semantics of this axis are
79 * not supported by this object model
80 */
81 Iterator getChildAxisIterator(
82 Object contextNode,
83 String localName, String namespacePrefix, String namespaceURI)
84 throws UnsupportedAxisException;
85
86 /***
87 * Retrieve an <code>Iterator</code> that returns the <code>attribute</code>
88 * xpath axis where the names of the attributes match the supplied name
89 * and optional namespace.
90 * <p>
91 * This method must only return attribute nodes with the correct name.
92 * <p>
93 * If the namespaceURI is null, no namespace should be used.
94 * The prefix will never be null.
95 *
96 * @param contextNode the origin context node
97 * @param localName the local name of the attributes to return, always present
98 * @param namespacePrefix the prefix of the namespace of the attributes to return
99 * @param namespaceURI the uri of the namespace of the attributes to return
100 *
101 * @return an Iterator capable of traversing the named attributes, or null if none
102 *
103 * @throws UnsupportedAxisException is the semantics of this axis are
104 * not supported by this object model
105 */
106 Iterator getAttributeAxisIterator(
107 Object contextNode,
108 String localName, String namespacePrefix, String namespaceURI)
109 throws UnsupportedAxisException;
110
111 }