Project

General

Profile

« Previous | Next » 

Revision 5632

starting to filter by active domains. still request-based, but would like to make asynchronous calls when populating the fields.

View differences:

index.jsp
1 1
<%@ page language="java"%>
2 2
<%@page import="java.util.List"%>
3
<%@page import="java.util.ArrayList"%>
3 4
<%@page import="org.ecoinformatics.sms.SMS"%>
4 5
<%@page import="org.ecoinformatics.sms.ontology.OntologyClass"%>
6

  
5 7
<%
6 8
/**
7 9
 * 
......
28 30
 */  
29 31
%>
30 32
<%
33

  
34
	//harvest parameters
35
	String[] entityParam = request.getParameterValues("entity");
36
	String[] characteristicParam = request.getParameterValues("characteristic");
37
	String[] standardParam = request.getParameterValues("standard");
38
	String[] protocolParam = request.getParameterValues("protocol");
39
	String[] measurementParam = request.getParameterValues("measurement");
40
	
41
	List<OntologyClass> activeEntities = new ArrayList<OntologyClass>();
42
	List<OntologyClass> activeCharacteristics = new ArrayList<OntologyClass>();
43
	List<OntologyClass> activeStandards = new ArrayList<OntologyClass>();
44
	List<OntologyClass> activeProtocols = new ArrayList<OntologyClass>();
45
	List<OntologyClass> activeMeasurements = new ArrayList<OntologyClass>();
46
	
47
	// Entity
48
	if (entityParam != null) {
49
		for (String entityString: entityParam) {
50
			OntologyClass e = new OntologyClass(entityString);
51
			activeEntities.add(e);
52
		}
53
	}
54
	// Characteristic
55
	if (characteristicParam != null) {
56
		for (String classString: characteristicParam) {
57
			OntologyClass c = new OntologyClass(classString);
58
			activeCharacteristics.add(c);
59
		}
60
	}
61
	// Standard
62
	if (standardParam != null) {
63
		for (String classString: standardParam) {
64
			OntologyClass c = new OntologyClass(classString);
65
			activeStandards.add(c);
66
		}
67
	}
68
	// Protocol
69
	if (protocolParam != null) {
70
		for (String classString: protocolParam) {
71
			OntologyClass c = new OntologyClass(classString);
72
			activeProtocols.add(c);
73
		}
74
	}
75
	// Measurement
76
	// TODO: implement measurement expansion
77
	
31 78
	// construct the selection fields for existing annotations
32 79
	// Entity
33 80
	StringBuffer entityOptions = new StringBuffer();
34
	List<OntologyClass> entities = SMS.getInstance().getAnnotationManager().getActiveEntities();
81
	List<OntologyClass> entities = SMS.getInstance().getAnnotationManager().getActiveEntities(activeCharacteristics, activeStandards);
35 82
	for (OntologyClass oc: entities) {
36 83
		entityOptions.append("<option ");
37 84
		entityOptions.append("title='");
......
46 93
	}
47 94
	// Characteristic
48 95
	StringBuffer characteristicOptions = new StringBuffer();
49
	List<OntologyClass> characteristics = SMS.getInstance().getAnnotationManager().getActiveCharacteristics();
96
	List<OntologyClass> characteristics = SMS.getInstance().getAnnotationManager().getActiveCharacteristics(activeEntities, activeStandards);
50 97
	for (OntologyClass oc: characteristics) {
51 98
		characteristicOptions.append("<option ");
52 99
		characteristicOptions.append("title='");
......
61 108
	}
62 109
	// Standard
63 110
	StringBuffer standardOptions = new StringBuffer();
64
	List<OntologyClass> standards = SMS.getInstance().getAnnotationManager().getActiveStandards();
111
	List<OntologyClass> standards = SMS.getInstance().getAnnotationManager().getActiveStandards(activeEntities, activeCharacteristics);
65 112
	for (OntologyClass oc: standards) {
66 113
		standardOptions.append("<option ");
67 114
		standardOptions.append("title='");
......
74 121
		standardOptions.append(oc.getName());
75 122
		standardOptions.append("</option>");
76 123
	}
77
	// Protocol
124
	// Protocol TODO: filtering
78 125
	StringBuffer protocolOptions = new StringBuffer();
79 126
	List<OntologyClass> protocols = SMS.getInstance().getAnnotationManager().getActiveProtocols();
80 127
	for (OntologyClass oc: protocols) {
......
89 136
		protocolOptions.append(oc.getName());
90 137
		protocolOptions.append("</option>");
91 138
	}
92
	// Measurement
139
	// Measurement TODO: filtering
93 140
	StringBuffer measurementOptions = new StringBuffer();
94 141
	List<OntologyClass> measurements = SMS.getInstance().getAnnotationManager().getActiveMeasurements();
95 142
	for (OntologyClass oc: measurements) {
......
146 193

  
147 194
	<table class="group group_border">
148 195
		<tr>
149
			<th colspan="5">
196
			<th colspan="3">
150 197
				<p>
151 198
					Locate <b>data packages</b> that have been semantically annotated within the observation model by
152 199
					selecting concepts from
......
157 204
				</p>
158 205
			</th>
159 206
		</tr>
207
		<!--  measurement -->
160 208
		<tr>
209
			<td colspan="3">
210
				<table class="subGroup subGroup_border onehundred_percent">
211
					<tr>
212
						<th colspan="2">
213
							Measurement
214
						</th>
215
					</tr>
216
					<tr>
217
						<td>a template that defines Entity, Characteristic, Standard, and/or Protocol</td>
218
					</tr>
219
					<tr>
220
						<td>
221
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 100%">
222
								<%=measurementOptions %>
223
							</select>
224
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
225
						</td>
226
					</tr>
227
					<tr>
228
						<td colspan="1">
229
							<input type="text" name="dynamicValue" id="dynamicValue" class="bp_form_complete-all-uri" size="60" />
230
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
231
						</td>
232
					</tr>
233
				</table>
234
			</td>
235
		</tr>
236
		<tr>
161 237
			<td>
162 238
				<table class="subGroup subGroup_border">
163 239
					<tr>
......
194 270
						</th>
195 271
					</tr>
196 272
					<tr>
197
						<td>where measurements of</td>
273
						<td>with measurements of</td>
198 274
					</tr>
199 275
					<tr>
200 276
						<td>
......
212 288
					</tr>
213 289
				</table>
214 290
			</td>
291
			<!-- removing Standard
215 292
			<td>
216 293
				<table class="subGroup subGroup_border">
217 294
					<tr>
......
238 315
					</tr>
239 316
				</table>
240 317
			</td>
318
			-->
241 319
			<td>
242 320
				<table class="subGroup subGroup_border">
243 321
					<tr>
......
246 324
						</th>
247 325
					</tr>
248 326
					<tr>
249
						<td>following procedures outlined by</td>
327
						<td>using procedures outlined by</td>
250 328
					</tr>
251 329
					<tr>
252 330
						<td>
......
264 342
					</tr>
265 343
				</table>
266 344
			</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 345
		</tr>
294 346
		<tr>
295
			<td colspan="5">Match All? <input type="checkbox" name="matchAll" checked="checked"/></td>
347
			<td colspan="3">Match All? <input type="checkbox" name="matchAll" checked="checked"/></td>
296 348
		</tr>
297 349
		<tr>
298
			<td colspan="5">From same Observation? <input type="checkbox" name="strict"/></td>
350
			<td colspan="3">From same Observation? <input type="checkbox" name="strict"/></td>
299 351
		</tr>
300 352
		<tr>
301
			<td colspan="5"><input type="submit" value="Search"/></td>
353
			<td colspan="3"><input type="submit" value="Search"/></td>
302 354
		</tr>
303 355
	</table>
304 356
		<!-- 
......
309 361
		 -->		
310 362
</form>
311 363

  
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 364
<!-- Included default search/login -->
344 365
<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
345 366
<script language="javascript">

Also available in: Unified diff