Project

General

Profile

Revision 5604

look up the active annotation classes

View differences:

lib/style/skins/semtools/index.jsp
1 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"%>
2 5
<%
3 6
/**
4 7
 * 
......
24 27
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25 28
 */  
26 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
%>
27 108

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

  
30 112
<html>
31 113
<head>
32 114
<title>Semantic search</title>
......
90 172
						<td>
91 173
							(a)
92 174
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
93
								<option title="A long description for Kelp">Kelp</option>
94
								<option>Tree</option>
175
								<%=entityOptions %>
95 176
							</select>
96 177
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Entity"/>
97 178
						</td>
......
118 199
					<tr>
119 200
						<td>
120 201
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
121
								<option title="A long description for Height">Height</option>
122
								<option>Weight</option>
202
								<%=characteristicOptions %>
123 203
							</select>
124 204
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Characteristic"/>
125 205
						</td>
......
145 225
					<tr>
146 226
						<td>
147 227
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
148
								<option title="A long description for Meter">Meter</option>
149
								<option>Inch</option>
150
								<option>Gram</option>
228
								<%=standardOptions %>
151 229
							</select>
152 230
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Standard"/>
153 231
						</td>
......
173 251
					<tr>
174 252
						<td>
175 253
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
176
								<option title="A long description for LabA">LabA</option>
177
								<option>LabB</option>
254
								<%=protocolOptions %>
178 255
							</select>
179 256
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Protocol"/>
180 257
						</td>
......
200 277
					<tr>
201 278
						<td>
202 279
							<select name="dynamicValue" id="dynamicValue" multiple="multiple" size="5" style="width: 216px">
203
								<option title="NitrogenConcentration">NitrogenConcentration</option>
280
								<%=measurementOptions %>
204 281
							</select>
205 282
							<input type="hidden" name="dynamicClass" id="dynamicClass" value="http://ecoinformatics.org/oboe/oboe.1.0/oboe-core.owl#Measurement"/>
206 283
						</td>

Also available in: Unified diff