1
|
<%@ page language="java" %>
|
2
|
<!--
|
3
|
/**
|
4
|
* '$RCSfile$'
|
5
|
* Authors: Matt Jones, CHad Berkley
|
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: sgarg $'
|
11
|
* '$Date: 2005-01-13 16:59:15 -0800 (Thu, 13 Jan 2005) $'
|
12
|
* '$Revision: 2370 $'
|
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
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
29
|
* convert an XML file showing the resultset of a query
|
30
|
* into an HTML format suitable for rendering with modern web browsers.
|
31
|
*/
|
32
|
-->
|
33
|
<%@ include file="settings.jsp"%>
|
34
|
<%@ include file="session_vars.jsp"%>
|
35
|
<!-- *********************** START SEARCHBOX TABLE ************************* -->
|
36
|
<html>
|
37
|
<head>
|
38
|
<title>Metacat Data Catalog Search Page</title>
|
39
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
40
|
<link href="<%=relativeRoot%>/default.css" rel="stylesheet" type="text/css">
|
41
|
<script language="javascript"
|
42
|
type="text/javascript" src="<%=relativeRoot%>/default.js">
|
43
|
</script>
|
44
|
<script language="javascript" type="text/javascript">
|
45
|
function trim(stringToTrim) {
|
46
|
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
|
47
|
}
|
48
|
function allowSearch(formObj) {
|
49
|
var canSearch = true;
|
50
|
var searchString = trim(formObj.elements["anyfield"].value);
|
51
|
if (searchString=="") {
|
52
|
if (confirm("Show *all* data in the Catalog?\n(this may take some time!) ")) {
|
53
|
formObj.elements["anyfield"].value = "%";
|
54
|
canSearch = true;
|
55
|
} else {
|
56
|
formObj.elements["anyfield"].focus();
|
57
|
canSearch = false;
|
58
|
}
|
59
|
}
|
60
|
return canSearch;
|
61
|
}
|
62
|
function keywordSearch(formObj, searchKeyword) {
|
63
|
var searchString = trim(searchKeyword);
|
64
|
if (searchString=="") searchString="%";
|
65
|
formObj.anyfield.value=searchString;
|
66
|
formObj.submit();
|
67
|
return true;
|
68
|
}
|
69
|
</script>
|
70
|
</head>
|
71
|
|
72
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
73
|
<table width="750px" align="center" cellspacing="0" cellpadding="0">
|
74
|
<tr>
|
75
|
<td width="10" align="right" valign="top">
|
76
|
<img src="<%=relativeRoot%>/images/panelhead_bg_lcorner.gif"
|
77
|
width="10" height="21">
|
78
|
</td>
|
79
|
<td class="sectionheader">
|
80
|
search for data
|
81
|
</td>
|
82
|
<td width="10" align="left" valign="top">
|
83
|
<img src="<%=relativeRoot%>/images/panelhead_bg_rcorner.gif"
|
84
|
width="10" height="21">
|
85
|
</td>
|
86
|
</tr>
|
87
|
<tr>
|
88
|
<td colspan="3">
|
89
|
<table width="100%" border="0" cellpadding="0" cellspacing="0"
|
90
|
class="subpanel">
|
91
|
<tr>
|
92
|
<td colspan="2"></td>
|
93
|
</tr>
|
94
|
<tr valign="baseline">
|
95
|
<td colspan="2">
|
96
|
<form action="<%=METACAT_URL%>" name="searchForm" method="post"
|
97
|
target="_top" onSubmit="return allowSearch(this);">
|
98
|
<%=sessionidField%>
|
99
|
<%=SIMPLE_SEARCH_METACAT_POST_FIELDS%>
|
100
|
<table width="100%" border="0" cellpadding="5" cellspacing="0">
|
101
|
<tr>
|
102
|
<td width="94" rowspan="2" align="left" valign="top">
|
103
|
<img src="<%=relativeRoot%>/images/search.jpg"
|
104
|
width="94" height="80">
|
105
|
</td>
|
106
|
<td colspan="2" valign="middle" class="text_example">
|
107
|
<p>
|
108
|
<%= loginStatus %>
|
109
|
(<a href="<%=relativeRoot%>/index.jsp#loginanchor"
|
110
|
target="_top"><%=loginButtonLabel%></a>).
|
111
|
You may search the data catalog without being logged
|
112
|
into your account, but will have access only to
|
113
|
"public" data (see "login &
|
114
|
registration")
|
115
|
</p>
|
116
|
<p>
|
117
|
Enter a search phrase (e.g. biodiversity) to search
|
118
|
for data sets in the data catalog, or simply browse
|
119
|
by category using the links below.
|
120
|
</p>
|
121
|
</td>
|
122
|
</tr>
|
123
|
<tr valign="middle">
|
124
|
<td align="right" class="searchcat">
|
125
|
<input type="text" name="anyfield" size="30"
|
126
|
maxlength="200">
|
127
|
</td>
|
128
|
<td width="365" align="left" class="searchcat">
|
129
|
<input type="submit" value="Search Data Catalog">
|
130
|
|
131
|
<!-- Implement this later
|
132
|
<a target="_top"
|
133
|
href="<%=relativeRoot%>/advancedsearch.jsp">
|
134
|
» advanced search «</a>
|
135
|
-->
|
136
|
</td>
|
137
|
</tr>
|
138
|
</table>
|
139
|
</form>
|
140
|
</td>
|
141
|
</tr>
|
142
|
<%
|
143
|
/*
|
144
|
US Geography
|
145
|
------------
|
146
|
Northeast, Southeast, South, Midwest, Northwest, Southwest, Pacific Ocean, Atlantic Ocean,
|
147
|
Great Lakes, (could also list states here)
|
148
|
*/
|
149
|
%>
|
150
|
<tr>
|
151
|
<td width="375" class="searchcat">Taxonomy</td>
|
152
|
<td width="365" class="searchcat">Habitat</td>
|
153
|
</tr>
|
154
|
<tr>
|
155
|
<td width="375" class="searchsubcat">
|
156
|
<a href="#" onClick="keywordSearch(document.searchForm, 'plant')" class="searchsubcat">Plant,</a>
|
157
|
<a href="#" onClick="keywordSearch(document.searchForm, 'invertebrate')" class="searchsubcat">Invertebrate,</a>
|
158
|
<a href="#" onClick="keywordSearch(document.searchForm, 'mammal')" class="searchsubcat">Mammal,</a>
|
159
|
<a href="#" onClick="keywordSearch(document.searchForm, 'bird')" class="searchsubcat">Bird,</a>
|
160
|
<a href="#" onClick="keywordSearch(document.searchForm, 'reptile')" class="searchsubcat">Reptile,</a>
|
161
|
<a href="#" onClick="keywordSearch(document.searchForm, 'amphibian')" class="searchsubcat">Amphibian,</a>
|
162
|
<a href="#" onClick="keywordSearch(document.searchForm, 'fungi')" class="searchsubcat">Fungi,</a>
|
163
|
<a href="#" onClick="keywordSearch(document.searchForm, 'microbe')" class="searchsubcat">Microbe,</a>
|
164
|
<a href="#" onClick="keywordSearch(document.searchForm, 'virus')" class="searchsubcat">Virus</a>
|
165
|
</td>
|
166
|
<td width="365" class="searchsubcat">
|
167
|
<a href="#" onClick="keywordSearch(document.searchForm, 'alpine')" class="searchsubcat">Alpine,</a>
|
168
|
<a href="#" onClick="keywordSearch(document.searchForm, 'aquatic')" class="searchsubcat">Aquatic,</a>
|
169
|
<a href="#" onClick="keywordSearch(document.searchForm, 'beach')" class="searchsubcat">Beach,</a>
|
170
|
<a href="#" onClick="keywordSearch(document.searchForm, 'benthic')" class="searchsubcat">Benthic,</a>
|
171
|
<a href="#" onClick="keywordSearch(document.searchForm, 'desert')" class="searchsubcat">Desert,</a>
|
172
|
<a href="#" onClick="keywordSearch(document.searchForm, 'estuar')" class="searchsubcat">Estuary,</a>
|
173
|
<a href="#" onClick="keywordSearch(document.searchForm, 'forest')" class="searchsubcat">Forest,</a>
|
174
|
<a href="#" onClick="keywordSearch(document.searchForm, 'grassland')" class="searchsubcat">Grassland,</a>
|
175
|
<a href="#" onClick="keywordSearch(document.searchForm, 'marine')" class="searchsubcat">Marine,</a>
|
176
|
<a href="#" onClick="keywordSearch(document.searchForm, 'montane')" class="searchsubcat">Montane,</a>
|
177
|
<a href="#" onClick="keywordSearch(document.searchForm, 'ocean')" class="searchsubcat">Oceanic,</a>
|
178
|
<a href="#" onClick="keywordSearch(document.searchForm, 'savanna')" class="searchsubcat">Savanna,</a>
|
179
|
<a href="#" onClick="keywordSearch(document.searchForm, 'shrubland')" class="searchsubcat">Shrubland,</a>
|
180
|
<a href="#" onClick="keywordSearch(document.searchForm, 'terrestrial')" class="searchsubcat">Terrestrial,</a>
|
181
|
<a href="#" onClick="keywordSearch(document.searchForm, 'tundra')" class="searchsubcat">Tundra,</a>
|
182
|
<a href="#" onClick="keywordSearch(document.searchForm, 'urban')" class="searchsubcat">Urban,</a>
|
183
|
<a href="#" onClick="keywordSearch(document.searchForm, 'wetland')" class="searchsubcat">Wetland</a>
|
184
|
</td>
|
185
|
</tr>
|
186
|
<tr>
|
187
|
<td width="375"> </td>
|
188
|
<td width="365"> </td>
|
189
|
</tr>
|
190
|
</table>
|
191
|
</td>
|
192
|
</tr>
|
193
|
</table>
|
194
|
</body>
|
195
|
<!-- ************************* END SEARCHBOX TABLE ************************* -->
|