Project

General

Profile

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

    
68
<P>
69
A Class that transforms XML documents utitlizing XSL style sheets
70
<P>
71
<HR>
72

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

    
76

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

    
79

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

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

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

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

    
109
<BR>
110
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
111
</TR>
112
<TR BGCOLOR="white" CLASS="TableRowColor">
113
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
114
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
115
<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,
116
            java.lang.String&nbsp;sourcetype,
117
            java.lang.String&nbsp;targettype)</CODE>
118

    
119
<BR>
120
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lookup a stylesheet reference from the db catalog</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/DBTransform.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 transform utility.</TD>
129
</TR>
130
<TR BGCOLOR="white" CLASS="TableRowColor">
131
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132
<CODE>&nbsp;void</CODE></FONT></TD>
133
<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,
134
                     java.lang.String&nbsp;sourcetype,
135
                     java.lang.String&nbsp;targettype,
136
                     java.io.PrintWriter&nbsp;pw)</CODE>
137

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

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

    
166

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

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

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

    
187
 Generally, one calls transformXMLDocument() after constructing the instance<DD><DL>
188
<DT><B>Parameters:</B><DD><CODE>conn</CODE> - the database connection from which to lookup the public ids</DL>
189
</DD>
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="transformXMLDocument(java.lang.String, java.lang.String, java.lang.String, java.io.PrintWriter)"><!-- --></A><H3>
203
transformXMLDocument</H3>
204
<PRE>
205
public void <B>transformXMLDocument</B>(java.lang.String&nbsp;doc,
206
                                 java.lang.String&nbsp;sourcetype,
207
                                 java.lang.String&nbsp;targettype,
208
                                 java.io.PrintWriter&nbsp;pw)</PRE>
209
<DL>
210
<DD>Transform an XML document using the stylesheet reference from the db<DD><DL>
211
<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>
212
</DD>
213
</DL>
214
<HR>
215

    
216
<A NAME="getSystemId(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
217
getSystemId</H3>
218
<PRE>
219
public java.lang.String <B>getSystemId</B>(java.lang.String&nbsp;objecttype,
220
                                    java.lang.String&nbsp;sourcetype,
221
                                    java.lang.String&nbsp;targettype)</PRE>
222
<DL>
223
<DD>Lookup a stylesheet reference from the db catalog<DD><DL>
224
<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>
225
</DD>
226
</DL>
227
<HR>
228

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

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

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

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

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

    
290
<HR>
291

    
292
</BODY>
293
</HTML>