Project

General

Profile

« Previous | Next » 

Revision 2746

Bug #2207. New JSPs added to the default skin to support Metacat Advanced Search interface.

View differences:

lib/style/skins/default/index_advanced.jsp
1
<%@ page    language="java" %>
2
<% 
3
 /**
4
  *  '$RCSfile$'
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author$'
10
  *     '$Date$'
11
  * '$Revision$'
12
  * 
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file showing the resultset of a query
29
  * into an HTML format suitable for rendering with modern web browsers.
30
  */
31
%>
32
<%@ include file="settings.jsp"%>
33
<%@ include file="session_vars.jsp"%>
34
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
35

  
36
<html>
37

  
38
<head>
39
<title>Metacat Data Catalog </title>
40
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
41
	<link rel="stylesheet" type="text/css" 
42
		  href="@style-skins-path@/default/default.css">
43
	<script language="javascript" type="text/javascript"
44
			src="@style-skins-path@/default/default.js"></script>
45
	<script language="javascript" type="text/javascript"
46
			src="@style-common-path@/branding.js"></script>
47
</head>
48

  
49
<body>
50
  <script language="javascript">
51
	  insertTemplateOpening();
52
      // insertLoginBox();
53
	  insertAdvancedSearchBox();
54
      insertTemplateClosing();
55
  </script>
56
</body>
57

  
58
</html>
0 59

  
lib/style/skins/default/advancedsearchresults.jsp
1
<%@ page language="java"%>
2

  
3
<!--
4
/**
5
  *  '$RCSfile$'
6
  *      Authors:     Duane Costa
7
  *      Copyright:   2005 University of New Mexico and
8
  *                   Regents of the University of California and the
9
  *                   National Center for Ecological Analysis and Synthesis
10
  *      For Details: http://www.nceas.ucsb.edu/
11
  *
12
  *   '$Author$'
13
  *     '$Date$'
14
  * '$Revision$'
15
  * 
16
  * This program is free software; you can redistribute it and/or modify
17
  * it under the terms of the GNU General Public License as published by
18
  * the Free Software Foundation; either version 2 of the License, or
19
  * (at your option) any later version.
20
  *
21
  * This program is distributed in the hope that it will be useful,
22
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
  * GNU General Public License for more details.
25
  *
26
  * You should have received a copy of the GNU General Public License
27
  * along with this program; if not, write to the Free Software
28
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
  *
30
  */
31
-->
32

  
33
<%
34
    String advancedSearchResults = (String) request.getAttribute("result");
35
%>
36

  
37
<html>
38

  
39
  <head>
40
    <title>Search Results</title>
41
  </head>
42
  
43
  <body>
44
<%= advancedSearchResults %>
45
  </body>
46
  
47
</html>
0 48

  
lib/style/skins/default/include_advancedsearch.jsp
1
<%@ page     language="java" %>
2
<!--
3
/**
4
  *  '$RCSfile$'
5
  *      Authors: Duane Costa
6
  *    Copyright: 2000 Regents of the University of California and the
7
  *               National Center for Ecological Analysis and Synthesis
8
  *  For Details: http://www.nceas.ucsb.edu/
9
  *
10
  *   '$Author$'
11
  *     '$Date$'
12
  * '$Revision$'
13
  * 
14
  * This program is free software; you can redistribute it and/or modify
15
  * it under the terms of the GNU General Public License as published by
16
  * the Free Software Foundation; either version 2 of the License, or
17
  * (at your option) any later version.
18
  *
19
  * This program is distributed in the hope that it will be useful,
20
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
  * GNU General Public License for more details.
23
  *
24
  * You should have received a copy of the GNU General Public License
25
  * along with this program; if not, write to the Free Software
26
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
  *
28
  */
29
-->
30
<%@ include file="settings.jsp"%>
31
<%@ include file="session_vars.jsp"%>
32
<!-- *********************** START SEARCHBOX TABLE ************************* -->
33
<html>
34
<head>
35
  <title>Metacat Data Catalog Advanced Search Page</title>
36
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37
  <link href="<%=relativeRoot%>/default.css" rel="stylesheet" type="text/css">
38

  
39
  <script language="javascript" 
40
    type="text/javascript" src="<%=relativeRoot%>/default.js">
41
  </script>
42

  
43
  <script language="javascript" type="text/javascript">
44

  
45
    function trim(stringToTrim) {
46
      return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
47
    }
48

  
49
    function allowSearch(formObj) {
50
      var canSearch = true;
51
      var searchString = trim(formObj.elements["anyfield"].value);
52
      if (searchString=="") {
53
        if (confirm("Show *all* data in the Catalog?\n(this may take some time!)            ")) {
54
	      formObj.elements["anyfield"].value = "%";
55
	      canSearch = true;
56
	      } else {
57
	        formObj.elements["anyfield"].focus();
58
	        canSearch = false;
59
	      }
60
      } 
61
      return canSearch;
62
    }
63

  
64
    function keywordSearch(formObj, searchKeyword) {
65
      var searchString = trim(searchKeyword);  
66
      if (searchString=="") searchString="%";
67
      formObj.anyfield.value=searchString;
68
      formObj.submit();
69
      return true;
70
    }
71

  
72
      function submitRequest(form) {
73
        var x_range = document.map.get_x_range();
74
        var y_range = document.map.get_y_range();
75
        var x_index = x_range.indexOf(' ');
76
        var y_index = y_range.indexOf(' ');
77
        var x_length = x_range.length();
78
        var y_length = y_range.length();
79
        var x_lo = x_range.substring(0, x_index);
80
        var x_hi = x_range.substring(x_index + 1, x_length);
81
        var y_lo = y_range.substring(0, y_index);
82
        var y_hi = y_range.substring(y_index + 1, y_length);
83
        
84
        // alert("xrange: " + x_range + "   y_range: " + y_range);
85

  
86
        if ((x_range != "-180.0 180.0") && (y_range != "-90.0 90.0")) {     
87
          document.advancedSearchForm.northBound.value = y_hi;
88
          document.advancedSearchForm.southBound.value = y_lo;
89
          document.advancedSearchForm.eastBound.value = x_hi;
90
          document.advancedSearchForm.westBound.value = x_lo;
91
        }
92
      }
93
  </script>
94
</head>
95

  
96
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
97
  <table width="750px" align="center" cellspacing="0" cellpadding="0">
98
    <tr> 
99
      <td width="10" align="right" valign="top">
100
        <img src="<%=relativeRoot%>/images/panelhead_bg_lcorner.gif" 
101
          width="10" height="21">
102
      </td>
103
      <td class="sectionheader">
104
        advanced search 
105
      </td>
106
      <td width="10" align="left" valign="top"> 
107
        <img src="<%=relativeRoot%>/images/panelhead_bg_rcorner.gif" 
108
          width="10" height="21">
109
      </td>
110
    </tr>
111
    <tr> 
112
      <td colspan="3">
113
        <table width="100%" border="0" cellpadding="0" cellspacing="0" 
114
          class="subpanel">
115
          <tr> 
116
            <td colspan="2"></td>
117
          </tr>
118
          <tr valign="baseline"> 
119
            <td colspan="2">
120
    <form name="advancedSearchForm"
121
          method="POST"
122
          action="advancedsearchforward.jsp"
123
          onsubmit="return validateAdvancedSearchForm(this)"
124
          target="_top">
125
      <table>
126
        <tr>
127
          <td colspan="2"><hr/></td>
128
        </tr>
129
        <tr>
130
          <td colspan="2">
131
            <h3>Subject</h3>
132
          </td>
133
        </tr>
134
        <tr>
135
          <td>&nbsp;</td>
136
          <td>&nbsp;</td>
137
        </tr>
138
        <tr>
139
          <td align="right" nowrap>
140
            <select name="subjectField">
141
              <option value="ALL">Subject</option>
142
              <option value="TITLE">Title Only</option>
143
              <option value="ABSTRACT">Abtract Only</option>
144
              <option value="KEYWORDS">Keywords Only</option>
145
            </select>
146
          </td>
147
          <td>
148
            <select name="subjectQueryType">
149
              <option value="0" selected="selected">contains</option>
150
              <option value="1">matches exactly</option>
151
              <option value="2">starts with</option>
152
              <option value="3">ends with</option>
153
            </select>
154
            <input type="text" name="subjectValue" value="">
155
            <input type="radio" name="subjectAllAny" value="0" checked="checked">All Terms
156
            <input type="radio" name="subjectAllAny" value="1">Any Term
157
          </td>
158
        </tr>
159
        <tr>
160
          <td>&nbsp;</td>
161
          <td>&nbsp;</td>
162
        </tr>
163
        <tr>
164
          <td colspan="2"><hr/></td>
165
        </tr>
166
        <tr>
167
          <td colspan="2">
168
            <h3>Author</h3>
169
          </td>
170
        </tr>
171
        <tr>
172
          <td>&nbsp;</td>
173
          <td>&nbsp;</td>
174
        </tr>
175
        <tr>
176
          <td nowrap align="right">Individual's Last Name:
177
          </td>
178
          <td>
179
            <select name="creatorSurnameQueryType">
180
              <option value="0" selected="selected">contains</option>
181
              <option value="1">matches exactly</option>
182
              <option value="2">starts with</option>
183
              <option value="3">ends with</option></select>
184
            <input type="text" name="creatorSurname" value="">
185
          </td>
186
        </tr>
187
        <tr>
188
          <td>&nbsp;</td>
189
          <td>&nbsp;</td>
190
        </tr>
191
        <tr>
192
          <td align="right" nowrap>Organization:
193
          </td>
194
          <td>
195
            <select name="creatorOrganizationQueryType">
196
              <option value="0" selected="selected">contains</option>
197
              <option value="1">matches exactly</option>
198
              <option value="2">starts with</option>
199
              <option value="3">ends with</option></select>
200
            <input type="text" name="creatorOrganization" value="">
201
          </td>
202
        </tr>
203
        <tr>
204
          <td>&nbsp;</td>
205
          <td>&nbsp;</td>
206
        </tr>
207
        <tr>
208
          <td colspan="2"><hr/></td>
209
        </tr>
210
        <tr>
211
          <td colspan="2">
212
            <h3>Spatial Criteria</h3>
213
          </td>
214
        </tr>
215
        <tr>
216
          <td>&nbsp;</td>
217
          <td>&nbsp;</td>
218
        </tr>
219
        <tr>
220
          <td align="right">Geographic Boundaries:</td>
221
        </tr>
222
        <tr>
223
          <td>&nbsp;</td>
224
          <td>
225
            <applet
226
              CODEBASE="http://metacat.lternet.edu/query/LiveMap_30"
227
              CODE="LiveMap_30.class"
228
              ARCHIVE="LiveMap_30.jar"
229
              NAME="map" 
230
              MAYSCRIPT 
231
              width=500 
232
              height=160>
233
              <param name=base_image value="gifs/java_0_world_20k.jpg">
234
              <param name=img_x_domain value="-180 180">
235
              <param name=img_y_domain value="-90 90">
236
              <param name=toolType value="XY">
237
              <param name=tool_x_range value="-180 180">
238
              <param name=tool_y_range value="-90 90">
239
            </applet>
240
          </td>
241
        </tr>
242
        <tr>
243
          <td>&nbsp;</td>
244
          <td>
245
            <!--
246
             The underlying property value associated with checkbox
247
             should be of type boolean, and any value you specify 
248
             should correspond to one of the strings that indicate a 
249
             true value ("true", "yes", or "on").
250
            -->
251
            <input type="checkbox" name="boundaryContained" value="on">
252
            Dataset must be fully contained within boundaries
253
          </td>
254
        </tr>
255
        <tr>
256
          <td>&nbsp;</td>
257
          <td>&nbsp;</td>
258
        </tr>
259
        <tr>
260
          <td align="right">Geographic Place Name: 
261
          </td>
262
          <td><input type="text" name="locationName" value="">
263
          </td>
264
        </tr>
265
        <tr>
266
          <td>&nbsp;</td>
267
          <td>&nbsp;</td>
268
        </tr>
269
        <tr>
270
          <td colspan="2"><hr/></td>
271
        </tr>
272
        <!-- Temporal Criteria section is disabled because Metacat is
273
             not able to search date ranges. An enhancement request has
274
             been entered in Bugzilla (see 
275
             http://bugzilla.ecoinformatics.org/show_bug.cgi?id=2084 )
276
        <tr>
277
          <td colspan="2">
278
            <h3>Temporal Criteria</h3>
279
          </td>
280
        </tr>
281
        <tr>
282
          <td>&nbsp;</td>
283
          <td>&nbsp;</td>
284
        </tr>
285
        <tr>
286
          <td align="right">
287
            <select name="dateField">
288
              <option value="ALL">All Dates</option>
289
              <option value="COLLECTION">Collection Date</option>
290
              <option value="PUBLICATION">Publication Date</option>
291
            </select>
292
          </td>
293
          <td colspan="2">
294
            <input type="text" name="startDate" maxlength="10" size="10" value="" style="font-family:monospace;">
295
            to
296
            <input type="text" name="endDate" maxlength="10" size="10" value="" style="font-family:monospace;">
297
          </td>
298
        </tr>
299
        <tr>
300
          <td>&nbsp;</td>
301
          <td>&nbsp;</td>
302
        </tr>
303
        <tr>
304
          <td align="right">Named Timescale:
305
            <select name="namedTimescaleQueryType">
306
              <option value="0" selected="selected">contains</option>
307
              <option value="1">matches exactly</option>
308
              <option value="2">starts with</option>
309
              <option value="3">ends with</option>
310
            </select>
311
          </td>
312
          <td>
313
            <input type="text" name="namedTimescale" value="">
314
          </td>
315
        </tr>
316
        <tr>
317
          <td>&nbsp;</td>
318
          <td>&nbsp;</td>
319
        </tr>
320
        <tr>
321
          <td colspan="2"><hr/></td>
322
        </tr>
323
        -->
324
        <tr>
325
          <td colspan="2">
326
            <h3>Taxonomic Criteria</h3>
327
          </td>
328
        </tr>
329
        <tr>
330
          <td>&nbsp;</td>
331
          <td>&nbsp;</td>
332
        </tr>
333
        <tr>
334
          <td align="right">Taxon:
335
          </td>
336
          <td>
337
            <select name="taxonQueryType">
338
              <option value="0" selected="selected">contains</option>
339
              <option value="1">matches exactly</option>
340
              <option value="2">starts with</option>
341
              <option value="3">ends with</option>
342
            </select>
343
            <input type="text" name="taxon" value="">
344
          </td>
345
        </tr>
346
        <tr>
347
          <td>&nbsp;</td>
348
          <td>&nbsp;</td>
349
        </tr>
350
        <tr>
351
          <td colspan="2"><hr/></td>
352
        </tr>
353
        <tr>
354
          <td colspan="2">
355
            <h3>LTER Site</h3>
356
          </td>
357
        </tr>
358
        <tr>
359
          <td>&nbsp;</td>
360
          <td>&nbsp;</td>
361
        </tr>
362
        <tr>
363
          <td align="right">Limit search to LTER site:</td>
364
          <td>
365
            <select name="siteValue">
366
              <option value="ALLSITES">All LTER Sites</option>
367
              <option value="AND">Andrews LTER</option>
368
              <option value="ARC">Arctic LTER</option>
369
              <option value="BES">Baltimore Ecosystem Study</option>
370
              <option value="BNZ">Bonanza Creek LTER</option>
371
              <option value="CAP">Central Arizona - Phoenix Urban LTER</option>
372
              <option value="CCE">California Current Ecosystem</option>
373
              <option value="CDR">Cedar Creek Natural History Area</option>
374
              <option value="CWT">Coweeta LTER</option>
375
              <option value="FCE">Florida Coastal Everglades LTER</option>
376
              <option value="GCE">Georgia Coastal Ecosystems LTER</option>
377
              <option value="HBR">Hubbard Brook LTER</option>
378
              <option value="HFR">Harvard Forest LTER</option>
379
              <option value="JRN">Jornada Basin LTER</option>
380
              <option value="KBS">Kellogg Biological Station LTER</option>
381
              <option value="KNZ">Konza Prairie LTER</option>
382
              <option value="LNO">LTER Network Office</option>
383
              <option value="LUQ">Luquillo LTER</option>
384
              <option value="MCM">McMurdo Dry Valleys LTER</option>
385
              <option value="MCR">Moorea Coral Reef</option>
386
              <option value="NTL">North Temperate Lakes LTER</option>
387
              <option value="NWT">Niwot Ridge LTER</option>
388
              <option value="PAL">Palmer Station LTER</option>
389
              <option value="PIE">Plum Island Ecosystem LTER</option>
390
              <option value="SBC">Santa Barbara Coastal LTER</option>
391
              <option value="SEV">Sevilleta LTER</option>
392
              <option value="SGS">Shortgrass Steppe</option>
393
              <option value="VCR">Virginia Coastal Reserve LTER</option>
394
            </select>
395
          </td>
396
       </tr>
397
        <tr>
398
          <td>&nbsp;</td>
399
          <td>&nbsp;</td>
400
        </tr>
401
        <tr>
402
          <td colspan="2"><hr/></td>
403
        </tr>
404
        <tr>
405
          <td colspan="2">
406
            <h3>Search Options</h3>
407
          </td>
408
        </tr>
409
        <tr>
410
          <td colspan="2" align="center">
411
            <table>
412
              <tr>
413
                <td>
414
                  <input type="radio" name="formAllAny" value="0" checked="checked">"And" all search items&nbsp;
415
                </td>
416
                <td>
417
                  <input type="radio" name="formAllAny" value="1">"Or" all search items&nbsp;
418
                </td>
419
                <td>
420
                  <input type="checkbox" name="caseSensitive" value="on">Case sensitive
421
                </td>
422
              </tr>
423
            </table>
424
          </td>
425
        </tr>
426
        <tr>
427
          <td>&nbsp;</td>
428
          <td>&nbsp;</td>
429
        </tr>
430
        <tr>
431
          <td colspan="2"><hr/></td>
432
        </tr>
433
        <tr>
434
          <td colspan="2" align="center">
435
            <input type="submit" value="Search" onClick="submitRequest(this.form)">&nbsp;&nbsp;
436
            <!-- <input type="reset" value="Reset"> -->
437
          </td>
438
        </tr>
439
      </table>
440
      <input type="hidden" name="northBound" value=""/>
441
      <input type="hidden" name="southBound" value=""/>
442
      <input type="hidden" name="eastBound" value=""/>
443
      <input type="hidden" name="westBound" value=""/>
444
    </form>
445
            </td>
446
          </tr>
447
          <tr> 
448
            <td width="375">&nbsp;</td>
449
            <td width="365">&nbsp;</td>
450
          </tr>
451
        </table>
452
      </td>
453
    </tr>
454
  </table>
455
</body>
456
<!-- ************************* END SEARCHBOX TABLE ************************* -->
0 457

  
lib/style/skins/default/advancedsearchforward.jsp
1
<%@ page language="java"%>
2

  
3
<!--
4
/**
5
  *  '$RCSfile$'
6
  *      Authors:     Duane Costa
7
  *      Copyright:   2005 University of New Mexico and
8
  *                   Regents of the University of California and the
9
  *                   National Center for Ecological Analysis and Synthesis
10
  *      For Details: http://www.nceas.ucsb.edu/
11
  *
12
  *   '$Author$'
13
  *     '$Date$'
14
  * '$Revision$'
15
  * 
16
  * This program is free software; you can redistribute it and/or modify
17
  * it under the terms of the GNU General Public License as published by
18
  * the Free Software Foundation; either version 2 of the License, or
19
  * (at your option) any later version.
20
  *
21
  * This program is distributed in the hope that it will be useful,
22
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
  * GNU General Public License for more details.
25
  *
26
  * You should have received a copy of the GNU General Public License
27
  * along with this program; if not, write to the Free Software
28
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
  *
30
  */
31
-->
32

  
33
<jsp:useBean id="advancedSearchBean" 
34
             class="edu.ucsb.nceas.metacat.advancedsearch.AdvancedSearchBean"
35
             scope="request">
36
  <jsp:setProperty name="advancedSearchBean" property="*" />
37
</jsp:useBean>
38
  
39
<jsp:forward page="/advancedSearchServlet" />
0 40

  

Also available in: Unified diff