1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
2 | <!--NewPage-->
|
---|
3 | <HTML>
|
---|
4 | <HEAD>
|
---|
5 | <!-- Generated by javadoc (build 1.5.0_10) on Sun Apr 27 20:42:39 NZST 2008 -->
|
---|
6 | <TITLE>
|
---|
7 | GSearchConnection
|
---|
8 | </TITLE>
|
---|
9 |
|
---|
10 | <META NAME="keywords" CONTENT="org.greenstone.fedora.services.GSearchConnection class">
|
---|
11 |
|
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
---|
13 |
|
---|
14 | <SCRIPT type="text/javascript">
|
---|
15 | function windowTitle()
|
---|
16 | {
|
---|
17 | parent.document.title="GSearchConnection";
|
---|
18 | }
|
---|
19 | </SCRIPT>
|
---|
20 | <NOSCRIPT>
|
---|
21 | </NOSCRIPT>
|
---|
22 |
|
---|
23 | </HEAD>
|
---|
24 |
|
---|
25 | <BODY BGCOLOR="white" onload="windowTitle();">
|
---|
26 |
|
---|
27 |
|
---|
28 | <!-- ========= START OF TOP NAVBAR ======= -->
|
---|
29 | <A NAME="navbar_top"><!-- --></A>
|
---|
30 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
---|
31 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
32 | <TR>
|
---|
33 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
34 | <A NAME="navbar_top_firstrow"><!-- --></A>
|
---|
35 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
36 | <TR ALIGN="center" VALIGN="top">
|
---|
37 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../org/greenstone/fedora/services/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
38 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
39 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
42 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
43 | </TR>
|
---|
44 | </TABLE>
|
---|
45 | </TD>
|
---|
46 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
47 | </EM>
|
---|
48 | </TD>
|
---|
49 | </TR>
|
---|
50 |
|
---|
51 | <TR>
|
---|
52 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
53 | <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html" title="interface in org.greenstone.fedora.services"><B>PREV CLASS</B></A>
|
---|
54 | NEXT CLASS</FONT></TD>
|
---|
55 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
56 | <A HREF="../../../../index.html?org/greenstone/fedora/services/GSearchConnection.html" target="_top"><B>FRAMES</B></A>
|
---|
57 | <A HREF="GSearchConnection.html" target="_top"><B>NO FRAMES</B></A>
|
---|
58 | <SCRIPT type="text/javascript">
|
---|
59 | <!--
|
---|
60 | if(window==top) {
|
---|
61 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
62 | }
|
---|
63 | //-->
|
---|
64 | </SCRIPT>
|
---|
65 | <NOSCRIPT>
|
---|
66 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
67 | </NOSCRIPT>
|
---|
68 |
|
---|
69 |
|
---|
70 | </FONT></TD>
|
---|
71 | </TR>
|
---|
72 | <TR>
|
---|
73 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
74 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
75 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
76 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
77 | </TR>
|
---|
78 | </TABLE>
|
---|
79 | <A NAME="skip-navbar_top"></A>
|
---|
80 | <!-- ========= END OF TOP NAVBAR ========= -->
|
---|
81 |
|
---|
82 | <HR>
|
---|
83 | <!-- ======== START OF CLASS DATA ======== -->
|
---|
84 | <H2>
|
---|
85 | <FONT SIZE="-1">
|
---|
86 | org.greenstone.fedora.services</FONT>
|
---|
87 | <BR>
|
---|
88 | Class GSearchConnection</H2>
|
---|
89 | <PRE>
|
---|
90 | java.lang.Object
|
---|
91 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.greenstone.fedora.services.GSearchConnection</B>
|
---|
92 | </PRE>
|
---|
93 | <DL>
|
---|
94 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html" title="interface in org.greenstone.fedora.services">FedoraToGS3Interface.Constants</A></DD>
|
---|
95 | </DL>
|
---|
96 | <HR>
|
---|
97 | <DL>
|
---|
98 | <DT><PRE>public class <B>GSearchConnection</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html" title="interface in org.greenstone.fedora.services">FedoraToGS3Interface.Constants</A></DL>
|
---|
99 | </PRE>
|
---|
100 |
|
---|
101 | <P>
|
---|
102 | Class GSearchConnection connects to FedoraGSearch's web services.
|
---|
103 | FedorGSearch offers indexing and full-text search functionality for
|
---|
104 | Fedora repositories. Its search web service (method gFindObjects)
|
---|
105 | returns the response of a search as XML.
|
---|
106 | GSearchConnection offers more convenient methods that extract just
|
---|
107 | the parts of search results that FedoraGS3Connection needs and returns
|
---|
108 | that.
|
---|
109 | <P>
|
---|
110 |
|
---|
111 | <P>
|
---|
112 | <DL>
|
---|
113 | <DT><B>Author:</B></DT>
|
---|
114 | <DD>ak19</DD>
|
---|
115 | </DL>
|
---|
116 | <HR>
|
---|
117 |
|
---|
118 | <P>
|
---|
119 | <!-- =========== FIELD SUMMARY =========== -->
|
---|
120 |
|
---|
121 | <A NAME="field_summary"><!-- --></A>
|
---|
122 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
123 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
124 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
---|
125 | <B>Field Summary</B></FONT></TH>
|
---|
126 | </TR>
|
---|
127 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
128 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
129 | <CODE>protected javax.xml.parsers.DocumentBuilder</CODE></FONT></TD>
|
---|
130 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#builder">builder</A></B></CODE>
|
---|
131 |
|
---|
132 | <BR>
|
---|
133 | A DocumentBuilder object used to construct and parse XML</TD>
|
---|
134 | </TR>
|
---|
135 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
136 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
137 | <CODE>protected org.apache.axis.client.Call</CODE></FONT></TD>
|
---|
138 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#call">call</A></B></CODE>
|
---|
139 |
|
---|
140 | <BR>
|
---|
141 | The Call object used to connect to the FedoraGSearch web services</TD>
|
---|
142 | </TR>
|
---|
143 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
144 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
145 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
146 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#DC_TITLE_FIELD">DC_TITLE_FIELD</A></B></CODE>
|
---|
147 |
|
---|
148 | <BR>
|
---|
149 | </TD>
|
---|
150 | </TR>
|
---|
151 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
152 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
153 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
154 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#FIELD">FIELD</A></B></CODE>
|
---|
155 |
|
---|
156 | <BR>
|
---|
157 | </TD>
|
---|
158 | </TR>
|
---|
159 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
160 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
161 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
162 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#FULLTEXT_FIELD">FULLTEXT_FIELD</A></B></CODE>
|
---|
163 |
|
---|
164 | <BR>
|
---|
165 | </TD>
|
---|
166 | </TR>
|
---|
167 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
168 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
169 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
170 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#G_FIND_OBJECTS">G_FIND_OBJECTS</A></B></CODE>
|
---|
171 |
|
---|
172 | <BR>
|
---|
173 | The names of the methods we use of Fedora Generic Search's web services
|
---|
174 | are declared here as static final Strings.</TD>
|
---|
175 | </TR>
|
---|
176 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
177 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
178 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
179 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#HIT_TOTAL">HIT_TOTAL</A></B></CODE>
|
---|
180 |
|
---|
181 | <BR>
|
---|
182 | </TD>
|
---|
183 | </TR>
|
---|
184 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
185 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
186 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
187 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#INDEX_NAME">INDEX_NAME</A></B></CODE>
|
---|
188 |
|
---|
189 | <BR>
|
---|
190 | </TD>
|
---|
191 | </TR>
|
---|
192 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
193 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
194 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
195 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#NAME">NAME</A></B></CODE>
|
---|
196 |
|
---|
197 | <BR>
|
---|
198 | </TD>
|
---|
199 | </TR>
|
---|
200 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
201 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
202 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
203 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#NAMESPACE_URI">NAMESPACE_URI</A></B></CODE>
|
---|
204 |
|
---|
205 | <BR>
|
---|
206 | </TD>
|
---|
207 | </TR>
|
---|
208 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
209 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
210 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
211 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#OBJECT">OBJECT</A></B></CODE>
|
---|
212 |
|
---|
213 | <BR>
|
---|
214 | </TD>
|
---|
215 | </TR>
|
---|
216 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
217 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
218 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
219 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#PID">PID</A></B></CODE>
|
---|
220 |
|
---|
221 | <BR>
|
---|
222 | </TD>
|
---|
223 | </TR>
|
---|
224 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
225 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
226 | <CODE>protected javax.xml.namespace.QName</CODE></FONT></TD>
|
---|
227 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#portName">portName</A></B></CODE>
|
---|
228 |
|
---|
229 | <BR>
|
---|
230 | The portName object used when connecting to FedoraGSearch's web services</TD>
|
---|
231 | </TR>
|
---|
232 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
233 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
234 | <CODE>protected org.apache.axis.client.Service</CODE></FONT></TD>
|
---|
235 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#service">service</A></B></CODE>
|
---|
236 |
|
---|
237 | <BR>
|
---|
238 | The Service object used to connect to the FedoraGSearch web services</TD>
|
---|
239 | </TR>
|
---|
240 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
241 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
242 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
243 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#SERVICE_NAME">SERVICE_NAME</A></B></CODE>
|
---|
244 |
|
---|
245 | <BR>
|
---|
246 | </TD>
|
---|
247 | </TR>
|
---|
248 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
249 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
250 | <CODE>protected static java.lang.String</CODE></FONT></TD>
|
---|
251 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#SPACE">SPACE</A></B></CODE>
|
---|
252 |
|
---|
253 | <BR>
|
---|
254 | separator used internally to separate values of a search field</TD>
|
---|
255 | </TR>
|
---|
256 | </TABLE>
|
---|
257 | <A NAME="fields_inherited_from_class_org.greenstone.fedora.services.FedoraToGS3Interface.Constants"><!-- --></A>
|
---|
258 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
259 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
260 | <TH ALIGN="left"><B>Fields inherited from interface org.greenstone.fedora.services.<A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html" title="interface in org.greenstone.fedora.services">FedoraToGS3Interface.Constants</A></B></TH>
|
---|
261 | </TR>
|
---|
262 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
263 | <TD><CODE><A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#ALL_FIELDS">ALL_FIELDS</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#ALL_TITLES">ALL_TITLES</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#ASSOCFILEPREFIX">ASSOCFILEPREFIX</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#COMMA">COMMA</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#DOC_TITLES">DOC_TITLES</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#FIELDNAME_ATT">FIELDNAME_ATT</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#FULLTEXT">FULLTEXT</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#GS3FilePathMacro">GS3FilePathMacro</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#MAXDOCS">MAXDOCS</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#NUM_DOCS_MATCHED">NUM_DOCS_MATCHED</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#OCCURS_ATT">OCCURS_ATT</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#QUERY">QUERY</A>, <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html#SIMPLEFIELD_ATT">SIMPLEFIELD_ATT</A></CODE></TD>
|
---|
264 | </TR>
|
---|
265 | </TABLE>
|
---|
266 |
|
---|
267 | <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
---|
268 |
|
---|
269 | <A NAME="constructor_summary"><!-- --></A>
|
---|
270 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
271 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
272 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
---|
273 | <B>Constructor Summary</B></FONT></TH>
|
---|
274 | </TR>
|
---|
275 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
276 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#GSearchConnection(java.lang.String)">GSearchConnection</A></B>(java.lang.String wsdlFileLocation)</CODE>
|
---|
277 |
|
---|
278 | <BR>
|
---|
279 | Constructor that takes a String representing the url of the WSDL
|
---|
280 | file for FedoraGSearch's web services, and tries to establish a
|
---|
281 | connection to those web services.</TD>
|
---|
282 | </TR>
|
---|
283 | </TABLE>
|
---|
284 |
|
---|
285 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
286 |
|
---|
287 | <A NAME="method_summary"><!-- --></A>
|
---|
288 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
289 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
290 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
---|
291 | <B>Method Summary</B></FONT></TH>
|
---|
292 | </TR>
|
---|
293 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
294 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
295 | <CODE>protected java.lang.String</CODE></FONT></TD>
|
---|
296 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#formatSearchTermsInField(java.lang.String, java.lang.String)">formatSearchTermsInField</A></B>(java.lang.String field,
|
---|
297 | java.lang.String fieldName)</CODE>
|
---|
298 |
|
---|
299 | <BR>
|
---|
300 | Each field is a comma separated list of terms that may be either a word
|
---|
301 | OR a phrase.</TD>
|
---|
302 | </TR>
|
---|
303 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
304 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
305 | <CODE> java.lang.String[]</CODE></FONT></TD>
|
---|
306 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#getPIDsFromSearchResult(java.lang.String, java.lang.String)">getPIDsFromSearchResult</A></B>(java.lang.String collectionName,
|
---|
307 | java.lang.String searchResult)</CODE>
|
---|
308 |
|
---|
309 | <BR>
|
---|
310 | Call this method with the return value of calling search().</TD>
|
---|
311 | </TR>
|
---|
312 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
313 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
314 | <CODE>protected java.lang.String</CODE></FONT></TD>
|
---|
315 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#gFindObjects(java.lang.String, java.lang.String, int, int, int, int, java.lang.String, java.lang.String)">gFindObjects</A></B>(java.lang.String searchFieldedTerms,
|
---|
316 | java.lang.String sort,
|
---|
317 | int hitPageStart,
|
---|
318 | int hitPageSize,
|
---|
319 | int snippetsMax,
|
---|
320 | int fieldMaxLength,
|
---|
321 | java.lang.String indexName,
|
---|
322 | java.lang.String resultPageXslt)</CODE>
|
---|
323 |
|
---|
324 | <BR>
|
---|
325 | Method to invoke gfindObjects operation of Fedora Generic Search
|
---|
326 | web services.</TD>
|
---|
327 | </TR>
|
---|
328 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
329 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
330 | <CODE>static void</CODE></FONT></TD>
|
---|
331 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE>
|
---|
332 |
|
---|
333 | <BR>
|
---|
334 | </TD>
|
---|
335 | </TR>
|
---|
336 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
337 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
338 | <CODE> java.lang.String</CODE></FONT></TD>
|
---|
339 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#search(java.util.Map, int, int)">search</A></B>(java.util.Map fieldsToSearchTerms,
|
---|
340 | int hitPageStart,
|
---|
341 | int hitPageSize)</CODE>
|
---|
342 |
|
---|
343 | <BR>
|
---|
344 | FedoraGSearch accepts a query of the form:
|
---|
345 | <code><"cyclone val" "Gender Inequalities" ds.fulltext:"cyclone val"
|
---|
346 | ds.fulltext:"worst storm"></code>
|
---|
347 | where the first two phrases are searched for in all indexed fields,
|
---|
348 | (in this case dc.title and ds.fulltext), while the last two are
|
---|
349 | searched for in the ds.fulltext field.</TD>
|
---|
350 | </TR>
|
---|
351 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
352 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
353 | <CODE> java.lang.String</CODE></FONT></TD>
|
---|
354 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#search(java.lang.String, int, int, int)">search</A></B>(java.lang.String fieldedSearchTerms,
|
---|
355 | int hitPageStart,
|
---|
356 | int hitPageSize,
|
---|
357 | int snippetsMax)</CODE>
|
---|
358 |
|
---|
359 | <BR>
|
---|
360 | Uses FedoraGSearch to perform a search where the query is embedded in
|
---|
361 | fieldedSearchTerms, which not only provides the terms to search on, but
|
---|
362 | also the fields to search the (various) given terms in.</TD>
|
---|
363 | </TR>
|
---|
364 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
365 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
366 | <CODE> java.lang.String</CODE></FONT></TD>
|
---|
367 | <TD><CODE><B><A HREF="../../../../org/greenstone/fedora/services/GSearchConnection.html#search(java.lang.String, java.lang.String, int, int, int)">search</A></B>(java.lang.String searchFieldName,
|
---|
368 | java.lang.String searchTerm,
|
---|
369 | int hitPageStart,
|
---|
370 | int hitPageSize,
|
---|
371 | int snippetsMax)</CODE>
|
---|
372 |
|
---|
373 | <BR>
|
---|
374 | Method that performs a search for the given searchTerm inside the given
|
---|
375 | indexed field.</TD>
|
---|
376 | </TR>
|
---|
377 | </TABLE>
|
---|
378 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
---|
379 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
380 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
381 | <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
---|
382 | </TR>
|
---|
383 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
384 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
---|
385 | </TR>
|
---|
386 | </TABLE>
|
---|
387 |
|
---|
388 | <P>
|
---|
389 |
|
---|
390 | <!-- ============ FIELD DETAIL =========== -->
|
---|
391 |
|
---|
392 | <A NAME="field_detail"><!-- --></A>
|
---|
393 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
394 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
395 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
---|
396 | <B>Field Detail</B></FONT></TH>
|
---|
397 | </TR>
|
---|
398 | </TABLE>
|
---|
399 |
|
---|
400 | <A NAME="NAMESPACE_URI"><!-- --></A><H3>
|
---|
401 | NAMESPACE_URI</H3>
|
---|
402 | <PRE>
|
---|
403 | protected static java.lang.String <B>NAMESPACE_URI</B></PRE>
|
---|
404 | <DL>
|
---|
405 | <DL>
|
---|
406 | </DL>
|
---|
407 | </DL>
|
---|
408 | <HR>
|
---|
409 |
|
---|
410 | <A NAME="SERVICE_NAME"><!-- --></A><H3>
|
---|
411 | SERVICE_NAME</H3>
|
---|
412 | <PRE>
|
---|
413 | protected static java.lang.String <B>SERVICE_NAME</B></PRE>
|
---|
414 | <DL>
|
---|
415 | <DL>
|
---|
416 | </DL>
|
---|
417 | </DL>
|
---|
418 | <HR>
|
---|
419 |
|
---|
420 | <A NAME="INDEX_NAME"><!-- --></A><H3>
|
---|
421 | INDEX_NAME</H3>
|
---|
422 | <PRE>
|
---|
423 | protected static final java.lang.String <B>INDEX_NAME</B></PRE>
|
---|
424 | <DL>
|
---|
425 | <DL>
|
---|
426 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.INDEX_NAME">Constant Field Values</A></DL>
|
---|
427 | </DL>
|
---|
428 | <HR>
|
---|
429 |
|
---|
430 | <A NAME="G_FIND_OBJECTS"><!-- --></A><H3>
|
---|
431 | G_FIND_OBJECTS</H3>
|
---|
432 | <PRE>
|
---|
433 | protected static final java.lang.String <B>G_FIND_OBJECTS</B></PRE>
|
---|
434 | <DL>
|
---|
435 | <DD>The names of the methods we use of Fedora Generic Search's web services
|
---|
436 | are declared here as static final Strings.
|
---|
437 | <P>
|
---|
438 | <DL>
|
---|
439 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.G_FIND_OBJECTS">Constant Field Values</A></DL>
|
---|
440 | </DL>
|
---|
441 | <HR>
|
---|
442 |
|
---|
443 | <A NAME="PID"><!-- --></A><H3>
|
---|
444 | PID</H3>
|
---|
445 | <PRE>
|
---|
446 | protected static final java.lang.String <B>PID</B></PRE>
|
---|
447 | <DL>
|
---|
448 | <DL>
|
---|
449 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.PID">Constant Field Values</A></DL>
|
---|
450 | </DL>
|
---|
451 | <HR>
|
---|
452 |
|
---|
453 | <A NAME="HIT_TOTAL"><!-- --></A><H3>
|
---|
454 | HIT_TOTAL</H3>
|
---|
455 | <PRE>
|
---|
456 | protected static final java.lang.String <B>HIT_TOTAL</B></PRE>
|
---|
457 | <DL>
|
---|
458 | <DL>
|
---|
459 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.HIT_TOTAL">Constant Field Values</A></DL>
|
---|
460 | </DL>
|
---|
461 | <HR>
|
---|
462 |
|
---|
463 | <A NAME="OBJECT"><!-- --></A><H3>
|
---|
464 | OBJECT</H3>
|
---|
465 | <PRE>
|
---|
466 | protected static final java.lang.String <B>OBJECT</B></PRE>
|
---|
467 | <DL>
|
---|
468 | <DL>
|
---|
469 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.OBJECT">Constant Field Values</A></DL>
|
---|
470 | </DL>
|
---|
471 | <HR>
|
---|
472 |
|
---|
473 | <A NAME="FIELD"><!-- --></A><H3>
|
---|
474 | FIELD</H3>
|
---|
475 | <PRE>
|
---|
476 | protected static final java.lang.String <B>FIELD</B></PRE>
|
---|
477 | <DL>
|
---|
478 | <DL>
|
---|
479 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.FIELD">Constant Field Values</A></DL>
|
---|
480 | </DL>
|
---|
481 | <HR>
|
---|
482 |
|
---|
483 | <A NAME="NAME"><!-- --></A><H3>
|
---|
484 | NAME</H3>
|
---|
485 | <PRE>
|
---|
486 | protected static final java.lang.String <B>NAME</B></PRE>
|
---|
487 | <DL>
|
---|
488 | <DL>
|
---|
489 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.NAME">Constant Field Values</A></DL>
|
---|
490 | </DL>
|
---|
491 | <HR>
|
---|
492 |
|
---|
493 | <A NAME="DC_TITLE_FIELD"><!-- --></A><H3>
|
---|
494 | DC_TITLE_FIELD</H3>
|
---|
495 | <PRE>
|
---|
496 | protected static final java.lang.String <B>DC_TITLE_FIELD</B></PRE>
|
---|
497 | <DL>
|
---|
498 | <DL>
|
---|
499 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.DC_TITLE_FIELD">Constant Field Values</A></DL>
|
---|
500 | </DL>
|
---|
501 | <HR>
|
---|
502 |
|
---|
503 | <A NAME="FULLTEXT_FIELD"><!-- --></A><H3>
|
---|
504 | FULLTEXT_FIELD</H3>
|
---|
505 | <PRE>
|
---|
506 | protected static final java.lang.String <B>FULLTEXT_FIELD</B></PRE>
|
---|
507 | <DL>
|
---|
508 | <DL>
|
---|
509 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.FULLTEXT_FIELD">Constant Field Values</A></DL>
|
---|
510 | </DL>
|
---|
511 | <HR>
|
---|
512 |
|
---|
513 | <A NAME="SPACE"><!-- --></A><H3>
|
---|
514 | SPACE</H3>
|
---|
515 | <PRE>
|
---|
516 | protected static final java.lang.String <B>SPACE</B></PRE>
|
---|
517 | <DL>
|
---|
518 | <DD>separator used internally to separate values of a search field
|
---|
519 | <P>
|
---|
520 | <DL>
|
---|
521 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.greenstone.fedora.services.GSearchConnection.SPACE">Constant Field Values</A></DL>
|
---|
522 | </DL>
|
---|
523 | <HR>
|
---|
524 |
|
---|
525 | <A NAME="service"><!-- --></A><H3>
|
---|
526 | service</H3>
|
---|
527 | <PRE>
|
---|
528 | protected final org.apache.axis.client.Service <B>service</B></PRE>
|
---|
529 | <DL>
|
---|
530 | <DD>The Service object used to connect to the FedoraGSearch web services
|
---|
531 | <P>
|
---|
532 | <DL>
|
---|
533 | </DL>
|
---|
534 | </DL>
|
---|
535 | <HR>
|
---|
536 |
|
---|
537 | <A NAME="call"><!-- --></A><H3>
|
---|
538 | call</H3>
|
---|
539 | <PRE>
|
---|
540 | protected final org.apache.axis.client.Call <B>call</B></PRE>
|
---|
541 | <DL>
|
---|
542 | <DD>The Call object used to connect to the FedoraGSearch web services
|
---|
543 | <P>
|
---|
544 | <DL>
|
---|
545 | </DL>
|
---|
546 | </DL>
|
---|
547 | <HR>
|
---|
548 |
|
---|
549 | <A NAME="portName"><!-- --></A><H3>
|
---|
550 | portName</H3>
|
---|
551 | <PRE>
|
---|
552 | protected final javax.xml.namespace.QName <B>portName</B></PRE>
|
---|
553 | <DL>
|
---|
554 | <DD>The portName object used when connecting to FedoraGSearch's web services
|
---|
555 | <P>
|
---|
556 | <DL>
|
---|
557 | </DL>
|
---|
558 | </DL>
|
---|
559 | <HR>
|
---|
560 |
|
---|
561 | <A NAME="builder"><!-- --></A><H3>
|
---|
562 | builder</H3>
|
---|
563 | <PRE>
|
---|
564 | protected final javax.xml.parsers.DocumentBuilder <B>builder</B></PRE>
|
---|
565 | <DL>
|
---|
566 | <DD>A DocumentBuilder object used to construct and parse XML
|
---|
567 | <P>
|
---|
568 | <DL>
|
---|
569 | </DL>
|
---|
570 | </DL>
|
---|
571 |
|
---|
572 | <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
---|
573 |
|
---|
574 | <A NAME="constructor_detail"><!-- --></A>
|
---|
575 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
576 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
577 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
---|
578 | <B>Constructor Detail</B></FONT></TH>
|
---|
579 | </TR>
|
---|
580 | </TABLE>
|
---|
581 |
|
---|
582 | <A NAME="GSearchConnection(java.lang.String)"><!-- --></A><H3>
|
---|
583 | GSearchConnection</H3>
|
---|
584 | <PRE>
|
---|
585 | public <B>GSearchConnection</B>(java.lang.String wsdlFileLocation)
|
---|
586 | throws java.net.MalformedURLException,
|
---|
587 | javax.xml.rpc.ServiceException,
|
---|
588 | javax.xml.parsers.ParserConfigurationException</PRE>
|
---|
589 | <DL>
|
---|
590 | <DD>Constructor that takes a String representing the url of the WSDL
|
---|
591 | file for FedoraGSearch's web services, and tries to establish a
|
---|
592 | connection to those web services.
|
---|
593 | <P>
|
---|
594 | <DL>
|
---|
595 | <DT><B>Parameters:</B><DD><CODE>wsdlFileLocation</CODE> - is a String representing the url of the WSDL file
|
---|
596 | <DT><B>Throws:</B>
|
---|
597 | <DD><CODE>java.net.MalformedURLException</CODE>
|
---|
598 | <DD><CODE>javax.xml.rpc.ServiceException</CODE>
|
---|
599 | <DD><CODE>javax.xml.parsers.ParserConfigurationException</CODE></DL>
|
---|
600 | </DL>
|
---|
601 |
|
---|
602 | <!-- ============ METHOD DETAIL ========== -->
|
---|
603 |
|
---|
604 | <A NAME="method_detail"><!-- --></A>
|
---|
605 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
606 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
607 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
---|
608 | <B>Method Detail</B></FONT></TH>
|
---|
609 | </TR>
|
---|
610 | </TABLE>
|
---|
611 |
|
---|
612 | <A NAME="gFindObjects(java.lang.String, java.lang.String, int, int, int, int, java.lang.String, java.lang.String)"><!-- --></A><H3>
|
---|
613 | gFindObjects</H3>
|
---|
614 | <PRE>
|
---|
615 | protected java.lang.String <B>gFindObjects</B>(java.lang.String searchFieldedTerms,
|
---|
616 | java.lang.String sort,
|
---|
617 | int hitPageStart,
|
---|
618 | int hitPageSize,
|
---|
619 | int snippetsMax,
|
---|
620 | int fieldMaxLength,
|
---|
621 | java.lang.String indexName,
|
---|
622 | java.lang.String resultPageXslt)
|
---|
623 | throws java.lang.Exception</PRE>
|
---|
624 | <DL>
|
---|
625 | <DD>Method to invoke gfindObjects operation of Fedora Generic Search
|
---|
626 | web services.
|
---|
627 |
|
---|
628 | Parameter types, parameter order and return type of gFindObjects are as
|
---|
629 | obtained from the wsdl file for the Fedora Generic Search web services
|
---|
630 | located at:
|
---|
631 | http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl
|
---|
632 | <wsdl:message name="gfindObjectsRequest">
|
---|
633 | <wsdl:part name="query" type="xsd:string"/>
|
---|
634 | <wsdl:part name="sort" type="xsd:string"/>
|
---|
635 | <wsdl:part name="hitPageStart" type="xsd:int"/>
|
---|
636 | <wsdl:part name="hitPageSize" type="xsd:int"/>
|
---|
637 | <wsdl:part name="snippetsMax" type="xsd:int"/>
|
---|
638 | <wsdl:part name="fieldMaxLength" type="xsd:int"/>
|
---|
639 | <wsdl:part name="indexName" type="xsd:string"/>
|
---|
640 | <wsdl:part name="resultPageXslt" type="xsd:string"/>
|
---|
641 | </wsdl:message>
|
---|
642 |
|
---|
643 | <wsdl:message name="gfindObjectsResponse">
|
---|
644 | <wsdl:part name="gfindObjectsReturn" type="xsd:string"/>
|
---|
645 | </wsdl:message>
|
---|
646 |
|
---|
647 | <wsdl:operation name="gfindObjects"
|
---|
648 | parameterOrder="query sort hitPageStart hitPageSize snippetsMax
|
---|
649 | fieldMaxLength indexName resultPageXslt">
|
---|
650 |
|
---|
651 | This method works: it searches the dc.title field of our FedoraIndex
|
---|
652 | for the term (e.g. "interview") and the result returned is an XML String.
|
---|
653 |
|
---|
654 | There's no example on how to call gFindObjects with parameters. In
|
---|
655 | particular, I don't know what values the parameter <b>sort</b> can take.
|
---|
656 | But topazproject has an example on how to call updateIndex().
|
---|
657 | <P>
|
---|
658 | <DD><DL>
|
---|
659 | </DL>
|
---|
660 | </DD>
|
---|
661 | <DD><DL>
|
---|
662 |
|
---|
663 | <DT><B>Throws:</B>
|
---|
664 | <DD><CODE>java.lang.Exception</CODE><DT><B>See Also:</B><DD><a href="http://www.topazproject.org/trac/wiki/FedoraSearch?format=txt">An example on how to call updateIndex() with parameters</a>,
|
---|
665 | <a href="http://ws.apache.org/axis/java/apiDocs/org/apache/axis/client/Service.html">Axis Service class</a>,
|
---|
666 | <a href="http://ws.apache.org/axis/java/apiDocs/javax/xml/rpc/Call.html">Axis RPC Call, for specification of interface Call</a>,
|
---|
667 | <a href="http://ws.apache.org/axis/java/apiDocs/org/apache/axis/client/Call.html">Axis client Call class, for implementation of interface Call</a></DL>
|
---|
668 | </DD>
|
---|
669 | </DL>
|
---|
670 | <HR>
|
---|
671 |
|
---|
672 | <A NAME="search(java.lang.String, java.lang.String, int, int, int)"><!-- --></A><H3>
|
---|
673 | search</H3>
|
---|
674 | <PRE>
|
---|
675 | public java.lang.String <B>search</B>(java.lang.String searchFieldName,
|
---|
676 | java.lang.String searchTerm,
|
---|
677 | int hitPageStart,
|
---|
678 | int hitPageSize,
|
---|
679 | int snippetsMax)
|
---|
680 | throws java.lang.Exception</PRE>
|
---|
681 | <DL>
|
---|
682 | <DD>Method that performs a search for the given searchTerm inside the given
|
---|
683 | indexed field.
|
---|
684 | <P>
|
---|
685 | <DD><DL>
|
---|
686 | </DL>
|
---|
687 | </DD>
|
---|
688 | <DD><DL>
|
---|
689 | <DT><B>Parameters:</B><DD><CODE>searchFieldName</CODE> - is the name of the indexed field within which the
|
---|
690 | given searchTerm is to be searched for.<DD><CODE>searchTerm</CODE> - is the term to be searched for.<DD><CODE>hitPageStart</CODE> - is the page of search results to start returning.<DD><CODE>hitPageSize</CODE> - is the number of search result pages to return,
|
---|
691 | starting from hitPageStart.<DD><CODE>snippetsMax</CODE> - is the maximum number of separate snippets containing
|
---|
692 | the searchTerm that are to be returned. (snippetsMax or a fewer number of
|
---|
693 | occurrences of the word in the text will be returned)
|
---|
694 | <DT><B>Throws:</B>
|
---|
695 | <DD><CODE>java.lang.Exception</CODE></DL>
|
---|
696 | </DD>
|
---|
697 | </DL>
|
---|
698 | <HR>
|
---|
699 |
|
---|
700 | <A NAME="search(java.util.Map, int, int)"><!-- --></A><H3>
|
---|
701 | search</H3>
|
---|
702 | <PRE>
|
---|
703 | public java.lang.String <B>search</B>(java.util.Map fieldsToSearchTerms,
|
---|
704 | int hitPageStart,
|
---|
705 | int hitPageSize)
|
---|
706 | throws java.lang.Exception</PRE>
|
---|
707 | <DL>
|
---|
708 | <DD>FedoraGSearch accepts a query of the form:
|
---|
709 | <code><"cyclone val" "Gender Inequalities" ds.fulltext:"cyclone val"
|
---|
710 | ds.fulltext:"worst storm"></code>
|
---|
711 | where the first two phrases are searched for in all indexed fields,
|
---|
712 | (in this case dc.title and ds.fulltext), while the last two are
|
---|
713 | searched for in the ds.fulltext field.
|
---|
714 | Another example:
|
---|
715 | <code><gender dc.title:interview ds.fulltext:"cyclone val">
|
---|
716 | titles and fulltexts are searched for "gender", while title index
|
---|
717 | is searched for "interview" and fulltexts are searched for the phrase
|
---|
718 | "cyclone val"</code>
|
---|
719 | <P>
|
---|
720 | <DD><DL>
|
---|
721 | </DL>
|
---|
722 | </DD>
|
---|
723 | <DD><DL>
|
---|
724 | <DT><B>Parameters:</B><DD><CODE>fieldsToSearchTerms</CODE> - is a Hashmap of searchfields and
|
---|
725 | associated search terms (words or phrases). The terms are in a
|
---|
726 | comma-separated list. fieldsToSearchTerms is a Hashmap of
|
---|
727 | (Searchfields, associated-searchTerms) pairs. It can contain 3
|
---|
728 | searchfields: allfields, titles, text. The value for each is a
|
---|
729 | comma-separated list of search terms in that field.
|
---|
730 | Internally the field names get converted to what FedoraGSearch's
|
---|
731 | gfindObjects understands: titles becomes dc.title:, text becomes
|
---|
732 | ds.fulltext and allfields becomes nothing.<DD><CODE>hitPageStart</CODE> - is the page of search results to start returning.<DD><CODE>hitPageSize</CODE> - is the number of search result pages to return,
|
---|
733 | starting from hitPageStart.
|
---|
734 | <DT><B>Returns:</B><DD>the XML (in string format) returned from Fedora Generic Search's
|
---|
735 | gfindObjects method
|
---|
736 | <DT><B>Throws:</B>
|
---|
737 | <DD><CODE>java.lang.Exception</CODE></DL>
|
---|
738 | </DD>
|
---|
739 | </DL>
|
---|
740 | <HR>
|
---|
741 |
|
---|
742 | <A NAME="formatSearchTermsInField(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
---|
743 | formatSearchTermsInField</H3>
|
---|
744 | <PRE>
|
---|
745 | protected java.lang.String <B>formatSearchTermsInField</B>(java.lang.String field,
|
---|
746 | java.lang.String fieldName)</PRE>
|
---|
747 | <DL>
|
---|
748 | <DD>Each field is a comma separated list of terms that may be either a word
|
---|
749 | OR a phrase. We're going to separate each term from the list, and put
|
---|
750 | quotes around phrases, then combine all the terms together again with
|
---|
751 | spaces to separate them. Examples:
|
---|
752 | <pre>dc.title:"a phrase" word
|
---|
753 | dc.fulltext: "cyclone val"
|
---|
754 | (ALL_FIELDS) interview gender</pre>
|
---|
755 | This is required to facilitate fielded searching with fedoraGSearch.
|
---|
756 | <P>
|
---|
757 | <DD><DL>
|
---|
758 | </DL>
|
---|
759 | </DD>
|
---|
760 | <DD><DL>
|
---|
761 | <DT><B>Parameters:</B><DD><CODE>field</CODE> - is a comma separated list of search terms (corresponding
|
---|
762 | to one fieldName) to be reorganised<DD><CODE>fieldName</CODE> - is the name of the field to prepend to the reorganised
|
---|
763 | field value. FieldName ALL_FIELDS is ignored.
|
---|
764 | <DT><B>Returns:</B><DD>parameter field reorganised such that terms that are phrases
|
---|
765 | are in quotes and each term is separated by a space from the previous one.</DL>
|
---|
766 | </DD>
|
---|
767 | </DL>
|
---|
768 | <HR>
|
---|
769 |
|
---|
770 | <A NAME="search(java.lang.String, int, int, int)"><!-- --></A><H3>
|
---|
771 | search</H3>
|
---|
772 | <PRE>
|
---|
773 | public java.lang.String <B>search</B>(java.lang.String fieldedSearchTerms,
|
---|
774 | int hitPageStart,
|
---|
775 | int hitPageSize,
|
---|
776 | int snippetsMax)
|
---|
777 | throws java.lang.Exception</PRE>
|
---|
778 | <DL>
|
---|
779 | <DD>Uses FedoraGSearch to perform a search where the query is embedded in
|
---|
780 | fieldedSearchTerms, which not only provides the terms to search on, but
|
---|
781 | also the fields to search the (various) given terms in.
|
---|
782 | <P>
|
---|
783 | <DD><DL>
|
---|
784 | </DL>
|
---|
785 | </DD>
|
---|
786 | <DD><DL>
|
---|
787 | <DT><B>Parameters:</B><DD><CODE>fieldedSearchTerms</CODE> - is the String specifying all the search terms
|
---|
788 | with their fields (or no field if it should search for the terms in
|
---|
789 | all fields). The terms with no associated search-fields should come first.
|
---|
790 | Search terms may be in quotes.<DD><CODE>snippetsMax</CODE> - is the maximum number of separate snippets containing
|
---|
791 | the searchTerm (snippetsMax number of occurrences of the word in the text)
|
---|
792 | returned.<DD><CODE>hitPageStart</CODE> - is the page of search results to start returning.<DD><CODE>hitPageSize</CODE> - is the number of search result pages to return,
|
---|
793 | starting from hitPageStart.
|
---|
794 | <DT><B>Returns:</B><DD>the XML (in string format) returned from Fedora Generic Search's
|
---|
795 | gfindObjects method
|
---|
796 | <DT><B>Throws:</B>
|
---|
797 | <DD><CODE>java.lang.Exception</CODE></DL>
|
---|
798 | </DD>
|
---|
799 | </DL>
|
---|
800 | <HR>
|
---|
801 |
|
---|
802 | <A NAME="getPIDsFromSearchResult(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
---|
803 | getPIDsFromSearchResult</H3>
|
---|
804 | <PRE>
|
---|
805 | public java.lang.String[] <B>getPIDsFromSearchResult</B>(java.lang.String collectionName,
|
---|
806 | java.lang.String searchResult)
|
---|
807 | throws java.lang.Exception</PRE>
|
---|
808 | <DL>
|
---|
809 | <DD>Call this method with the return value of calling search().
|
---|
810 | Search results are returned in GSearch's XML response format,
|
---|
811 | containing information that includes the PIDs of the documents that
|
---|
812 | matched the search. These PIDs are returned in the array.
|
---|
813 | <P>
|
---|
814 | <DD><DL>
|
---|
815 | </DL>
|
---|
816 | </DD>
|
---|
817 | <DD><DL>
|
---|
818 | <DT><B>Parameters:</B><DD><CODE>collectionName</CODE> - is the name of the collection to restrict the
|
---|
819 | search results by. If it's "", then results from all collections are
|
---|
820 | returned. Generally, don't want to pass "", because, theoretically,
|
---|
821 | all indexed collections in the repository could be considered and
|
---|
822 | not all of them may be Greenstone collections. If all Greenstone
|
---|
823 | collections should be searched for, pass "greenstone" as the
|
---|
824 | collection name instead.<DD><CODE>searchResult</CODE> - is the Fedora Generic Search XML response returned
|
---|
825 | from performing a gfindObjects() operations.
|
---|
826 | <DT><B>Returns:</B><DD>an array of the pids of documents found for the search.
|
---|
827 | <DT><B>Throws:</B>
|
---|
828 | <DD><CODE>java.lang.Exception</CODE></DL>
|
---|
829 | </DD>
|
---|
830 | </DL>
|
---|
831 | <HR>
|
---|
832 |
|
---|
833 | <A NAME="main(java.lang.String[])"><!-- --></A><H3>
|
---|
834 | main</H3>
|
---|
835 | <PRE>
|
---|
836 | public static void <B>main</B>(java.lang.String[] args)</PRE>
|
---|
837 | <DL>
|
---|
838 | <DD><DL>
|
---|
839 | </DL>
|
---|
840 | </DD>
|
---|
841 | <DD><DL>
|
---|
842 | </DL>
|
---|
843 | </DD>
|
---|
844 | </DL>
|
---|
845 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
846 | <HR>
|
---|
847 |
|
---|
848 |
|
---|
849 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
850 | <A NAME="navbar_bottom"><!-- --></A>
|
---|
851 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
---|
852 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
853 | <TR>
|
---|
854 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
855 | <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
---|
856 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
857 | <TR ALIGN="center" VALIGN="top">
|
---|
858 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../org/greenstone/fedora/services/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
859 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
860 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
861 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
862 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
863 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
864 | </TR>
|
---|
865 | </TABLE>
|
---|
866 | </TD>
|
---|
867 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
868 | </EM>
|
---|
869 | </TD>
|
---|
870 | </TR>
|
---|
871 |
|
---|
872 | <TR>
|
---|
873 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
874 | <A HREF="../../../../org/greenstone/fedora/services/FedoraToGS3Interface.Constants.html" title="interface in org.greenstone.fedora.services"><B>PREV CLASS</B></A>
|
---|
875 | NEXT CLASS</FONT></TD>
|
---|
876 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
877 | <A HREF="../../../../index.html?org/greenstone/fedora/services/GSearchConnection.html" target="_top"><B>FRAMES</B></A>
|
---|
878 | <A HREF="GSearchConnection.html" target="_top"><B>NO FRAMES</B></A>
|
---|
879 | <SCRIPT type="text/javascript">
|
---|
880 | <!--
|
---|
881 | if(window==top) {
|
---|
882 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
883 | }
|
---|
884 | //-->
|
---|
885 | </SCRIPT>
|
---|
886 | <NOSCRIPT>
|
---|
887 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
888 | </NOSCRIPT>
|
---|
889 |
|
---|
890 |
|
---|
891 | </FONT></TD>
|
---|
892 | </TR>
|
---|
893 | <TR>
|
---|
894 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
895 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
896 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
897 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
898 | </TR>
|
---|
899 | </TABLE>
|
---|
900 | <A NAME="skip-navbar_bottom"></A>
|
---|
901 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
902 |
|
---|
903 | <HR>
|
---|
904 |
|
---|
905 | </BODY>
|
---|
906 | </HTML>
|
---|