Project

General

Profile

1 5509 leinfelder
<%@ 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$'
9
 *      '$Date$'
10
 * '$Revision$'
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 5385 leinfelder
%>
27 5632 leinfelder
28 5509 leinfelder
<%@ include file="../../common/common-settings.jsp"%>
29
<%@ include file="../../common/configure-check.jsp"%>
30 5604 leinfelder
31 5385 leinfelder
<html>
32
<head>
33 5509 leinfelder
<title>Semantic search</title>
34
<link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/semtools/semtools.css">
35 5703 leinfelder
<link rel="stylesheet" type="text/css" href="<%=STYLE_COMMON_URL%>/jquery/jqueryui/css/smoothness/jquery-ui-1.8.6.custom.css">
36 5509 leinfelder
37 5703 leinfelder
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/jquery/jquery.js"></script>
38
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/jquery/jsTree/_lib/jquery.cookie.js"></script>
39
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/jquery/jsTree/jquery.jstree.js"></script>
40
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/jquery/jqueryui/js/jquery-ui-1.8.6.custom.min.js"></script>
41
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/jquery/busy/jquery.busy.js"></script>
42 5669 leinfelder
43 5703 leinfelder
<script language="javascript" type="text/javascript" src="<%=STYLE_SKINS_URL%>/semtools/search.js"></script>
44 5509 leinfelder
<script language="javascript" type="text/javascript" src="<%=STYLE_SKINS_URL%>/semtools/semtools.js"></script>
45
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/branding.js"></script>
46
47 5656 leinfelder
<script language="Javascript" type="text/JavaScript"><!--
48 5633 leinfelder
function populateActiveDomain(divId, class) {
49 5656 leinfelder
	// collect the filtering values we have so far
50
	// these are hidden input fields in the form for holding the selected values
51
	var entity = $("#activeEntitiesValue").val() ? $("#activeEntitiesValue").val() : "";
52
	var characteristic = $("#activeCharacteristicsValue").val() ? $("#activeCharacteristicsValue").val() : "";
53
	var protocol = $("#activeProtocolsValue").val() ? $("#activeProtocolsValue").val() : "";
54
	var measurement = $("#activeMeasurementsValue").val() ? $("#activeMeasurementsValue").val() : "";
55 5633 leinfelder
56 5656 leinfelder
	// TODO: remember the selected value for this when filtering by active domain
57
	var selectedNode = $("#" + divId).jstree("get_selected", $("#" + divId));
58
	var selectedNodeId = $(selectedNode).attr("id");
59 5668 leinfelder
	//alert(divId + " selected node: " + selectedNodeId);
60 5656 leinfelder
61
	// load the tree for the given div, passing in the other filtered values
62 5633 leinfelder
	$("#" + divId).load(
63 5656 leinfelder
		"<%=SERVLET_URL%>",
64
		{
65
			'action': "getactivedomain",
66
			'class': class,
67
			'entity': entity,
68
			'characteristic': characteristic,
69
			'protocol': protocol,
70
			'measurement': measurement
71
		},
72
		// call back function when loading finishes
73
		function(response, status, xhr) {
74
			//alert("callback for: " + divId + " selected node: " + selectedNodeId);
75
			// error
76
			if (status == "error") {
77
				var msg = "Sorry but there was an error: ";
78
				$("#error").html(msg + xhr.status + " " + xhr.statusText);
79
			}
80
81
			// make it a js tree
82
			$(function () {
83
				$("#" + divId)
84 5660 leinfelder
					//bind calls here
85 5656 leinfelder
					.jstree({
86
						"ui" : {
87
							"select_limit" : 1,
88
							"select_multiple_modifier" : "alt",
89
							"selected_parent_close" : "select_parent"//,
90
							//"initially_select" : [ selectedNodeId ]
91 5659 leinfelder
						},
92
						"themes" : {
93
							"theme" : "default",
94
							"dots" : true,
95
							"icons" : false
96
						},
97 5656 leinfelder
						//"core" : { "initially_open" : [ selectedNodeId ] },
98 5658 leinfelder
						"search" : { "case_insensitive" : true },
99 5668 leinfelder
						//"cookies" : {
100
						//		"save_opened" : "jstree_open_" + divId,
101
						//		"save_selected" : "jstree_select_" + divId,
102
						//},
103 5666 leinfelder
						"plugins" : [
104
							"themes",
105
							"html_data",
106
							"ui",
107 5668 leinfelder
							//"cookies",
108 5666 leinfelder
							"search" ]
109 5656 leinfelder
					});
110
			});
111
112 5658 leinfelder
			// enable searching on it
113
			$("#" + divId + "Search").keyup(
114
				function () {
115 5688 leinfelder
					var searchTerm = $("#" + divId + "Search").val();
116
					if (searchTerm.length >= 3) {
117 5678 leinfelder
						// search
118 5688 leinfelder
						$("#" + divId).jstree("search", searchTerm);
119 5663 leinfelder
						// now prune
120 5664 leinfelder
						prune(divId, "jstree-search");
121 5688 leinfelder
						// is it an exact match?
122
						checkExactMatch(divId, searchTerm, "jstree-search");
123 5658 leinfelder
					}
124
				});
125 5664 leinfelder
126
			// toggle the active domain prune
127 5668 leinfelder
			$("#" + divId + "Only").click(function() {
128
				doActiveDomain(divId);
129
			});
130 5658 leinfelder
131 5668 leinfelder
			// actually prune if we should
132
			doActiveDomain(divId);
133 5687 leinfelder
134
			// open first node always
135
			$("#" + divId).jstree("open_node", $("#" + divId).children("ul").first().children("li").first());
136 5668 leinfelder
137
			// open to the node to last selected
138 5667 leinfelder
			var nodePath = $("#" + divId).jstree("get_path", $(selectedNode));
139
			if (nodePath) {
140
				for (var index = 0; index < nodePath.length; index++) {
141
					$("#" + divId).jstree("open_node", $("#" + nodePath[index]));
142
				}
143
				// select the original node
144
				$("#" + divId).jstree("select_node", $(selectedNode), false);
145
				$("#" + divId).jstree("refresh", $(selectedNode));
146
				// TODO: scroll to selected node.
147
				// This is supposed to be part of jsTree 1.0-rc2 but appears to be broken
148
			}
149
150 5656 leinfelder
		});
151 5633 leinfelder
}
152 5664 leinfelder
/**
153
* Prunes the given tree to inlcude the given matched class
154
**/
155
function prune(divId, matchClass) {
156 5663 leinfelder
157
	// show all nodes (reset)
158
	$("#" + divId).find("li").show();
159
160 5664 leinfelder
	// done if we don't have any thing to prune
161
	if (!matchClass) {
162
		return;
163
	}
164
165 5663 leinfelder
	// get all non-matched anchor tags
166 5664 leinfelder
	var nonmatches = $("#" + divId).find("a").not("." + matchClass);
167 5663 leinfelder
168
	// get their parent nodes
169
	nonmatches = $(nonmatches).parents("li");
170
171
	// are there any matches under each parent node?
172
	$(nonmatches).each(
173
		function(index) {
174
			// do any chidren match?
175 5664 leinfelder
			var childMatches = $(this).find("a." + matchClass);
176 5663 leinfelder
			if (childMatches && childMatches.length > 0) {
177
				return true;
178
			}
179
			// parent matches?
180 5664 leinfelder
			var parentMatches = $(this).parents("li").children("a." + matchClass);
181 5663 leinfelder
			if (parentMatches && parentMatches.length > 0) {
182
				return true;
183
			}
184
			// hide this node if no matches under it
185
			$(this).hide();
186
		});
187
}
188 5688 leinfelder
function checkExactMatch(divId, searchTerm, matchClass) {
189
	// get the current search matches
190
	var matches = $("#" + divId).find("a." + matchClass);
191
	// get their parent nodes
192
	matches = $(matches).parents("li");
193
	// check for exact matches
194
	var exactMatch = $(matches).filter("#" + searchTerm).first();
195
	if (exactMatch && exactMatch.length == 1) {
196
		//alert("exactMatch: " + exactMatch);
197 5689 leinfelder
		// select in the tree, honoring the configured selection limit
198
		$("#" + divId).jstree("select_node", $(exactMatch), true);
199
		// act as those you clicked it
200
		// TODO: convert to event listeners on the tree
201 5688 leinfelder
		select($(exactMatch).children("a"));
202
	}
203
}
204 5668 leinfelder
function doActiveDomain(divId) {
205
	if ($("#" + divId + "Only").is(":checked")) {
206
		// prune to active
207
		prune(divId, "bold");
208
	} else {
209
		// reset
210
		prune(divId, null);
211
	}
212
}
213 5633 leinfelder
function initialize(source) {
214 5656 leinfelder
	// we don't want to reload the source of the filtering request
215
	// but we do want to reload the other trees for active domains
216
	// we reload all of them if no source is given - first time the page loads
217 5633 leinfelder
	if (source) {
218 5656 leinfelder
		source = $(source).attr("id");
219 5633 leinfelder
	}
220
	if (!source) {
221
		source = "";
222
	}
223
	if (source != 'activeEntities') {
224
		populateActiveDomain('activeEntities', 'org.ecoinformatics.sms.annotation.Entity');
225
	}
226
	if (source != 'activeCharacteristics') {
227
		populateActiveDomain('activeCharacteristics', 'org.ecoinformatics.sms.annotation.Characteristic');
228
	}
229
	if (source != 'activeProtocols') {
230
		populateActiveDomain('activeProtocols', 'org.ecoinformatics.sms.annotation.Protocol');
231
	}
232
	if (source != 'activeMeasurements') {
233
		populateActiveDomain('activeMeasurements', 'org.ecoinformatics.sms.annotation.Measurement');
234
	}
235
}
236 5656 leinfelder
function select(item) {
237 5633 leinfelder
238 5656 leinfelder
	// get the selected value, stored in the title attribute of the item <a> tag
239
	var value = $(item).attr("title");
240
	//alert("value: " + value);
241
242
	// get the parent div so we know what kind of class it is meant to filter
243
	// this is "the first parent of the class 'select'"
244
	var parent = $(item).parents("div.select:first");
245
	//alert("parent: " + parent);
246
247
	// set the value for the hidden input value
248 5774 leinfelder
	// the input field of class "conceptValue" will hold it, this way we don't need to know the id
249
	var input = $(parent).children("input.conceptValue");
250 5656 leinfelder
	$(input).val(value);
251
	//alert("input: " + input);
252 5662 leinfelder
253
	// set it in the search field
254
	var treeInstance = $(item).parents("div.jstree:first");
255
	var shortName = $(item).parent().attr("id");
256
	$("#" + $(treeInstance).attr("id") + "Search").val(shortName)
257 5656 leinfelder
258 5665 leinfelder
	// refresh the search results
259
	doSearch($("#searchForm").get(0));
260
261 5656 leinfelder
	// refresh the other trees for active domain after this filtering action
262 5666 leinfelder
	initialize($(parent).children("div"));
263 5656 leinfelder
}
264 5665 leinfelder
function doSearch(formObj) {
265
	// set the hidden parameters based on the current state of the form
266
	checkSearch(formObj);
267
268 5678 leinfelder
	// start the busy indicator
269 5684 leinfelder
	$("#searchResults").busy(
270
			{
271
				position	: 'left',
272
				offset		: -30,
273
				hide		: true,
274 5703 leinfelder
				img			: "<%=STYLE_COMMON_URL%>/jquery/busy/busy.gif"
275 5684 leinfelder
			});
276 5678 leinfelder
277 5665 leinfelder
	//load the results
278
	$("#searchResults").load(
279
		"<%=SERVLET_URL%>" + " #content_wrapper",
280
		$(formObj).serialize(),
281
		// call back function when loading finishes
282
		function(response, status, xhr) {
283
			if (status == "error") {
284
				var msg = "Sorry but there was an error performing the search: ";
285
				$("#error").html(msg + xhr.status + " " + xhr.statusText);
286
			}
287 5762 leinfelder
			// collapsible search results - show and hide the next div
288 5675 leinfelder
			$(function() {
289 5785 leinfelder
				$('#searchResults').find('.accordian').click(function() {
290 5765 leinfelder
					var ref = $(this);
291
					$(this).parent().next().slideToggle(
292
						"slow",
293
						function() {
294
							if ($(ref).parent().next().is(":visible")) {
295
								$(ref).html("-");
296
							} else {
297
								$(ref).html("+");
298
							}
299
						});
300 5675 leinfelder
					return false;
301 5762 leinfelder
				}).parent().next().hide();
302 5675 leinfelder
			});
303
304 5678 leinfelder
			// stop the busy indicator
305
			$("#searchResults").busy("hide");
306 5665 leinfelder
		});
307
308
	return false;
309
310
}
311 5781 leinfelder
function loadCart() {
312
313
	// start the busy indicator
314
	$("#cartResults").busy(
315 5785 leinfelder
		{
316
			position	: 'left',
317
			offset		: -30,
318
			hide		: true,
319
			img			: "<%=STYLE_COMMON_URL%>/jquery/busy/busy.gif"
320
		});
321 5781 leinfelder
322
	// for looking up the cart
323
	var params =
324
	{
325
		'action': 'getcart',
326
		'showAdd': 'false',
327
		'showRemove': 'true',
328
		'qformat': 'semtools'
329
	};
330
	//load the cart results
331
	$("#cartResults").load(
332
		"<%=SERVLET_URL%>" + " #content_wrapper",
333
		params,
334
		// call back function when loading finishes
335
		function(response, status, xhr) {
336
			if (status == "error") {
337
				var msg = "Sorry but there was an error performing the search: ";
338
				$("#error").html(msg + xhr.status + " " + xhr.statusText);
339
			}
340
			// collapsible search results - show and hide the next div
341
			$(function() {
342 5785 leinfelder
				$('#cartResults').find('.accordian').click(function() {
343 5781 leinfelder
					var ref = $(this);
344
					$(this).parent().next().slideToggle(
345
						"slow",
346
						function() {
347
							if ($(ref).parent().next().is(":visible")) {
348
								$(ref).html("-");
349
							} else {
350
								$(ref).html("+");
351
							}
352
						});
353
					return false;
354
				}).parent().next().hide();
355
			});
356
357
			// stop the busy indicator
358
			$("#cartResults").busy("hide");
359 5784 leinfelder
360
			//set the count for the tab label
361
			var title = "Cart (" + $("#cartResults").find(".resultCount:first").html() + ")";
362
			$("#searchTabs > ul > li").last().children("a").html("<span>" + title + "</span>");
363
364 5781 leinfelder
		});
365
	return true;
366
}
367
function clearCart() {
368
369
	// for looking up the cart
370
	var params =
371
	{
372
		'action': 'editcart',
373
		'operation': 'clear',
374
		'qformat': 'semtools'
375
	};
376
	// post the cart clear
377
	$("#cartResults").load(
378
		"<%=SERVLET_URL%>",
379
		params,
380
		// call back function when loading finishes
381
		function(response, status, xhr) {
382
			if (status == "error") {
383
				var msg = "Sorry but there was an error clearing the cart: ";
384
				$("#error").html(msg + xhr.status + " " + xhr.statusText);
385
			}
386
		});
387
	return true;
388
}
389 5668 leinfelder
function clearForm() {
390
	// clear the form values
391
	$('#searchForm').get(0).reset();
392
	// clear each of the tree selections
393
	$(".jstree").each(function(index) {
394
		$(this).jstree("deselect_all");
395
	});
396 5774 leinfelder
	$("input.conceptValue").each(function(index) {
397 5668 leinfelder
		$(this).val("");
398
	});
399
	// reload the trees
400
	initialize();
401
	// reload the search results
402
	//alert($('#searchForm').get(0));
403
	doSearch($('#searchForm').get(0));
404
}
405 5774 leinfelder
function addCurrent() {
406
407
	// make a container for this item
408
	var count = $("#searchCriteria").children(".searchItem").length;
409
	count++;
410
	var containerId = "searchItem_" + count;
411
	var container = "<div class='searchItem' id='" + containerId + "'/>";
412
	$("#searchCriteria").append(container);
413
414
	// get the current values
415
	$("input.conceptValue").each(function(index) {
416
		var title = $(this).attr("title");
417
		var value = $(this).val();
418
		var shortName = value.substr(value.lastIndexOf("#") + 1);
419
		var clone = $(this).clone();
420
		$(clone).removeClass("conceptValue");
421
		// put the value in the container
422
		$("#" + containerId).append(clone);
423
		$("#" + containerId).append("[" + title + " = " + shortName + "] ");
424
	});
425
	// get the current classes (for search to work correctly we need class+value for each entry)
426
	$("input.conceptClass").each(function(index) {
427
		var clone = $(this).clone();
428
		$(clone).removeClass("conceptClass");
429
		// put the class in the container
430
		$("#" + containerId).append(clone);
431
	});
432
433
	// add the remove button
434
	$("#" + containerId).append("<input type='button' value='Remove'/>").click(function() {
435
		// remove the container (includes the form objects we added)
436
		$("#" + containerId).remove();
437
		// refresh the search results now that they are less restrictive
438
		doSearch($("#searchForm").get(0));
439
	});
440
}
441 5685 leinfelder
/**
442
 * Perform this when the page first loads
443
 */
444
function pageLoad() {
445
	initialize();
446
	doSearch($('#searchForm').get(0));
447 5781 leinfelder
	//loadCart();
448 5685 leinfelder
}
449 5656 leinfelder
function donothing() {}
450
--></script>
451
452 5385 leinfelder
</head>
453 5685 leinfelder
<body onload="pageLoad()">
454 5509 leinfelder
<script language="javascript">
455
	insertTemplateOpening("<%=CONTEXT_URL%>");
456
</script>
457 5385 leinfelder
458 5574 leinfelder
<div id="content_wrapper">
459 5669 leinfelder
460 5690 leinfelder
<h2>Semantic search</h2>
461 5385 leinfelder
462 5633 leinfelder
<div id="error">
463
	<!-- error messages here -->
464
</div>
465
466 5669 leinfelder
<!-- set up the tabs -->
467
<script>
468
	$(function() {
469
		$("#searchTabs").tabs();
470
		$("#searchTabs").tabs("add", "#ecpTab", "Entity, Characteristic, Protocol");
471
		$("#searchTabs").tabs("add", "#measurementTab", "Measurement");
472 5672 leinfelder
		$("#searchTabs").tabs("add", "#optionsTab", "Options");
473 5782 leinfelder
		$("#searchTabs").tabs("add", "#cartTab", "Cart");
474 5669 leinfelder
	});
475
</script>
476
477 5665 leinfelder
<form method="POST"
478
		action="<%=SERVLET_URL%>"
479
		target="_top"
480
		id="searchForm"
481
		name="searchForm"
482
		onSubmit="return doSearch(this)">
483 5509 leinfelder
	<input name="query" type="hidden" />
484
	<input name="qformat" value="semtools" type="hidden" />
485 5665 leinfelder
	<input name="includeHeader" value="false" type="hidden" />
486 5781 leinfelder
	<input name="showAdd" value="true" type="hidden" />
487
	<input name="showRemove" value="false" type="hidden" />
488 5533 leinfelder
	<input name="action" value="semquery" type="hidden" />
489 5509 leinfelder
490 5672 leinfelder
	<!-- tabs for the search interface -->
491
	<div id="searchTabs">
492
		<!-- place holder for ui tabs -->
493
		<ul></ul>
494
495
		<!-- other criteria tabs -->
496
		<div id="ecpTab">
497
			<table>
498
				<tr>
499
					<td>
500
						<table class="subGroup subGroup_border">
501
502 5669 leinfelder
							<tr>
503 5672 leinfelder
								<th><p>Find observations of</p></th>
504
							</tr>
505
							<tr>
506 5669 leinfelder
								<td>
507 5672 leinfelder
									<input type="text" id="activeEntitiesSearch" />
508
									<input type="checkbox" id="activeEntitiesOnly" title="Show only active concepts" />
509
									<div class="select">
510
										<div id="activeEntities" class="activeTree">
511
											<p>loading...</p>
512
										</div>
513 5774 leinfelder
										<input type="hidden" class="conceptValue" name="activeEntitiesValue" id="activeEntitiesValue" title="Entity"/>
514
										<input type="hidden" class="conceptClass" name="activeEntitiesClass" id="activeEntitiesClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Entity"/>
515 5672 leinfelder
									</div>
516 5669 leinfelder
								</td>
517 5672 leinfelder
							</tr>
518
						</table>
519
					</td>
520
					<td>
521
						<table class="subGroup subGroup_border">
522
							<tr>
523
								<th><p>with measurements of</p></th>
524
							</tr>
525
							<tr>
526 5669 leinfelder
								<td>
527 5672 leinfelder
									<input type="text" id="activeCharacteristicsSearch" />
528
									<input type="checkbox" id="activeCharacteristicsOnly" title="Show only active concepts" />
529
									<div class="select">
530
										<div id="activeCharacteristics" class="activeTree">
531
											<p>loading...</p>
532
										</div>
533 5774 leinfelder
										<input type="hidden" class="conceptValue" name="activeCharacteristicsValue" id="activeCharacteristicsValue" title="Characteristic"/>
534
										<input type="hidden" class="conceptClass" name="activeCharacteristicsClass" id="activeCharacteristicsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Characteristic"/>
535 5672 leinfelder
									</div>
536 5669 leinfelder
								</td>
537
							</tr>
538
						</table>
539 5672 leinfelder
					</td>
540
					<td>
541
						<table class="subGroup subGroup_border">
542 5669 leinfelder
							<tr>
543 5672 leinfelder
								<th><p>using procedures outlined by</p></th>
544 5669 leinfelder
							</tr>
545
							<tr>
546
								<td>
547 5672 leinfelder
									<input type="text" id="activeProtocolsSearch" />
548
									<input type="checkbox" id="activeProtocolsOnly" title="Show only active concepts" />
549 5669 leinfelder
									<div class="select">
550 5672 leinfelder
										<div id="activeProtocols" class="activeTree">
551 5669 leinfelder
											<p>loading...</p>
552
										</div>
553 5774 leinfelder
										<input type="hidden" class="conceptValue" name="activeProtocolsValue" id="activeProtocolsValue" title="Protocol"/>
554
										<input type="hidden" class="conceptClass" name="activeProtocolsClass" id="activeProtocolsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Protocol"/>
555 5669 leinfelder
									</div>
556
								</td>
557
							</tr>
558
						</table>
559 5672 leinfelder
					</td>
560
				</tr>
561
			</table>
562 5782 leinfelder
563
			<!-- collected search criteria here -->
564
			<table class="subGroup subGroup_border onehundred_percent">
565
				<tr>
566
					<th>
567
						<p>
568
						Search criteria
569
						<input type="button" value="Save current selection as criterion" onclick="addCurrent()"/>
570
						</p>
571
					</th>
572
				</tr>
573
				<tr>
574
					<td>
575
						<div id="searchCriteria">
576
						</div>
577
					</td>
578
				</tr>
579
			</table>
580
581 5672 leinfelder
		</div>
582
583
		<!-- measurement -->
584
		<div id="measurementTab">
585
			<table class="subGroup subGroup_border onehundred_percent">
586 5669 leinfelder
587 5672 leinfelder
				<tr>
588
					<th><p>a template that defines Entity, Characteristic, Standard, and/or Protocol</p></th>
589
				</tr>
590
591
				<tr>
592
					<td>
593
						<input type="text" id="activeMeasurementsSearch" />
594
						Only active? <input type="checkbox" id="activeMeasurementsOnly" title="Show only active concepts"/>
595
						<div class="select">
596
							<div id="activeMeasurements" class="activeTree" style="width: 100%">
597
								<p>loading...</p>
598
							</div>
599 5774 leinfelder
							<input type="hidden" class="conceptValue" name="activeMeasurementsValue" id="activeMeasurementsValue" title="Measurement"/>
600
							<input type="hidden" class="conceptClass" name="activeMeasurementsClass" id="activeMeasurementsClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
601 5672 leinfelder
						</div>
602
					</td>
603
				</tr>
604
			</table>
605
		</div>
606 5669 leinfelder
607 5672 leinfelder
		<!-- query options -->
608
		<div id="optionsTab">
609
			<table class="group group_border">
610
				<tr>
611
					<th colspan="2">
612
						<p>
613
							Locate <b>data packages</b> that have been semantically annotated within the observation model by
614
							selecting concepts from OBOE extension ontologies
615
						</p>
616
					</th>
617
				</tr>
618
619
				<tr>
620
621
					<td colspan="1">Match All? <input type="checkbox" name="matchAll" checked="checked"/></td>
622
623
					<td colspan="1">From same Observation? <input type="checkbox" name="strict"/></td>
624
				</tr>
625
626
			</table>
627 5782 leinfelder
		</div>
628
629
		<!-- cart -->
630
		<div id="cartTab">
631
			<!--cart here -->
632
			<table class="subGroup subGroup_border onehundred_percent">
633
				<tr>
634
					<th>
635
						<p>
636
						Cart
637
						<input type="button" value="Refresh" onclick="loadCart()"/>
638
						<input type="button" value="Remove all" onclick="clearCart(); loadCart()"/>
639
						</p>
640
					</th>
641
				</tr>
642
				<tr>
643
					<td>
644
						<div id="cartResults">
645
						No items in cart
646
						</div>
647
					</td>
648
				</tr>
649
			</table>
650
		</div
651 5672 leinfelder
652
	</div>
653
654
	<br/>
655 5781 leinfelder
656 5672 leinfelder
	<!-- search results here -->
657
	<table class="subGroup subGroup_border onehundred_percent">
658 5632 leinfelder
		<tr>
659 5672 leinfelder
			<th>
660
				Search Results
661 5668 leinfelder
				<input type="reset" value="Clear" onclick="clearForm()"/>
662 5672 leinfelder
			</th>
663 5509 leinfelder
		</tr>
664
		<tr>
665 5672 leinfelder
			<td>
666
				<div id="searchResults">
667
				No query has been specified
668
				</div>
669
			</td>
670 5509 leinfelder
		</tr>
671 5672 leinfelder
	</table>
672
673 5509 leinfelder
</form>
674
675 5665 leinfelder
676 5672 leinfelder
677 5509 leinfelder
<!-- Included default search/login -->
678
<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
679
<script language="javascript">
680
	insertMap("<%=CONTEXT_URL%>");
681
</script>
682
<br/>
683
<% } %>
684
685
<script language="javascript">
686
	insertSearchBox("<%=CONTEXT_URL%>");
687
	insertLoginBox("<%=CONTEXT_URL%>");
688
</script>
689
690 5574 leinfelder
</div>
691
692 5509 leinfelder
<script language="javascript">
693
	insertTemplateClosing("<%=CONTEXT_URL%>");
694
</script>
695
696 5385 leinfelder
</body>
697
</html>