Project

General

Profile

metacat / docs / edu / ucsb / nceas / metacat / DBTransform.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  DBTransform
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/DBTransform.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/DBSimpleQuery.html"><B>PREV CLASS</B></A>&nbsp;
39
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/ElementNode.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="DBTransform.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  DBTransform</H2>
60
<PRE>
61
java.lang.Object
62
  |
63
  +--<B>edu.ucsb.nceas.metacat.DBTransform</B>
64
</PRE>
65
<HR>
66
<DL>
67
<DT>public class <B>DBTransform</B><DT>extends java.lang.Object</DL>
68

    
69
<P>
70
A Class that transforms XML documents utitlizing XSL style sheets
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/DBTransform.html#DBTransform(java.sql.Connection)">DBTransform</A></B>(java.sql.Connection&nbsp;conn)</CODE>
91

    
92
<BR>
93
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;construct a DBTransform 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>&nbsp;void</CODE></FONT></TD>
108
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBTransform.html#dbg(int)">dbg</A></B>(int&nbsp;position)</CODE>
109

    
110
<BR>
111
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/DBTransform.html#getSystemId(java.lang.String, java.lang.String, java.lang.String)">getSystemId</A></B>(java.lang.String&nbsp;objecttype,
117
            java.lang.String&nbsp;sourcetype,
118
            java.lang.String&nbsp;targettype)</CODE>
119

    
120
<BR>
121
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lookup a stylesheet reference from the db catalog</TD>
122
</TR>
123
<TR BGCOLOR="white" CLASS="TableRowColor">
124
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
125
<CODE>static&nbsp;void</CODE></FONT></TD>
126
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBTransform.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
127

    
128
<BR>
129
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the main routine used to test the transform utility.</TD>
130
</TR>
131
<TR BGCOLOR="white" CLASS="TableRowColor">
132
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133
<CODE>&nbsp;void</CODE></FONT></TD>
134
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBTransform.html#transformXMLDocument(java.lang.String, java.lang.String, java.lang.String, java.io.PrintWriter)">transformXMLDocument</A></B>(java.lang.String&nbsp;doc,
135
                     java.lang.String&nbsp;sourcetype,
136
                     java.lang.String&nbsp;targettype,
137
                     java.io.PrintWriter&nbsp;pw)</CODE>
138

    
139
<BR>
140
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transform an XML document using the stylesheet reference from the db</TD>
141
</TR>
142
</TABLE>
143
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
144
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
145
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
146
<TD><B>Methods inherited from class java.lang.Object</B></TD>
147
</TR>
148
<TR BGCOLOR="white" CLASS="TableRowColor">
149
<TD><CODE>clone, 
150
equals, 
151
finalize, 
152
getClass, 
153
hashCode, 
154
notify, 
155
notifyAll, 
156
toString, 
157
wait, 
158
wait, 
159
wait</CODE></TD>
160
</TR>
161
</TABLE>
162
&nbsp;
163
<P>
164

    
165
<!-- ============ FIELD DETAIL =========== -->
166

    
167

    
168
<!-- ========= CONSTRUCTOR DETAIL ======== -->
169

    
170
<A NAME="constructor_detail"><!-- --></A>
171
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
172
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
173
<TD COLSPAN=1><FONT SIZE="+2">
174
<B>Constructor Detail</B></FONT></TD>
175
</TR>
176
</TABLE>
177

    
178
<A NAME="DBTransform(java.sql.Connection)"><!-- --></A><H3>
179
DBTransform</H3>
180
<PRE>
181
public <B>DBTransform</B>(java.sql.Connection&nbsp;conn)
182
            throws java.io.IOException,
183
                   java.sql.SQLException,
184
                   java.lang.ClassNotFoundException</PRE>
185
<DL>
186
<DD>construct a DBTransform instance.
187

    
188
 Generally, one calls transformXMLDocument() after constructing the instance<DD><DL>
189
<DT><B>Parameters:</B><DD><CODE>conn</CODE> - the database connection from which to lookup the public ids</DL>
190
</DD>
191
</DL>
192

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

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

    
203
<A NAME="transformXMLDocument(java.lang.String, java.lang.String, java.lang.String, java.io.PrintWriter)"><!-- --></A><H3>
204
transformXMLDocument</H3>
205
<PRE>
206
public void <B>transformXMLDocument</B>(java.lang.String&nbsp;doc,
207
                                 java.lang.String&nbsp;sourcetype,
208
                                 java.lang.String&nbsp;targettype,
209
                                 java.io.PrintWriter&nbsp;pw)</PRE>
210
<DL>
211
<DD>Transform an XML document using the stylesheet reference from the db<DD><DL>
212
<DT><B>Parameters:</B><DD><CODE>doc</CODE> - the document to be transformed<DD><CODE>sourcetype</CODE> - the document type of the source<DD><CODE>targettype</CODE> - the target document type</DL>
213
</DD>
214
</DL>
215
<HR>
216

    
217
<A NAME="getSystemId(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
218
getSystemId</H3>
219
<PRE>
220
public java.lang.String <B>getSystemId</B>(java.lang.String&nbsp;objecttype,
221
                                    java.lang.String&nbsp;sourcetype,
222
                                    java.lang.String&nbsp;targettype)</PRE>
223
<DL>
224
<DD>Lookup a stylesheet reference from the db catalog<DD><DL>
225
<DT><B>Parameters:</B><DD><CODE>objecttype</CODE> - the type of the object we want to retrieve<DD><CODE>sourcetype</CODE> - the document type of the source<DD><CODE>targettype</CODE> - the document type of the target</DL>
226
</DD>
227
</DL>
228
<HR>
229

    
230
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
231
main</H3>
232
<PRE>
233
public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE>
234
<DL>
235
<DD>the main routine used to test the transform utility.
236

    
237
 Usage: java transform <user> <password> [dbstring]<DD><DL>
238
<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>
239
</DD>
240
</DL>
241
<HR>
242

    
243
<A NAME="dbg(int)"><!-- --></A><H3>
244
dbg</H3>
245
<PRE>
246
public void <B>dbg</B>(int&nbsp;position)</PRE>
247
<DL>
248
</DL>
249
<!-- ========= END OF CLASS DATA ========= -->
250
<HR>
251

    
252
<!-- ========== START OF NAVBAR ========== -->
253
<A NAME="navbar_bottom"><!-- --></A>
254
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
255
<TR>
256
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
257
<A NAME="navbar_bottom_firstrow"><!-- --></A>
258
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
259
  <TR ALIGN="center" VALIGN="top">
260
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
261
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
262
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DBTransform.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
263
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
264
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
265
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
266
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
267
  </TR>
268
</TABLE>
269
</TD>
270
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
271
</EM>
272
</TD>
273
</TR>
274

    
275
<TR>
276
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
277
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/DBSimpleQuery.html"><B>PREV CLASS</B></A>&nbsp;
278
&nbsp;<A HREF="../../../../edu/ucsb/nceas/metacat/ElementNode.html"><B>NEXT CLASS</B></A></FONT></TD>
279
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
280
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
281
&nbsp;<A HREF="DBTransform.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
282
</TR>
283
<TR>
284
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
285
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
286
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
287
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
288
</TR>
289
</TABLE>
290
<!-- =========== END OF NAVBAR =========== -->
291

    
292
<HR>
293
<i>Copyright ? 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>
294
</BODY>
295
</HTML>