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:40 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.lang.String, java.sql.Connection)">DBSAXWriter</A></B>(java.lang.String&nbsp;filename,
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
</TABLE>
97
&nbsp;
98
<!-- ========== METHOD SUMMARY =========== -->
99

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

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

    
119
<BR>
120
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the main routine used to test the DBSAXWriter utility.</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="DBSAXWriter(java.lang.String, java.sql.Connection)"><!-- --></A><H3>
159
DBSAXWriter</H3>
160
<PRE>
161
public <B>DBSAXWriter</B>(java.lang.String&nbsp;filename,
162
                   java.sql.Connection&nbsp;conn)
163
            throws java.io.IOException,
164
                   java.sql.SQLException,
165
                   java.lang.ClassNotFoundException</PRE>
166
<DL>
167
<DD>construct a new instance of the class to write an XML file to the database<DD><DL>
168
<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>
169
</DD>
170
</DL>
171

    
172
<!-- ============ METHOD DETAIL ========== -->
173

    
174
<A NAME="method_detail"><!-- --></A>
175
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
176
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
177
<TD COLSPAN=1><FONT SIZE="+2">
178
<B>Method Detail</B></FONT></TD>
179
</TR>
180
</TABLE>
181

    
182
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
183
main</H3>
184
<PRE>
185
public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE>
186
<DL>
187
<DD>the main routine used to test the DBSAXWriter utility.
188

    
189
 Usage: java DBSAXWriter <filename> <user> <password> [dbstring]<DD><DL>
190
<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>
191
</DD>
192
</DL>
193
<HR>
194

    
195
<A NAME="fileToURL(java.io.File)"><!-- --></A><H3>
196
fileToURL</H3>
197
<PRE>
198
public static java.net.URL <B>fileToURL</B>(java.io.File&nbsp;file)</PRE>
199
<DL>
200
<DD>Utility method to convert a file handle into a URL</DL>
201
<!-- ========= END OF CLASS DATA ========= -->
202
<HR>
203

    
204
<!-- ========== START OF NAVBAR ========== -->
205
<A NAME="navbar_bottom"><!-- --></A>
206
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
207
<TR>
208
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
209
<A NAME="navbar_bottom_firstrow"><!-- --></A>
210
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
211
  <TR ALIGN="center" VALIGN="top">
212
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
213
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
214
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
215
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
216
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
217
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
218
  </TR>
219
</TABLE>
220
</TD>
221
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
222
</EM>
223
</TD>
224
</TR>
225

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

    
243
<HR>
244

    
245
</BODY>
246
</HTML>
(5-5/12)