Project

General

Profile

metacat / docs / edu / ucsb / nceas / metacat / DBSAXWriter.html @ 138

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 Wed Jun 07 16:35:58 AKDT 2000 -->
6
<TITLE>
7
MetaCat API: Class  DBSAXWriter
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="class-use/DBSAXWriter.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
24
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
25
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
26
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
27
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
28
  </TR>
29
</TABLE>
30
</TD>
31
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
32
</EM>
33
</TD>
34
</TR>
35

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

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

    
69
<P>
70
A Class that reads in an XML text document and
71
 write its contents to a database connection using SAX
72
<P>
73
<HR>
74

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

    
78

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

    
81

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

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

    
94
<BR>
95
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;construct a new instance of the class to write an XML file to the database</TD>
96
</TR>
97
<TR BGCOLOR="white" CLASS="TableRowColor">
98
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBSAXWriter.html#DBSAXWriter(java.lang.String, java.sql.Connection)">DBSAXWriter</A></B>(java.lang.String&nbsp;filename,
99
            java.sql.Connection&nbsp;conn)</CODE>
100

    
101
<BR>
102
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
103
</TR>
104
</TABLE>
105
&nbsp;
106
<!-- ========== METHOD SUMMARY =========== -->
107

    
108
<A NAME="method_summary"><!-- --></A>
109
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
110
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
111
<TD COLSPAN=2><FONT SIZE="+2">
112
<B>Method Summary</B></FONT></TD>
113
</TR>
114
<TR BGCOLOR="white" CLASS="TableRowColor">
115
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
116
<CODE>static&nbsp;java.net.URL</CODE></FONT></TD>
117
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBSAXWriter.html#fileToURL(java.io.File)">fileToURL</A></B>(java.io.File&nbsp;file)</CODE>
118

    
119
<BR>
120
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to convert a file handle into a URL</TD>
121
</TR>
122
<TR BGCOLOR="white" CLASS="TableRowColor">
123
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
124
<CODE>static&nbsp;void</CODE></FONT></TD>
125
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBSAXWriter.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
126

    
127
<BR>
128
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the main routine used to test the DBSAXWriter utility.</TD>
129
</TR>
130
</TABLE>
131
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
132
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
133
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
134
<TD><B>Methods inherited from class java.lang.Object</B></TD>
135
</TR>
136
<TR BGCOLOR="white" CLASS="TableRowColor">
137
<TD><CODE>clone, 
138
equals, 
139
finalize, 
140
getClass, 
141
hashCode, 
142
notify, 
143
notifyAll, 
144
toString, 
145
wait, 
146
wait, 
147
wait</CODE></TD>
148
</TR>
149
</TABLE>
150
&nbsp;
151
<P>
152

    
153
<!-- ============ FIELD DETAIL =========== -->
154

    
155

    
156
<!-- ========= CONSTRUCTOR DETAIL ======== -->
157

    
158
<A NAME="constructor_detail"><!-- --></A>
159
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
160
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
161
<TD COLSPAN=1><FONT SIZE="+2">
162
<B>Constructor Detail</B></FONT></TD>
163
</TR>
164
</TABLE>
165

    
166
<A NAME="DBSAXWriter(java.io.Reader, java.sql.Connection)"><!-- --></A><H3>
167
DBSAXWriter</H3>
168
<PRE>
169
public <B>DBSAXWriter</B>(java.io.Reader&nbsp;xml,
170
                   java.sql.Connection&nbsp;conn)
171
            throws java.io.IOException,
172
                   java.sql.SQLException,
173
                   java.lang.ClassNotFoundException</PRE>
174
<DL>
175
<DD>construct a new instance of the class to write an XML file to the database<DD><DL>
176
<DT><B>Parameters:</B><DD><CODE>filename</CODE> - the filename to be loaded into the database<DD><CODE>conn</CODE> - the database connection to which to write the XML file</DL>
177
</DD>
178
</DL>
179
<HR>
180

    
181
<A NAME="DBSAXWriter(java.lang.String, java.sql.Connection)"><!-- --></A><H3>
182
DBSAXWriter</H3>
183
<PRE>
184
public <B>DBSAXWriter</B>(java.lang.String&nbsp;filename,
185
                   java.sql.Connection&nbsp;conn)
186
            throws java.io.IOException,
187
                   java.sql.SQLException,
188
                   java.lang.ClassNotFoundException</PRE>
189
<DL>
190
</DL>
191

    
192
<!-- ============ METHOD DETAIL ========== -->
193

    
194
<A NAME="method_detail"><!-- --></A>
195
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
196
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
197
<TD COLSPAN=1><FONT SIZE="+2">
198
<B>Method Detail</B></FONT></TD>
199
</TR>
200
</TABLE>
201

    
202
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
203
main</H3>
204
<PRE>
205
public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE>
206
<DL>
207
<DD>the main routine used to test the DBSAXWriter utility.
208

    
209
 Usage: java DBSAXWriter <filename> <user> <password> [dbstring]<DD><DL>
210
<DT><B>Parameters:</B><DD><CODE>filename</CODE> - the filename to be loaded into the database<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>
211
</DD>
212
</DL>
213
<HR>
214

    
215
<A NAME="fileToURL(java.io.File)"><!-- --></A><H3>
216
fileToURL</H3>
217
<PRE>
218
public static java.net.URL <B>fileToURL</B>(java.io.File&nbsp;file)</PRE>
219
<DL>
220
<DD>Utility method to convert a file handle into a URL</DL>
221
<!-- ========= END OF CLASS DATA ========= -->
222
<HR>
223

    
224
<!-- ========== START OF NAVBAR ========== -->
225
<A NAME="navbar_bottom"><!-- --></A>
226
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
227
<TR>
228
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
229
<A NAME="navbar_bottom_firstrow"><!-- --></A>
230
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
231
  <TR ALIGN="center" VALIGN="top">
232
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
233
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
234
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DBSAXWriter.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
235
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
236
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
237
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
238
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
239
  </TR>
240
</TABLE>
241
</TD>
242
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
243
</EM>
244
</TD>
245
</TR>
246

    
247
<TR>
248
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
249
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/DBSAXNode.html"><B>PREV CLASS</B></A>&nbsp;
250
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/DBSimpleQuery.html"><B>NEXT CLASS</B></A></FONT></TD>
251
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
252
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
253
&nbsp;<A HREF="DBSAXWriter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
254
</TR>
255
<TR>
256
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
257
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
258
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
259
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
260
</TR>
261
</TABLE>
262
<!-- =========== END OF NAVBAR =========== -->
263

    
264
<HR>
265
<i>Copyright ? 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>
266
</BODY>
267
</HTML>