1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jxpath.ri.model;
17
18 import java.util.Locale;
19
20 import org.apache.commons.jxpath.ri.QName;
21
22 /***
23 * Creates NodePointers for objects of a certain type.
24 * NodePointerFactories are ordered according to the values returned
25 * by the "getOrder" method and always queried in that order.
26 *
27 * @author Dmitri Plotnikov
28 * @version $Revision: 1.7 $ $Date: 2004/02/29 14:17:45 $
29 */
30 public interface NodePointerFactory {
31
32 /***
33 * The factory order number determines its position between other factories.
34 */
35 int getOrder();
36
37 /***
38 * Create a NodePointer for the supplied object. The node will represent
39 * the "root" object for a path.
40 *
41 * @return null if this factory does not recognize objects of the supplied
42 * type.
43 */
44 NodePointer createNodePointer(QName name, Object object, Locale locale);
45
46 /***
47 * Create a NodePointer for the supplied child object.
48 * <p>
49 * @return null if this factory does not recognize objects of the supplied
50 * type.
51 */
52 NodePointer createNodePointer(
53 NodePointer parent,
54 QName name,
55 Object object);
56 }