1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
2
|
<!--NewPage-->
|
3
|
<HTML>
|
4
|
<HEAD>
|
5
|
<!-- Generated by javadoc on Tue Apr 11 19:05:41 AKDT 2000 -->
|
6
|
<TITLE>
|
7
|
: Class DBReader
|
8
|
</TITLE>
|
9
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
10
|
</HEAD>
|
11
|
<BODY BGCOLOR="white">
|
12
|
|
13
|
<!-- ========== START OF NAVBAR ========== -->
|
14
|
<A NAME="navbar_top"><!-- --></A>
|
15
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
16
|
<TR>
|
17
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
18
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
19
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
20
|
<TR ALIGN="center" VALIGN="top">
|
21
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
22
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
23
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
24
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
25
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
26
|
</TR>
|
27
|
</TABLE>
|
28
|
</TD>
|
29
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
30
|
</EM>
|
31
|
</TD>
|
32
|
</TR>
|
33
|
|
34
|
<TR>
|
35
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
36
|
<A HREF="BasicElement.html"><B>PREV CLASS</B></A>
|
37
|
<A HREF="DBSAXElement.html"><B>NEXT CLASS</B></A></FONT></TD>
|
38
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
39
|
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
40
|
<A HREF="DBReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
41
|
</TR>
|
42
|
<TR>
|
43
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
44
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
45
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
46
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
47
|
</TR>
|
48
|
</TABLE>
|
49
|
<!-- =========== END OF NAVBAR =========== -->
|
50
|
|
51
|
<HR>
|
52
|
<!-- ======== START OF CLASS DATA ======== -->
|
53
|
<H2>
|
54
|
Class DBReader</H2>
|
55
|
<PRE>
|
56
|
java.lang.Object
|
57
|
|
|
58
|
+--<B>DBReader</B>
|
59
|
</PRE>
|
60
|
<HR>
|
61
|
<DL>
|
62
|
<DT>public class <B>DBReader</B><DT>extends java.lang.Object</DL>
|
63
|
|
64
|
<P>
|
65
|
A Class that creates an XML text document
|
66
|
from a query to a relational DB containing a DOM representation
|
67
|
<P>
|
68
|
<HR>
|
69
|
|
70
|
<P>
|
71
|
<!-- ======== INNER CLASS SUMMARY ======== -->
|
72
|
|
73
|
|
74
|
<!-- =========== FIELD SUMMARY =========== -->
|
75
|
|
76
|
|
77
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
78
|
|
79
|
<A NAME="constructor_summary"><!-- --></A>
|
80
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
81
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
82
|
<TD COLSPAN=2><FONT SIZE="+2">
|
83
|
<B>Constructor Summary</B></FONT></TD>
|
84
|
</TR>
|
85
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
86
|
<TD><CODE><B><A HREF="DBReader.html#DBReader(java.lang.String, java.lang.String, java.lang.String)">DBReader</A></B>(java.lang.String user,
|
87
|
java.lang.String password,
|
88
|
java.lang.String dbstring)</CODE>
|
89
|
|
90
|
<BR>
|
91
|
construct a DBReader instance.</TD>
|
92
|
</TR>
|
93
|
</TABLE>
|
94
|
|
95
|
<!-- ========== METHOD SUMMARY =========== -->
|
96
|
|
97
|
<A NAME="method_summary"><!-- --></A>
|
98
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
99
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
100
|
<TD COLSPAN=2><FONT SIZE="+2">
|
101
|
<B>Method Summary</B></FONT></TD>
|
102
|
</TR>
|
103
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
104
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
105
|
<CODE>static void</CODE></FONT></TD>
|
106
|
<TD><CODE><B><A HREF="DBReader.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE>
|
107
|
|
108
|
<BR>
|
109
|
main routine used for testing.</TD>
|
110
|
</TR>
|
111
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
112
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
113
|
<CODE> java.lang.String</CODE></FONT></TD>
|
114
|
<TD><CODE><B><A HREF="DBReader.html#readXMLDocument(long)">readXMLDocument</A></B>(long nodeid)</CODE>
|
115
|
|
116
|
<BR>
|
117
|
Create an XML document from the database starting with the element
|
118
|
having element_id nodeid</TD>
|
119
|
</TR>
|
120
|
</TABLE>
|
121
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
122
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
123
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
124
|
<TD><B>Methods inherited from class java.lang.Object</B></TD>
|
125
|
</TR>
|
126
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
127
|
<TD><CODE>clone,
|
128
|
equals,
|
129
|
finalize,
|
130
|
getClass,
|
131
|
hashCode,
|
132
|
notify,
|
133
|
notifyAll,
|
134
|
toString,
|
135
|
wait,
|
136
|
wait,
|
137
|
wait</CODE></TD>
|
138
|
</TR>
|
139
|
</TABLE>
|
140
|
|
141
|
<P>
|
142
|
|
143
|
<!-- ============ FIELD DETAIL =========== -->
|
144
|
|
145
|
|
146
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
147
|
|
148
|
<A NAME="constructor_detail"><!-- --></A>
|
149
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
150
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
151
|
<TD COLSPAN=1><FONT SIZE="+2">
|
152
|
<B>Constructor Detail</B></FONT></TD>
|
153
|
</TR>
|
154
|
</TABLE>
|
155
|
|
156
|
<A NAME="DBReader(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
|
157
|
DBReader</H3>
|
158
|
<PRE>
|
159
|
public <B>DBReader</B>(java.lang.String user,
|
160
|
java.lang.String password,
|
161
|
java.lang.String dbstring)
|
162
|
throws java.io.IOException,
|
163
|
java.sql.SQLException,
|
164
|
java.lang.ClassNotFoundException</PRE>
|
165
|
<DL>
|
166
|
<DD>construct a DBReader instance.
|
167
|
|
168
|
Generally, one calls readXMLDocument() after constructing the instance<DD><DL>
|
169
|
<DT><B>Parameters:</B><DD><CODE>user</CODE> - the username to use for the database connection<DD><CODE>password</CODE> - the password to use for the database connection<DD><CODE>dbstring</CODE> - the connection info to use for the database connection</DL>
|
170
|
</DD>
|
171
|
</DL>
|
172
|
|
173
|
<!-- ============ METHOD DETAIL ========== -->
|
174
|
|
175
|
<A NAME="method_detail"><!-- --></A>
|
176
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
177
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
178
|
<TD COLSPAN=1><FONT SIZE="+2">
|
179
|
<B>Method Detail</B></FONT></TD>
|
180
|
</TR>
|
181
|
</TABLE>
|
182
|
|
183
|
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
|
184
|
main</H3>
|
185
|
<PRE>
|
186
|
public static void <B>main</B>(java.lang.String[] args)</PRE>
|
187
|
<DL>
|
188
|
<DD>main routine used for testing.
|
189
|
|
190
|
Usage: java DBReader <nodeid> <user> <password> [dbstring]<DD><DL>
|
191
|
<DT><B>Parameters:</B><DD><CODE>nodeid</CODE> - the id number of the root of the subtree to display<DD><CODE>user</CODE> - the username to use for the database connection<DD><CODE>password</CODE> - the password to use for the database connection<DD><CODE>dbstring</CODE> - the connection info to use for the database connection</DL>
|
192
|
</DD>
|
193
|
</DL>
|
194
|
<HR>
|
195
|
|
196
|
<A NAME="readXMLDocument(long)"><!-- --></A><H3>
|
197
|
readXMLDocument</H3>
|
198
|
<PRE>
|
199
|
public java.lang.String <B>readXMLDocument</B>(long nodeid)</PRE>
|
200
|
<DL>
|
201
|
<DD>Create an XML document from the database starting with the element
|
202
|
having element_id nodeid<DD><DL>
|
203
|
<DT><B>Parameters:</B><DD><CODE>nodeid</CODE> - the node that will represent the root of the document</DL>
|
204
|
</DD>
|
205
|
</DL>
|
206
|
<!-- ========= END OF CLASS DATA ========= -->
|
207
|
<HR>
|
208
|
|
209
|
<!-- ========== START OF NAVBAR ========== -->
|
210
|
<A NAME="navbar_bottom"><!-- --></A>
|
211
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
212
|
<TR>
|
213
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
214
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
215
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
216
|
<TR ALIGN="center" VALIGN="top">
|
217
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
218
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
219
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
220
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
221
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
222
|
</TR>
|
223
|
</TABLE>
|
224
|
</TD>
|
225
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
226
|
</EM>
|
227
|
</TD>
|
228
|
</TR>
|
229
|
|
230
|
<TR>
|
231
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
232
|
<A HREF="BasicElement.html"><B>PREV CLASS</B></A>
|
233
|
<A HREF="DBSAXElement.html"><B>NEXT CLASS</B></A></FONT></TD>
|
234
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
235
|
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
236
|
<A HREF="DBReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
237
|
</TR>
|
238
|
<TR>
|
239
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
240
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
241
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
242
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
243
|
</TR>
|
244
|
</TABLE>
|
245
|
<!-- =========== END OF NAVBAR =========== -->
|
246
|
|
247
|
<HR>
|
248
|
|
249
|
</BODY>
|
250
|
</HTML>
|