1 package org.codehaus.xfire.message;
2
3 import java.util.Calendar;
4 import java.util.Date;
5
6 import javax.xml.namespace.QName;
7 import javax.xml.stream.XMLStreamReader;
8
9 /***
10 * A MessageReader. You must call getNextChildReader() until hasMoreChildReaders()
11 * returns false.
12 *
13 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
14 */
15 public interface MessageReader
16 {
17 public String getValue();
18
19 public String getValue(String ns, String attribute);
20
21 public Calendar getValueAsCalendar();
22
23 public Calendar getValueAsCalendar(String ns, String attribute);
24
25 public int getValueAsInt();
26
27 public int getValueAsInt(String ns, String attribute);
28
29 public long getValueAsLong();
30
31 public long getValueAsLong(String ns, String attribute);
32
33 public double getValueAsDouble();
34
35 public double getValueAsDouble(String ns, String attribute);
36
37 public float getValueAsFloat();
38
39 public float getValueAsFloat(String ns, String attribute);
40
41 public boolean getValueAsBoolean();
42
43 public boolean getValueAsBoolean(String ns, String attribute);
44
45 public Date getValueAsDate();
46
47 public Date getValueAsDate(String ns, String attribute);
48
49
50
51 public Date getValueAsDateTime();
52
53 public Date getValueAsDateTime(String ns, String attribute);
54
55 public boolean hasMoreChildReaders();
56
57 public MessageReader getNextChildReader();
58
59 public QName getName();
60
61 /***
62 * Get the local name of the element this reader represents.
63 * @return
64 */
65 public String getLocalName();
66
67 /***
68 * @return
69 */
70 public String getNamespace();
71
72 /***
73 * Get the XMLStreamReader. If you use this, you can't
74 * use any of the other methods on the MessageReader.
75 * It must be returned directly after the END_ELEMENT
76 * tag.
77 *
78 * @return
79 */
80 public XMLStreamReader getXMLStreamReader();
81
82 }