Project

General

Profile

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 Mon Apr 17 15:23:39 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="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
22
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
23
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
24
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
25
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
26
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
27
  </TR>
28
</TABLE>
29
</TD>
30
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
31
</EM>
32
</TD>
33
</TR>
34

    
35
<TR>
36
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
37
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/BasicElement.html"><B>PREV CLASS</B></A>&nbsp;
38
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/DBSAXElement.html"><B>NEXT CLASS</B></A></FONT></TD>
39
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
40
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
41
&nbsp;<A HREF="DBReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
42
</TR>
43
<TR>
44
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
45
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
46
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
47
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
48
</TR>
49
</TABLE>
50
<!-- =========== END OF NAVBAR =========== -->
51

    
52
<HR>
53
<!-- ======== START OF CLASS DATA ======== -->
54
<H2>
55
<FONT SIZE="-1">
56
edu.ucsb.nceas.metacat</FONT>
57
<BR>
58
Class  DBReader</H2>
59
<PRE>
60
java.lang.Object
61
  |
62
  +--<B>edu.ucsb.nceas.metacat.DBReader</B>
63
</PRE>
64
<HR>
65
<DL>
66
<DT>public class <B>DBReader</B><DT>extends java.lang.Object</DL>
67

    
68
<P>
69
A Class that creates an XML text document
70
 from a query to a relational DB containing a DOM representation
71
<P>
72
<HR>
73

    
74
<P>
75
<!-- ======== INNER CLASS SUMMARY ======== -->
76

    
77

    
78
<!-- =========== FIELD SUMMARY =========== -->
79

    
80

    
81
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
82

    
83
<A NAME="constructor_summary"><!-- --></A>
84
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
85
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
86
<TD COLSPAN=2><FONT SIZE="+2">
87
<B>Constructor Summary</B></FONT></TD>
88
</TR>
89
<TR BGCOLOR="white" CLASS="TableRowColor">
90
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBReader.html#DBReader(java.sql.Connection)">DBReader</A></B>(java.sql.Connection&nbsp;conn)</CODE>
91

    
92
<BR>
93
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;construct a DBReader instance.</TD>
94
</TR>
95
</TABLE>
96
&nbsp;
97
<!-- ========== METHOD SUMMARY =========== -->
98

    
99
<A NAME="method_summary"><!-- --></A>
100
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
101
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
102
<TD COLSPAN=2><FONT SIZE="+2">
103
<B>Method Summary</B></FONT></TD>
104
</TR>
105
<TR BGCOLOR="white" CLASS="TableRowColor">
106
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
107
<CODE>static&nbsp;void</CODE></FONT></TD>
108
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBReader.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
109

    
110
<BR>
111
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;main routine used for testing.</TD>
112
</TR>
113
<TR BGCOLOR="white" CLASS="TableRowColor">
114
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
115
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
116
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBReader.html#readXMLDocument(long)">readXMLDocument</A></B>(long&nbsp;nodeid)</CODE>
117

    
118
<BR>
119
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an XML document from the database starting with the element 
120
 having element_id nodeid</TD>
121
</TR>
122
</TABLE>
123
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
124
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
125
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
126
<TD><B>Methods inherited from class java.lang.Object</B></TD>
127
</TR>
128
<TR BGCOLOR="white" CLASS="TableRowColor">
129
<TD><CODE>clone, 
130
equals, 
131
finalize, 
132
getClass, 
133
hashCode, 
134
notify, 
135
notifyAll, 
136
toString, 
137
wait, 
138
wait, 
139
wait</CODE></TD>
140
</TR>
141
</TABLE>
142
&nbsp;
143
<P>
144

    
145
<!-- ============ FIELD DETAIL =========== -->
146

    
147

    
148
<!-- ========= CONSTRUCTOR DETAIL ======== -->
149

    
150
<A NAME="constructor_detail"><!-- --></A>
151
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
152
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
153
<TD COLSPAN=1><FONT SIZE="+2">
154
<B>Constructor Detail</B></FONT></TD>
155
</TR>
156
</TABLE>
157

    
158
<A NAME="DBReader(java.sql.Connection)"><!-- --></A><H3>
159
DBReader</H3>
160
<PRE>
161
public <B>DBReader</B>(java.sql.Connection&nbsp;conn)
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>conn</CODE> - the database connection from which to read the document</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[]&nbsp;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&nbsp;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="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
218
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
219
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
220
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
221
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
222
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
223
  </TR>
224
</TABLE>
225
</TD>
226
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
227
</EM>
228
</TD>
229
</TR>
230

    
231
<TR>
232
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
233
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/BasicElement.html"><B>PREV CLASS</B></A>&nbsp;
234
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/DBSAXElement.html"><B>NEXT CLASS</B></A></FONT></TD>
235
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
236
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
237
&nbsp;<A HREF="DBReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
238
</TR>
239
<TR>
240
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
241
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
242
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
243
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
244
</TR>
245
</TABLE>
246
<!-- =========== END OF NAVBAR =========== -->
247

    
248
<HR>
249

    
250
</BODY>
251
</HTML>
(2-2/12)