Project

General

Profile

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

    
69
<P>
70
A Class that searches a relational DB for elements and attributes that
71
 have free text matches to the query string.  It returns a result set 
72
 consisting of the root nodeid for each document that satisfies the query
73
<P>
74
<HR>
75

    
76
<P>
77
<!-- ======== INNER CLASS SUMMARY ======== -->
78

    
79

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

    
82

    
83
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
84

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

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

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

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

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

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

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

    
150

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

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

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

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

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

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

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

    
194
 Usage: java DBSimpleQuery <query> <user> <password> [dbstring]<DD><DL>
195
<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>
196
</DD>
197
</DL>
198
<HR>
199

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

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

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

    
252
<HR>
253
<i>Copyright ? 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>
254
</BODY>
255
</HTML>