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

    
68
<P>
69
A Class that searches a relational DB for elements and attributes that
70
 have free text matches to the query string.  It returns a result set 
71
 consisting of the root nodeid for each document that satisfies the query
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/DBSimpleQuery.html#DBSimpleQuery(java.sql.Connection)">DBSimpleQuery</A></B>(java.sql.Connection&nbsp;conn)</CODE>
92

    
93
<BR>
94
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;construct an instance of the DBSimpleQuery class 
95

    
96
 </TD>
97
</TR>
98
</TABLE>
99
&nbsp;
100
<!-- ========== METHOD SUMMARY =========== -->
101

    
102
<A NAME="method_summary"><!-- --></A>
103
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
104
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
105
<TD COLSPAN=2><FONT SIZE="+2">
106
<B>Method Summary</B></FONT></TD>
107
</TR>
108
<TR BGCOLOR="white" CLASS="TableRowColor">
109
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
110
<CODE>&nbsp;java.util.Hashtable</CODE></FONT></TD>
111
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBSimpleQuery.html#findRootNodes(java.lang.String)">findRootNodes</A></B>(java.lang.String&nbsp;query)</CODE>
112

    
113
<BR>
114
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;routine to search the elements and attributes looking to match query</TD>
115
</TR>
116
<TR BGCOLOR="white" CLASS="TableRowColor">
117
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
118
<CODE>static&nbsp;void</CODE></FONT></TD>
119
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBSimpleQuery.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
120

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

    
147
<!-- ============ FIELD DETAIL =========== -->
148

    
149

    
150
<!-- ========= CONSTRUCTOR DETAIL ======== -->
151

    
152
<A NAME="constructor_detail"><!-- --></A>
153
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
154
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
155
<TD COLSPAN=1><FONT SIZE="+2">
156
<B>Constructor Detail</B></FONT></TD>
157
</TR>
158
</TABLE>
159

    
160
<A NAME="DBSimpleQuery(java.sql.Connection)"><!-- --></A><H3>
161
DBSimpleQuery</H3>
162
<PRE>
163
public <B>DBSimpleQuery</B>(java.sql.Connection&nbsp;conn)
164
              throws java.io.IOException,
165
                     java.sql.SQLException,
166
                     java.lang.ClassNotFoundException</PRE>
167
<DL>
168
<DD>construct an instance of the DBSimpleQuery class 
169

    
170
 <p>Generally, one would call the findRootNodes() routine after creating 
171
 an instance to specify the search query</p><DD><DL>
172
<DT><B>Parameters:</B><DD><CODE>conn</CODE> - the JDBC connection that we use for the query</DL>
173
</DD>
174
</DL>
175

    
176
<!-- ============ METHOD DETAIL ========== -->
177

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

    
186
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
187
main</H3>
188
<PRE>
189
public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE>
190
<DL>
191
<DD>the main routine used to test the DBSimpleQuery utility.
192

    
193
 Usage: java DBSimpleQuery <query> <user> <password> [dbstring]<DD><DL>
194
<DT><B>Parameters:</B><DD><CODE>query</CODE> - the text to search for in the element and attribute content<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>
195
</DD>
196
</DL>
197
<HR>
198

    
199
<A NAME="findRootNodes(java.lang.String)"><!-- --></A><H3>
200
findRootNodes</H3>
201
<PRE>
202
public java.util.Hashtable <B>findRootNodes</B>(java.lang.String&nbsp;query)</PRE>
203
<DL>
204
<DD>routine to search the elements and attributes looking to match query<DD><DL>
205
<DT><B>Parameters:</B><DD><CODE>query</CODE> - the text to search for</DL>
206
</DD>
207
</DL>
208
<!-- ========= END OF CLASS DATA ========= -->
209
<HR>
210

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

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

    
250
<HR>
251

    
252
</BODY>
253
</HTML>
(6-6/12)