Project

General

Profile

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

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 Sat May 20 14:25:42 AKDT 2000 -->
6
<TITLE>
7
: 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="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/DBSAXHandler.html"><B>PREV CLASS</B></A>&nbsp;
38
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/DBSimpleQuery.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="DBSAXWriter.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  DBSAXWriter</H2>
59
<PRE>
60
java.lang.Object
61
  |
62
  +--<B>edu.ucsb.nceas.metacat.DBSAXWriter</B>
63
</PRE>
64
<HR>
65
<DL>
66
<DT>public class <B>DBSAXWriter</B><DT>extends java.lang.Object</DL>
67

    
68
<P>
69
A Class that reads in an XML text document and
70
 write its contents to a database connection using SAX
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/DBSAXWriter.html#DBSAXWriter(java.io.Reader, java.sql.Connection)">DBSAXWriter</A></B>(java.io.Reader&nbsp;xml,
91
            java.sql.Connection&nbsp;conn)</CODE>
92

    
93
<BR>
94
&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>
95
</TR>
96
<TR BGCOLOR="white" CLASS="TableRowColor">
97
<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,
98
            java.sql.Connection&nbsp;conn)</CODE>
99

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

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

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

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

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

    
154

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

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

    
165
<A NAME="DBSAXWriter(java.io.Reader, java.sql.Connection)"><!-- --></A><H3>
166
DBSAXWriter</H3>
167
<PRE>
168
public <B>DBSAXWriter</B>(java.io.Reader&nbsp;xml,
169
                   java.sql.Connection&nbsp;conn)
170
            throws java.io.IOException,
171
                   java.sql.SQLException,
172
                   java.lang.ClassNotFoundException</PRE>
173
<DL>
174
<DD>construct a new instance of the class to write an XML file to the database<DD><DL>
175
<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>
176
</DD>
177
</DL>
178
<HR>
179

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

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

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

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

    
208
 Usage: java DBSAXWriter <filename> <user> <password> [dbstring]<DD><DL>
209
<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>
210
</DD>
211
</DL>
212
<HR>
213

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

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

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

    
262
<HR>
263

    
264
</BODY>
265
</HTML>