Project

General

Profile

metacat / lib / style / skins / semtools / index.jsp @ 5604

1
<%@ page language="java"%>
2
<%@page import="java.util.List"%>
3
<%@page import="org.ecoinformatics.sms.SMS"%>
4
<%@page import="org.ecoinformatics.sms.ontology.OntologyClass"%>
5
<%
6
/**
7
 * 
8
 * '$RCSfile$'
9
 * Copyright: 2008 Regents of the University of California and the
10
 *             National Center for Ecological Analysis and Synthesis
11
 *    '$Author: leinfelder $'
12
 *      '$Date: 2010-10-07 13:33:15 -0700 (Thu, 07 Oct 2010) $'
13
 * '$Revision: 5604 $'
14
 * 
15
 * This program is free software; you can redistribute it and/or modify
16
 * it under the terms of the GNU General Public License as published by
17
 * the Free Software Foundation; either version 2 of the License, or
18
 * (at your option) any later version.
19
 * 
20
 * This program is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU General Public License for more details.
24
     
25
 * You should have received a copy of the GNU General Public License
26
 * along with this program; if not, write to the Free Software
27
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
 */  
29
%>
30
<%
31
	// construct the selection fields for existing annotations
32
	// Entity
33
	StringBuffer entityOptions = new StringBuffer();
34
	List<OntologyClass> entities = SMS.getInstance().getAnnotationManager().getActiveEntities();
35
	for (OntologyClass oc: entities) {
36
		entityOptions.append("<option ");
37
		entityOptions.append("title='");
38
		entityOptions.append(oc.getURI());
39
		entityOptions.append("' ");
40
		entityOptions.append("value='");
41
		entityOptions.append(oc.getURI());
42
		entityOptions.append("'");
43
		entityOptions.append(">");
44
		entityOptions.append(oc.getName());
45
		entityOptions.append("</option>");
46
	}
47
	// Characteristic
48
	StringBuffer characteristicOptions = new StringBuffer();
49
	List<OntologyClass> characteristics = SMS.getInstance().getAnnotationManager().getActiveCharacteristics();
50
	for (OntologyClass oc: characteristics) {
51
		characteristicOptions.append("<option ");
52
		characteristicOptions.append("title='");
53
		characteristicOptions.append(oc.getURI());
54
		characteristicOptions.append("' ");
55
		characteristicOptions.append("value='");
56
		characteristicOptions.append(oc.getURI());
57
		characteristicOptions.append("'");
58
		characteristicOptions.append(">");
59
		characteristicOptions.append(oc.getName());
60
		characteristicOptions.append("</option>");
61
	}
62
	// Standard
63
	StringBuffer standardOptions = new StringBuffer();
64
	List<OntologyClass> standards = SMS.getInstance().getAnnotationManager().getActiveStandards();
65
	for (OntologyClass oc: standards) {
66
		standardOptions.append("<option ");
67
		standardOptions.append("title='");
68
		standardOptions.append(oc.getURI());
69
		standardOptions.append("' ");
70
		standardOptions.append("value='");
71
		standardOptions.append(oc.getURI());
72
		standardOptions.append("'");
73
		standardOptions.append(">");
74
		standardOptions.append(oc.getName());
75
		standardOptions.append("</option>");
76
	}
77
	// Protocol
78
	StringBuffer protocolOptions = new StringBuffer();
79
	List<OntologyClass> protocols = SMS.getInstance().getAnnotationManager().getActiveProtocols();
80
	for (OntologyClass oc: protocols) {
81
		protocolOptions.append("<option ");
82
		protocolOptions.append("title='");
83
		protocolOptions.append(oc.getURI());
84
		protocolOptions.append("' ");
85
		protocolOptions.append("value='");
86
		protocolOptions.append(oc.getURI());
87
		protocolOptions.append("'");
88
		protocolOptions.append(">");
89
		protocolOptions.append(oc.getName());
90
		protocolOptions.append("</option>");
91
	}
92
	// Measurement
93
	StringBuffer measurementOptions = new StringBuffer();
94
	List<OntologyClass> measurements = SMS.getInstance().getAnnotationManager().getActiveMeasurements();
95
	for (OntologyClass oc: measurements) {
96
		measurementOptions.append("<option ");
97
		measurementOptions.append("title='");
98
		measurementOptions.append(oc.getURI());
99
		measurementOptions.append("' ");
100
		measurementOptions.append("value='");
101
		measurementOptions.append(oc.getURI());
102
		measurementOptions.append("'");
103
		measurementOptions.append(">");
104
		measurementOptions.append(oc.getName());
105
		measurementOptions.append("</option>");
106
	}
107
%>
108

    
109
<%@ include file="../../common/common-settings.jsp"%>
110
<%@ include file="../../common/configure-check.jsp"%>
111

    
112
<html>
113
<head>
114
<title>Semantic search</title>
115
<link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/semtools/semtools.css">
116
<script type="text/javascript"
117
	src="<%=STYLE_SKINS_URL%>/semtools/search.js"></script>
118

    
119
<script type="text/javascript">
120
                    	    // Set defaults for this installation
121
                    	    //var BP_SEARCH_SERVER = "http://oor-01.cim3.net";
122
                    	    //var BP_SITE = "Sandbox";
123
                    	    //var BP_ORG = "OOR";
124
                    	  </script>
125
<script language="Javascript" type="text/JavaScript"
126
	src="<%=STYLE_SKINS_URL%>/semtools/bioportal/form_complete.js">
127
</script>
128

    
129
<script language="javascript" type="text/javascript" src="<%=STYLE_SKINS_URL%>/semtools/semtools.js"></script>
130
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/branding.js"></script>
131

    
132
</head>
133
<body>
134
<script language="javascript">
135
	insertTemplateOpening("<%=CONTEXT_URL%>");
136
</script>
137

    
138
<div id="content_wrapper">
139

    
140
<h2>Annotation-based search</h2>
141

    
142
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm" name="searchForm" onSubmit="return checkSearch(this)">
143
	<input name="query" type="hidden" />
144
	<input name="qformat" value="semtools" type="hidden" />
145
	<input name="action" value="semquery" type="hidden" />
146

    
147
	<table class="group group_border">
148
		<tr>
149
			<th colspan="5">
150
				<p>
151
					Locate <b>data packages</b> that have been semantically annotated within the observation model by
152
					selecting concepts from
153
					<br/>
154
					(a) existing semantic annotations
155
					<br/>
156
					(b) registered OBOE extension ontologies
157
				</p>
158
			</th>
159
		</tr>
160
		<tr>
161
			<td>
162
				<table class="subGroup subGroup_border">
163
					<tr>
164
						<th colspan="1">
165
							Entity
166
						</th>
167
					</tr>
168
					<tr>
169
						<td>Find observations of</td>
170
					</tr>
171
					<tr>
172
						<td>
173
							(a)
174
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
175
								<%=entityOptions %>
176
							</select>
177
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Entity"/>
178
						</td>
179
					</tr>
180
					<tr>
181
						<td colspan="1">
182
							(b)
183
							<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
184
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Entity"/>
185
						</td>
186
					</tr>
187
				</table>
188
			</td>
189
			<td>
190
				<table class="subGroup subGroup_border">
191
					<tr>
192
						<th colspan="1">
193
							Characteristic
194
						</th>
195
					</tr>
196
					<tr>
197
						<td>where measurements of</td>
198
					</tr>
199
					<tr>
200
						<td>
201
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
202
								<%=characteristicOptions %>
203
							</select>
204
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Characteristic"/>
205
						</td>
206
					</tr>
207
					<tr>
208
						<td colspan="1">
209
							<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
210
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Characteristic"/>
211
						</td>
212
					</tr>
213
				</table>
214
			</td>
215
			<td>
216
				<table class="subGroup subGroup_border">
217
					<tr>
218
						<th colspan="1">
219
							Standard
220
						</th>
221
					</tr>
222
					<tr>
223
						<td>were recorded in units of</td>
224
					</tr>
225
					<tr>
226
						<td>
227
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
228
								<%=standardOptions %>
229
							</select>
230
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Standard"/>
231
						</td>
232
					</tr>
233
					<tr>
234
						<td colspan="1">
235
							<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
236
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Standard"/>
237
						</td>
238
					</tr>
239
				</table>
240
			</td>
241
			<td>
242
				<table class="subGroup subGroup_border">
243
					<tr>
244
						<th colspan="1">
245
							Protocol
246
						</th>
247
					</tr>
248
					<tr>
249
						<td>following procedures outlined by</td>
250
					</tr>
251
					<tr>
252
						<td>
253
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
254
								<%=protocolOptions %>
255
							</select>
256
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Protocol"/>
257
						</td>
258
					</tr>
259
					<tr>
260
						<td colspan="1">
261
							<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
262
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Protocol"/>
263
						</td>
264
					</tr>
265
				</table>
266
			</td>
267
			<td>
268
				<table class="subGroup subGroup_border">
269
					<tr>
270
						<th colspan="2">
271
							Measurement
272
						</th>
273
					</tr>
274
					<tr>
275
						<td>typically defined as</td>
276
					</tr>
277
					<tr>
278
						<td>
279
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
280
								<%=measurementOptions %>
281
							</select>
282
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
283
						</td>
284
					</tr>
285
					<tr>
286
						<td colspan="1">
287
							<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="30" />
288
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
289
						</td>
290
					</tr>
291
				</table>
292
			</td>
293
		</tr>
294
		<tr>
295
			<td colspan="5">Match All? <input type="checkbox" name="matchAll" checked="checked"/></td>
296
		</tr>
297
		<tr>
298
			<td colspan="5">From same Observation? <input type="checkbox" name="strict"/></td>
299
		</tr>
300
		<tr>
301
			<td colspan="5"><input type="submit" value="Search"/></td>
302
		</tr>
303
	</table>
304
		<!-- 
305
		<tr>
306
			<td>Entity: (SBC only)</td>
307
			<td><input type="text" name="entity" class="bp_form_complete-1523-uri" size="100" /></td>
308
		</tr>
309
		 -->		
310
</form>
311

    
312
<!--  
313
<h2>Ontology search</h2>
314
<div id="bp_quick_jump"></div>
315
<script type="text/javascript">
316
    var BP_ontology_id = "all";
317
</script>
318
<script src="<%=STYLE_SKINS_URL%>/semtools/bioportal/quick_jump.js" type="text/javascript" charset="utf-8">
319
</script>
320

    
321
<h2>Tree browser</h2>
322

    
323
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
324
	id="OntologyTree" width="300" height="100%"
325
	codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
326
	<param name="movie" value="http://keg.cs.uvic.ca/ncbo/ontologytree/OntologyTree.swf" />
327
	<param name="quality" value="high" />
328
	<param name="bgcolor" value="#ffffff" />
329
	<param name="allowScriptAccess" value="always" />
330
	<param name="flashVars" value="ontology=1523&alerterrors=false&canchangeontology=false&virtual=true" />
331
	<embed src="http://keg.cs.uvic.ca/ncbo/ontologytree/OntologyTree.swf" quality="high" bgcolor="#ffffff"
332
		width="300" height="100%" name="OntologyTree" align="middle"
333
		play="true"
334
		loop="false"
335
		allowScriptAccess="always"
336
		type="application/x-shockwave-flash"
337
		flashVars="ontology=1523&alerterrors=false&canchangeontology=false&virtual=true"
338
		pluginspage="http://www.adobe.com/go/getflashplayer">
339
	</embed>
340
</object>
341
-->
342

    
343
<!-- Included default search/login -->
344
<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
345
<script language="javascript">
346
	insertMap("<%=CONTEXT_URL%>");
347
</script>
348
<br/>
349
<% } %>
350
  
351
<script language="javascript">
352
	insertSearchBox("<%=CONTEXT_URL%>");
353
	insertLoginBox("<%=CONTEXT_URL%>");	
354
</script>
355

    
356
</div>
357

    
358
<script language="javascript">
359
	insertTemplateClosing("<%=CONTEXT_URL%>");
360
</script>
361

    
362
</body>
363
</html>