1
|
<%@ page language="java"%>
|
2
|
<%
|
3
|
/**
|
4
|
*
|
5
|
* '$RCSfile$'
|
6
|
* Copyright: 2008 Regents of the University of California and the
|
7
|
* National Center for Ecological Analysis and Synthesis
|
8
|
* '$Author: leinfelder $'
|
9
|
* '$Date: 2010-11-09 12:47:03 -0800 (Tue, 09 Nov 2010) $'
|
10
|
* '$Revision: 5633 $'
|
11
|
*
|
12
|
* This program is free software; you can redistribute it and/or modify
|
13
|
* it under the terms of the GNU General Public License as published by
|
14
|
* the Free Software Foundation; either version 2 of the License, or
|
15
|
* (at your option) any later version.
|
16
|
*
|
17
|
* This program is distributed in the hope that it will be useful,
|
18
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20
|
* GNU General Public License for more details.
|
21
|
|
22
|
* You should have received a copy of the GNU General Public License
|
23
|
* along with this program; if not, write to the Free Software
|
24
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25
|
*/
|
26
|
%>
|
27
|
|
28
|
<%@ include file="../../common/common-settings.jsp"%>
|
29
|
<%@ include file="../../common/configure-check.jsp"%>
|
30
|
|
31
|
<html>
|
32
|
<head>
|
33
|
<title>Semantic search</title>
|
34
|
<link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/semtools/semtools.css">
|
35
|
<script type="text/javascript"
|
36
|
src="<%=STYLE_SKINS_URL%>/semtools/search.js"></script>
|
37
|
|
38
|
<script type="text/javascript">
|
39
|
// Set defaults for this installation
|
40
|
//var BP_SEARCH_SERVER = "http://oor-01.cim3.net";
|
41
|
//var BP_SITE = "Sandbox";
|
42
|
//var BP_ORG = "OOR";
|
43
|
</script>
|
44
|
<script language="Javascript" type="text/JavaScript"
|
45
|
src="<%=STYLE_SKINS_URL%>/semtools/bioportal/form_complete.js">
|
46
|
</script>
|
47
|
|
48
|
<script language="javascript" type="text/javascript" src="<%=STYLE_SKINS_URL%>/semtools/semtools.js"></script>
|
49
|
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/branding.js"></script>
|
50
|
|
51
|
<script language="Javascript" type="text/JavaScript">
|
52
|
function populateActiveDomain(divId, class) {
|
53
|
var entity = $("#activeEntities").val() ? $("#activeEntities").val() : "";
|
54
|
var characteristic = $("#activeCharacteristics").val() ? $("#activeCharacteristics").val() : "";
|
55
|
var protocol = $("#activeProtocols").val() ? $("#activeProtocols").val() : "";
|
56
|
var measurement = $("#activeMeasurements").val() ? $("#activeMeasurements").val() : "";
|
57
|
|
58
|
var originalValue = $("#" + divId).val();
|
59
|
$("#" + divId).load(
|
60
|
"http://fred.msi.ucsb.edu:8080/knb/metacat",
|
61
|
{
|
62
|
'action': "getactivedomain",
|
63
|
'class': class,
|
64
|
'entity': entity,
|
65
|
'characteristic': characteristic,
|
66
|
'protocol': protocol,
|
67
|
'measurement': measurement
|
68
|
},
|
69
|
function(response, status, xhr) {
|
70
|
if (status == "error") {
|
71
|
var msg = "Sorry but there was an error: ";
|
72
|
$("#error").html(msg + xhr.status + " " + xhr.statusText);
|
73
|
}
|
74
|
// set the original selected value
|
75
|
$("#" + divId).val(originalValue);
|
76
|
});
|
77
|
}
|
78
|
function initialize(source) {
|
79
|
if (source) {
|
80
|
source = source.id;
|
81
|
}
|
82
|
if (!source) {
|
83
|
source = "";
|
84
|
}
|
85
|
if (source != 'activeEntities') {
|
86
|
populateActiveDomain('activeEntities', 'org.ecoinformatics.sms.annotation.Entity');
|
87
|
}
|
88
|
if (source != 'activeCharacteristics') {
|
89
|
var v = $('#activeCharacteristics').val();
|
90
|
populateActiveDomain('activeCharacteristics', 'org.ecoinformatics.sms.annotation.Characteristic');
|
91
|
$('#activeCharacteristics').val(v);
|
92
|
}
|
93
|
if (source != 'activeProtocols') {
|
94
|
var v = $('#activeProtocols').val();
|
95
|
populateActiveDomain('activeProtocols', 'org.ecoinformatics.sms.annotation.Protocol');
|
96
|
$('#activeProtocols').val(v);
|
97
|
}
|
98
|
if (source != 'activeMeasurements') {
|
99
|
var v = $('#activeMeasurements').val();
|
100
|
populateActiveDomain('activeMeasurements', 'org.ecoinformatics.sms.annotation.Measurement');
|
101
|
$('#activeMeasurements').val(v);
|
102
|
}
|
103
|
}
|
104
|
</script>
|
105
|
|
106
|
</head>
|
107
|
<body onload="initialize()">
|
108
|
<script language="javascript">
|
109
|
insertTemplateOpening("<%=CONTEXT_URL%>");
|
110
|
</script>
|
111
|
|
112
|
<div id="content_wrapper">
|
113
|
|
114
|
<h2>Annotation-based search</h2>
|
115
|
|
116
|
<div id="error">
|
117
|
<!-- error messages here -->
|
118
|
</div>
|
119
|
|
120
|
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm" name="searchForm" onSubmit="return checkSearch(this)">
|
121
|
<input name="query" type="hidden" />
|
122
|
<input name="qformat" value="semtools" type="hidden" />
|
123
|
<input name="action" value="semquery" type="hidden" />
|
124
|
|
125
|
<table class="group group_border">
|
126
|
<tr>
|
127
|
<th colspan="3">
|
128
|
<p>
|
129
|
Locate <b>data packages</b> that have been semantically annotated within the observation model by
|
130
|
selecting concepts from
|
131
|
<br/>
|
132
|
(a) existing semantic annotations
|
133
|
<br/>
|
134
|
(b) registered OBOE extension ontologies
|
135
|
</p>
|
136
|
</th>
|
137
|
</tr>
|
138
|
<!-- measurement -->
|
139
|
<tr>
|
140
|
<td colspan="3">
|
141
|
<table class="subGroup subGroup_border onehundred_percent">
|
142
|
<tr>
|
143
|
<th colspan="2">
|
144
|
Measurement
|
145
|
</th>
|
146
|
</tr>
|
147
|
<tr>
|
148
|
<td>a template that defines Entity, Characteristic, Standard, and/or Protocol</td>
|
149
|
</tr>
|
150
|
<tr>
|
151
|
<td>
|
152
|
<select name="activeMeasurements" id="activeMeasurements" multiple="multiple" size="5" style="width: 100%" onchange="initialize(this)">
|
153
|
<option>loading...</option>
|
154
|
</select>
|
155
|
<input type="hidden" name="activeMeasurementsClass" id="activeMeasurementsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
|
156
|
</td>
|
157
|
</tr>
|
158
|
<tr>
|
159
|
<td colspan="1">
|
160
|
<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="60" />
|
161
|
<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
|
162
|
</td>
|
163
|
</tr>
|
164
|
</table>
|
165
|
</td>
|
166
|
</tr>
|
167
|
<tr>
|
168
|
<td>
|
169
|
<table class="subGroup subGroup_border">
|
170
|
<tr>
|
171
|
<th colspan="1">
|
172
|
Entity
|
173
|
</th>
|
174
|
</tr>
|
175
|
<tr>
|
176
|
<td>Find observations of</td>
|
177
|
</tr>
|
178
|
<tr>
|
179
|
<td>
|
180
|
(a)
|
181
|
<select name="activeEntities" id="activeEntities" multiple="multiple" size="5" style="width: 216px" onchange="initialize(this)">
|
182
|
<option>loading...</option>
|
183
|
</select>
|
184
|
<input type="hidden" name="activeEntitiesClass" id="activeEntitiesClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Entity"/>
|
185
|
</td>
|
186
|
</tr>
|
187
|
<tr>
|
188
|
<td colspan="1">
|
189
|
(b)
|
190
|
<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
|
191
|
<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Entity"/>
|
192
|
</td>
|
193
|
</tr>
|
194
|
</table>
|
195
|
</td>
|
196
|
<td>
|
197
|
<table class="subGroup subGroup_border">
|
198
|
<tr>
|
199
|
<th colspan="1">
|
200
|
Characteristic
|
201
|
</th>
|
202
|
</tr>
|
203
|
<tr>
|
204
|
<td>with measurements of</td>
|
205
|
</tr>
|
206
|
<tr>
|
207
|
<td>
|
208
|
<select name="activeCharacteristics" id="activeCharacteristics" multiple="multiple" size="5" style="width: 216px" onchange="initialize(this)">
|
209
|
<option>loading...</option>
|
210
|
</select>
|
211
|
<input type="hidden" name="activeCharacteristicsClass" id="activeCharacteristicsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Characteristic"/>
|
212
|
</td>
|
213
|
</tr>
|
214
|
<tr>
|
215
|
<td colspan="1">
|
216
|
<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
|
217
|
<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Characteristic"/>
|
218
|
</td>
|
219
|
</tr>
|
220
|
</table>
|
221
|
</td>
|
222
|
<!-- removing Standard
|
223
|
<td>
|
224
|
<table class="subGroup subGroup_border">
|
225
|
<tr>
|
226
|
<th colspan="1">
|
227
|
Standard
|
228
|
</th>
|
229
|
</tr>
|
230
|
<tr>
|
231
|
<td>were recorded in units of</td>
|
232
|
</tr>
|
233
|
<tr>
|
234
|
<td>
|
235
|
<select name="activeStandards" id="activeStandards" multiple="multiple" size="5" style="width: 216px" onchange="initialize(this)">
|
236
|
<option>loading...</option>
|
237
|
</select>
|
238
|
<input type="hidden" name="activeStandardsClass" id="activeStandardsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Standard"/>
|
239
|
</td>
|
240
|
</tr>
|
241
|
<tr>
|
242
|
<td colspan="1">
|
243
|
<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
|
244
|
<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Standard"/>
|
245
|
</td>
|
246
|
</tr>
|
247
|
</table>
|
248
|
</td>
|
249
|
-->
|
250
|
<td>
|
251
|
<table class="subGroup subGroup_border">
|
252
|
<tr>
|
253
|
<th colspan="1">
|
254
|
Protocol
|
255
|
</th>
|
256
|
</tr>
|
257
|
<tr>
|
258
|
<td>using procedures outlined by</td>
|
259
|
</tr>
|
260
|
<tr>
|
261
|
<td>
|
262
|
<select name="activeProtocols" id="activeProtocols" multiple="multiple" size="5" style="width: 216px" onchange="initialize(this)">
|
263
|
<option>loading...</option>
|
264
|
</select>
|
265
|
<input type="hidden" name="activeProtocolsClass" id="activeProtocolsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Protocol"/>
|
266
|
</td>
|
267
|
</tr>
|
268
|
<tr>
|
269
|
<td colspan="1">
|
270
|
<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
|
271
|
<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Protocol"/>
|
272
|
</td>
|
273
|
</tr>
|
274
|
</table>
|
275
|
</td>
|
276
|
</tr>
|
277
|
<tr>
|
278
|
<td colspan="3">Match All? <input type="checkbox" name="matchAll" checked="checked"/></td>
|
279
|
</tr>
|
280
|
<tr>
|
281
|
<td colspan="3">From same Observation? <input type="checkbox" name="strict"/></td>
|
282
|
</tr>
|
283
|
<tr>
|
284
|
<td colspan="3">
|
285
|
<input type="submit" value="Search"/>
|
286
|
<input type="reset" value="Clear" onclick="$('#searchForm').get(0).reset(); initialize()"/>
|
287
|
</td>
|
288
|
</tr>
|
289
|
</table>
|
290
|
<!--
|
291
|
<tr>
|
292
|
<td>Entity: (SBC only)</td>
|
293
|
<td><input type="text" name="entity" class="bp_form_complete-1523-uri" size="100" /></td>
|
294
|
</tr>
|
295
|
-->
|
296
|
</form>
|
297
|
|
298
|
<!-- Included default search/login -->
|
299
|
<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
|
300
|
<script language="javascript">
|
301
|
insertMap("<%=CONTEXT_URL%>");
|
302
|
</script>
|
303
|
<br/>
|
304
|
<% } %>
|
305
|
|
306
|
<script language="javascript">
|
307
|
insertSearchBox("<%=CONTEXT_URL%>");
|
308
|
insertLoginBox("<%=CONTEXT_URL%>");
|
309
|
</script>
|
310
|
|
311
|
</div>
|
312
|
|
313
|
<script language="javascript">
|
314
|
insertTemplateClosing("<%=CONTEXT_URL%>");
|
315
|
</script>
|
316
|
|
317
|
</body>
|
318
|
</html>
|