1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.nxqd;
17
18 import java.util.logging.Level;
19 import java.util.logging.Logger;
20 import java.util.ArrayList;
21 import java.util.List;
22 import java.util.Map;
23 import org.w3c.dom.Document;
24
25 /**
26 *
27 * @author <a href="mailto:webhiker@sourceforge.net">webhiker</a>
28 * @version 1.0
29 */
30 public class NxqdResults extends NxqdConsumer {
31
32 /**
33 * The variable <code>logger</code> is used for logging events.
34 *
35 */
36 private static Logger logger = Logger.getLogger(NxqdResults.class.getName());
37
38 protected NxqdResults(NxqdManager manager) throws NxqdException {
39 super(manager);
40 }
41
42 /**
43 * Adds the specified NxqdValue to the end of the results set. Note that if the
44 * XmlResults object was created as the result of a lazy evaluation,
45 * this method throws an exception.
46 *
47 * @param value a <code>NxqdValue</code> value
48 * @exception NxqdException if an error occurs
49 */
50 public void add(NxqdValue value)
51 throws NxqdException {
52 }
53
54 /**
55 * If a query was processed with eager evaluation, a call to this method returns
56 * the number of values in the result set.
57 *
58 * If the query was processed with lazy evaluation, a call to this method throws
59 * an exception.
60 *
61 * @return an <code>int</code> value
62 * @exception NxqdException if an error occurs
63 */
64 public int size()
65 throws NxqdException {
66 return 0;
67 }
68
69 /**
70 * If a query was processed with eager evaluation, a call to this method resets the
71 * result set iterator, so that a subsequent call to next() method will return the
72 * first value in the result set.
73 *
74 * If the query was processed with lazy evaluation then a call to this method method
75 * throws an exception.
76 *
77 * @exception NxqdException if an error occurs
78 */
79 public void reset()
80 throws NxqdException {
81 }
82
83 /**
84 * Returns true if there is another element in the results set.
85 *
86 * @return a <code>boolean</code> value
87 * @exception NxqdException if an error occurs
88 */
89 public boolean hasNext()
90 throws NxqdException {
91 return false;
92 }
93
94 /**
95 * Returns true if there is a previous element in the results set.
96 *
97 * @return a <code>boolean</code> value
98 * @exception NxqdException if an error occurs
99 */
100 public boolean hasPrevious()
101 throws NxqdException {
102 return false;
103 }
104
105 /**
106 * Retrieves the next value in the result set. When no more values remain in the result set,
107 * returns null.
108 *
109 * @return a <code>NxqdValue</code> value
110 * @exception NxqdException if an error occurs
111 */
112 public NxqdValue next()
113 throws NxqdException {
114 return null;
115 }
116
117 /**
118 * Retrieves the previous value in the result set. When the first value in the results
119 * set has been reached, returns null
120 *
121 * @return a <code>NxqdValue</code> value
122 * @exception NxqdException if an error occurs
123 */
124 public NxqdValue previous()
125 throws NxqdException {
126 return null;
127 }
128
129 /**
130 * Returns the current element in the results set without moving the internal iterator.
131 *
132 * @return a <code>NxqdValue</code> value
133 * @exception NxqdException if an error occurs
134 */
135 public NxqdValue peek()
136 throws NxqdException {
137 return null;
138 }
139
140 }
141