1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
|
3
|
|
4
|
<!-- to change the content type or response encoding change the following line -->
|
5
|
<jsp:directive.page contentType="text/html;charset=UTF-8" />
|
6
|
<jsp:directive.page
|
7
|
import="edu.ucsb.nceas.metacat.clientview.ClientView" />
|
8
|
<jsp:directive.page
|
9
|
import="edu.ucsb.nceas.metacat.clientview.ClientViewHelper" />
|
10
|
<jsp:directive.page
|
11
|
import="edu.ucsb.nceas.metacat.clientview.ClientHtmlHelper" />
|
12
|
|
13
|
<jsp:declaration>
|
14
|
private ClientViewHelper clientViewHelper = null;
|
15
|
</jsp:declaration>
|
16
|
|
17
|
<jsp:directive.include file="settings.jsp" />
|
18
|
|
19
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
20
|
<head>
|
21
|
|
22
|
<jsp:element name="script">
|
23
|
<jsp:attribute name="language">JavaScript</jsp:attribute>
|
24
|
<jsp:attribute name="src">
|
25
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/searchPathQuery.js"</jsp:expression>
|
26
|
</jsp:attribute>
|
27
|
</jsp:element>
|
28
|
<script type="text/javascript" language="JavaScript">
|
29
|
function trim(stringToTrim) {
|
30
|
return(stringToTrim.replace(/^\s+|\s+$/g,""));
|
31
|
}
|
32
|
|
33
|
function isEmpty(aTextField) {
|
34
|
var value = trim(aTextField.value);
|
35
|
var result = ((value.length == 0) || (value == null));
|
36
|
return(result);
|
37
|
}
|
38
|
|
39
|
function allowSubmit(formObj) {
|
40
|
var result = true;
|
41
|
var action = "";
|
42
|
|
43
|
action = trim(formObj.elements["action"].value);
|
44
|
if (action == "Login") {
|
45
|
if (isEmpty(formObj.elements["username"])) {
|
46
|
result = false;
|
47
|
alert("User name is required");
|
48
|
} else if (isEmpty(formObj.elements["organization"])) {
|
49
|
result = false;
|
50
|
alert("Organization is required");
|
51
|
} else if (isEmpty(formObj.elements["password"])) {
|
52
|
result = false;
|
53
|
alert("Password is required");
|
54
|
}
|
55
|
}
|
56
|
|
57
|
return(result);
|
58
|
}
|
59
|
</script>
|
60
|
|
61
|
<title>SAEON - South African Environmental Observation Network Repository</title>
|
62
|
<jsp:element name="link">
|
63
|
<jsp:attribute name="rel">stylesheet</jsp:attribute>
|
64
|
<jsp:attribute name="type">text/css</jsp:attribute>
|
65
|
<jsp:attribute name="href">
|
66
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/saeon.css"</jsp:expression>
|
67
|
</jsp:attribute>
|
68
|
</jsp:element>
|
69
|
</head>
|
70
|
|
71
|
<body>
|
72
|
<div class="templatecontentareaclass" style="background: #FFFFFF;">
|
73
|
<jsp:useBean id="clientViewBean" scope="session" class="edu.ucsb.nceas.metacat.clientview.ClientView" />
|
74
|
<jsp:setProperty name="clientViewBean" property="*" />
|
75
|
<jsp:scriptlet>
|
76
|
clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
|
77
|
clientViewHelper.clientRequest(request, response);
|
78
|
request.getSession().setAttribute("clientViewHelper", clientViewHelper);
|
79
|
</jsp:scriptlet>
|
80
|
|
81
|
<table>
|
82
|
<tr>
|
83
|
<td colspan="3">
|
84
|
<p class="regtext">
|
85
|
Welcome to the SAEON Data Repository.
|
86
|
This is the primary source for comprehensive information about scientific
|
87
|
and research data sets collected throughout the South African Environmental Observation Network.
|
88
|
</p>
|
89
|
</td>
|
90
|
</tr>
|
91
|
<tr valign="top">
|
92
|
<td>
|
93
|
|
94
|
<h2>Search for SAEON Data</h2>
|
95
|
|
96
|
<p class="emphasis">Searching:
|
97
|
<jsp:scriptlet>
|
98
|
String organizationScope = request.getParameter("organizationScope");
|
99
|
if (organizationScope == null) {
|
100
|
organizationScope = "";
|
101
|
}
|
102
|
if (!organizationScope.equals("")) {
|
103
|
</jsp:scriptlet>
|
104
|
<!-- set the map to use the correct scope -->
|
105
|
<script type="text/javascript" >
|
106
|
var dropDownTimer = null;
|
107
|
|
108
|
//this syncs the map based on the input string location
|
109
|
function setMapLocation(strLocation) {
|
110
|
|
111
|
var mapFrameDocument = document.getElementById("mapFrame").contentDocument;
|
112
|
if (!mapFrameDocument) {
|
113
|
//alert("IE");
|
114
|
mapFrameDocument = document.getElementById("mapFrame").contentWindow;
|
115
|
if (mapFrameDocument.document) {
|
116
|
mapFrameDocument = mapFrameDocument.document;
|
117
|
}
|
118
|
|
119
|
}
|
120
|
//alert("mapFrame=" + mapFrameDocument.name);
|
121
|
//alert("locations=" + mapFrameDocument.getElementsByTagName('locations'));
|
122
|
|
123
|
//check if the dropdown is loaded in DOM
|
124
|
if (mapFrameDocument.getElementsByName('locations').length == 0) {
|
125
|
dropDownTimer = setTimeout("setMapLocation('" + strLocation + "')", 100);
|
126
|
return false;
|
127
|
}
|
128
|
clearTimeout(dropDownTimer);
|
129
|
|
130
|
var locationMenu = mapFrameDocument.getElementsByName('locations')[0];
|
131
|
//alert("locationMenu=" + locationMenu);
|
132
|
var locationOptions = locationMenu.options;
|
133
|
//alert("locationOptions=" + locationOptions);
|
134
|
//loop through the options to find the correct location based on input string
|
135
|
for (var i=0; i < locationOptions.length; i++) {
|
136
|
if (locationOptions[i].text == strLocation) {
|
137
|
//set as selected
|
138
|
locationMenu.selectedIndex = i;
|
139
|
break;
|
140
|
}
|
141
|
}
|
142
|
//alert("Focusing on selected location: " + locationMenu.options[locationMenu.selectedIndex].text);
|
143
|
|
144
|
//the onchange command from select object
|
145
|
locationMenu.onchange();
|
146
|
//mapFrameDocument.config.objects.locationsSelect.setAoi(locationMenu.options[locationMenu.selectedIndex].value,'mainMap');
|
147
|
|
148
|
}
|
149
|
|
150
|
//kick it off
|
151
|
dropDownTimer =
|
152
|
setTimeout(
|
153
|
"setMapLocation('<jsp:expression>organizationScope</jsp:expression>')",
|
154
|
100);
|
155
|
|
156
|
</script>
|
157
|
|
158
|
<jsp:expression>organizationScope</jsp:expression>
|
159
|
<jsp:scriptlet>
|
160
|
}
|
161
|
else {
|
162
|
</jsp:scriptlet>
|
163
|
All Organizations
|
164
|
<jsp:scriptlet>
|
165
|
}
|
166
|
</jsp:scriptlet>
|
167
|
</p>
|
168
|
|
169
|
<jsp:element name="form">
|
170
|
<jsp:attribute name="id">searchform</jsp:attribute>
|
171
|
<jsp:attribute name="name">searchform</jsp:attribute>
|
172
|
<jsp:attribute name="method">post</jsp:attribute>
|
173
|
<jsp:attribute name="action">
|
174
|
<jsp:expression>METACAT_URL</jsp:expression>
|
175
|
</jsp:attribute>
|
176
|
<jsp:attribute name="target">_top</jsp:attribute>
|
177
|
<jsp:attribute name="onsubmit">setQueryFormField()</jsp:attribute>
|
178
|
<p class="regtext">
|
179
|
The repository search system is used to locate data sets of interest by
|
180
|
searching through existing registered data sets.
|
181
|
Presently the search covers all fields, including author, title, abstract,
|
182
|
keywords, and other documentation for each data set.
|
183
|
<br />
|
184
|
Use a '%' symbol as a wildcard in searches (e.g., '%herbivore%'
|
185
|
would locate any phrase with the word herbivore embedded within it).
|
186
|
</p>
|
187
|
<jsp:element name="input">
|
188
|
<jsp:attribute name="name">organizationScope</jsp:attribute>
|
189
|
<jsp:attribute name="id">organizationScope</jsp:attribute>
|
190
|
<jsp:attribute name="type">hidden</jsp:attribute>
|
191
|
<jsp:attribute name="value">
|
192
|
<jsp:expression>organizationScope</jsp:expression>
|
193
|
</jsp:attribute>
|
194
|
</jsp:element>
|
195
|
<jsp:element name="input">
|
196
|
<jsp:attribute name="name">sessionid</jsp:attribute>
|
197
|
<jsp:attribute name="type">hidden</jsp:attribute>
|
198
|
<jsp:attribute name="value">
|
199
|
<jsp:getProperty name="clientViewBean" property="sessionid" />
|
200
|
</jsp:attribute>
|
201
|
</jsp:element>
|
202
|
<input type="text" id="anyfield" name="anyfield" value="" size="14" />
|
203
|
<input type="hidden" id="query" name="query" />
|
204
|
<input type="hidden" name="qformat" value="saeon"/>
|
205
|
<input type="hidden" name="action" value="squery" />
|
206
|
<input type="submit" value="Search" />
|
207
|
<p class="regtext">
|
208
|
-Or-
|
209
|
<br />
|
210
|
Browse all existing data sets by title. This operation can be slow.
|
211
|
</p>
|
212
|
<input type="button" value="Browse All" onclick="setBrowseAll();form.submit()" />
|
213
|
</jsp:element>
|
214
|
|
215
|
</td>
|
216
|
<td width="250px">
|
217
|
|
218
|
<!-- Login section -->
|
219
|
<jsp:scriptlet>
|
220
|
if (!clientViewHelper.isLoggedIn()) {
|
221
|
</jsp:scriptlet>
|
222
|
|
223
|
<dl class="portlet" id="portlet-login" style="width: 100%;">
|
224
|
<dt class="portletHeader">
|
225
|
Log in
|
226
|
</dt>
|
227
|
<dd class="portletItem odd">
|
228
|
<form name="loginForm" method="post" action="./"
|
229
|
onsubmit="return allowSubmit(this);">
|
230
|
<input name="qformat" type="hidden" value="saeon" />
|
231
|
<table>
|
232
|
<tr valign="top">
|
233
|
<td>
|
234
|
<span class="required">User name</span>
|
235
|
</td>
|
236
|
<td>
|
237
|
<input name="username" type="text" value=""
|
238
|
style="width: 140" />
|
239
|
</td>
|
240
|
</tr>
|
241
|
<tr>
|
242
|
<td><span class="required">Organization</span></td>
|
243
|
<td><select name="organization" style="width: 140">
|
244
|
<option value="SAEON" selected="selected">SAEON</option>
|
245
|
<option value="SANParks">SANParks</option>
|
246
|
<option value="NCEAS">NCEAS</option>
|
247
|
<option value="unaffiliated">unaffiliated</option>
|
248
|
</select></td>
|
249
|
</tr>
|
250
|
<tr>
|
251
|
<td><span class="required">Password</span></td>
|
252
|
<td><input name="password" value="" type="password"
|
253
|
style="width: 140" maxlength="50" /></td>
|
254
|
</tr>
|
255
|
<tr>
|
256
|
<td></td>
|
257
|
<td colspan="1" align="right">
|
258
|
<input name="action"
|
259
|
value="Login" type="submit" class="button_login" />
|
260
|
</td>
|
261
|
</tr>
|
262
|
</table>
|
263
|
</form>
|
264
|
</dd>
|
265
|
|
266
|
<dd class="portletItem even">
|
267
|
<jsp:element name="a">
|
268
|
<jsp:attribute name="target">_parent</jsp:attribute>
|
269
|
<jsp:attribute name="href">
|
270
|
<jsp:expression>CGI_PREFIX + "/ldapweb.cgi?cfg=saeon"</jsp:expression>
|
271
|
</jsp:attribute>
|
272
|
<jsp:element name="img">
|
273
|
<jsp:attribute name="src">
|
274
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/images/user.gif"</jsp:expression>
|
275
|
</jsp:attribute>
|
276
|
<jsp:attribute name="alt">New User?</jsp:attribute>
|
277
|
<jsp:attribute name="title">User</jsp:attribute>
|
278
|
<jsp:attribute name="height">16</jsp:attribute>
|
279
|
<jsp:attribute name="width">16</jsp:attribute>
|
280
|
</jsp:element>
|
281
|
New user?
|
282
|
</jsp:element>
|
283
|
</dd>
|
284
|
</dl>
|
285
|
|
286
|
<jsp:scriptlet>
|
287
|
} else {
|
288
|
</jsp:scriptlet>
|
289
|
|
290
|
<dl class="portlet" id="portlet-login" style="width: 100%;">
|
291
|
<dt class="portletHeader">
|
292
|
Welcome,
|
293
|
<jsp:expression>clientViewBean.getUsername()</jsp:expression>
|
294
|
</dt>
|
295
|
<dd class="portletItem odd">
|
296
|
<table>
|
297
|
<tr valign="top">
|
298
|
<td>
|
299
|
<p class="regtext">
|
300
|
You are currently logged in.
|
301
|
</p>
|
302
|
</td>
|
303
|
<td>
|
304
|
<!-- <a target='_top' href='./index.jsp?action=Logout&qformat=saeon'> Logout </a> -->
|
305
|
</td>
|
306
|
</tr>
|
307
|
<!--
|
308
|
<tr valign="top">
|
309
|
<td colspan="2">
|
310
|
<p class="regtext">
|
311
|
(<jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression>)
|
312
|
</p>
|
313
|
</td>
|
314
|
</tr>
|
315
|
-->
|
316
|
</table>
|
317
|
</dd>
|
318
|
<dd class="portletItem even">
|
319
|
<jsp:element name="a">
|
320
|
<jsp:attribute name="target">_top</jsp:attribute>
|
321
|
<jsp:attribute name="href">
|
322
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/index.jsp?action=Logout&qformat=saeon"</jsp:expression>
|
323
|
</jsp:attribute>
|
324
|
<jsp:element name="img">
|
325
|
<jsp:attribute name="src">
|
326
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/images/user.gif"</jsp:expression>
|
327
|
</jsp:attribute>
|
328
|
<jsp:attribute name="alt">logout</jsp:attribute>
|
329
|
<jsp:attribute name="title">User</jsp:attribute>
|
330
|
<jsp:attribute name="height">16</jsp:attribute>
|
331
|
<jsp:attribute name="width">16</jsp:attribute>
|
332
|
</jsp:element>
|
333
|
logout
|
334
|
</jsp:element>
|
335
|
</dd>
|
336
|
<dd class="portletItem">
|
337
|
<jsp:element name="a">
|
338
|
<jsp:attribute name="target">_parent</jsp:attribute>
|
339
|
<jsp:attribute name="href">
|
340
|
<jsp:expression>CGI_PREFIX + "/ldapweb.cgi?cfg=saeon&stage=resetpass"</jsp:expression>
|
341
|
</jsp:attribute>
|
342
|
<jsp:element name="img">
|
343
|
<jsp:attribute name="src">
|
344
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/images/user.gif"</jsp:expression>
|
345
|
</jsp:attribute>
|
346
|
<jsp:attribute name="alt">reset password</jsp:attribute>
|
347
|
<jsp:attribute name="title">User</jsp:attribute>
|
348
|
<jsp:attribute name="height">16</jsp:attribute>
|
349
|
<jsp:attribute name="width">16</jsp:attribute>
|
350
|
</jsp:element>
|
351
|
reset your password
|
352
|
</jsp:element>
|
353
|
</dd>
|
354
|
<dd class="portletItem even">
|
355
|
<jsp:element name="a">
|
356
|
<jsp:attribute name="target">_parent</jsp:attribute>
|
357
|
<jsp:attribute name="href">
|
358
|
<jsp:expression>CGI_PREFIX + "/ldapweb.cgi?cfg=saeon&stage=changepass"</jsp:expression>
|
359
|
</jsp:attribute>
|
360
|
<jsp:element name="img">
|
361
|
<jsp:attribute name="src">
|
362
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/images/user.gif"</jsp:expression>
|
363
|
</jsp:attribute>
|
364
|
<jsp:attribute name="alt">change password</jsp:attribute>
|
365
|
<jsp:attribute name="title">User</jsp:attribute>
|
366
|
<jsp:attribute name="height">16</jsp:attribute>
|
367
|
<jsp:attribute name="width">16</jsp:attribute>
|
368
|
</jsp:element>
|
369
|
change your password
|
370
|
</jsp:element>
|
371
|
</dd>
|
372
|
</dl>
|
373
|
<jsp:scriptlet>
|
374
|
}
|
375
|
</jsp:scriptlet>
|
376
|
|
377
|
<!-- File Upload Form -->
|
378
|
<br />
|
379
|
<dl class="portlet" id="portlet-login" style="width: 100%;">
|
380
|
<dt class="portletHeader">
|
381
|
Data Package Upload
|
382
|
</dt>
|
383
|
<dd class="portletItem odd">
|
384
|
<jsp:scriptlet>
|
385
|
if (clientViewHelper.isLoggedIn()) {
|
386
|
</jsp:scriptlet>
|
387
|
<table>
|
388
|
<tr valign="top">
|
389
|
<td align="right">
|
390
|
<jsp:element name="form">
|
391
|
<jsp:attribute name="method">post</jsp:attribute>
|
392
|
<jsp:attribute name="action">
|
393
|
<jsp:expression>SERVER_URL_WITH_CONTEXT + "/style/skins/saeon/upload.jsp"</jsp:expression>
|
394
|
</jsp:attribute>
|
395
|
<input type="submit" value="Go >" class="button_login" />
|
396
|
</jsp:element>
|
397
|
</td>
|
398
|
</tr>
|
399
|
</table>
|
400
|
<jsp:scriptlet>
|
401
|
} else {
|
402
|
</jsp:scriptlet>
|
403
|
|
404
|
<p class="regtext">
|
405
|
You must be logged into your user account before uploading a data set.
|
406
|
</p>
|
407
|
<jsp:scriptlet>
|
408
|
}
|
409
|
</jsp:scriptlet>
|
410
|
|
411
|
</dd>
|
412
|
</dl>
|
413
|
|
414
|
</td>
|
415
|
|
416
|
<!-- so the map frame doesn't overlap content -->
|
417
|
<td width="50px"></td>
|
418
|
|
419
|
</tr>
|
420
|
|
421
|
<tr>
|
422
|
<td colspan="2" align="left">
|
423
|
|
424
|
<!-- Map here -->
|
425
|
<h2>Spatial Search</h2>
|
426
|
|
427
|
<div style="padding-left: 100px">
|
428
|
<!-- map frame -->
|
429
|
<script language="JavaScript">
|
430
|
insertMap("<jsp:expression>SERVER_URL_WITH_CONTEXT</jsp:expression>");
|
431
|
</script>
|
432
|
</div>
|
433
|
</td>
|
434
|
|
435
|
<!-- so the map frame doesn't overlap content -->
|
436
|
<td width="50px"></td>
|
437
|
|
438
|
</tr>
|
439
|
|
440
|
</table>
|
441
|
|
442
|
</div>
|
443
|
</body>
|
444
|
</html>
|
445
|
</jsp:root>
|