Project

General

Profile

1 5535 leinfelder
<%@ page language="java"%>
2 5537 leinfelder
<%@page import="org.ecoinformatics.sms.ontology.bioportal.OntologyService,org.ecoinformatics.sms.ontology.bioportal.OntologyBean,java.util.List"%>
3 5539 leinfelder
<%@page import="org.ecoinformatics.sms.SMS,org.ecoinformatics.sms.ontology.Ontology"%>
4 5535 leinfelder
<%
5
/**
6
 *
7
 * '$RCSfile$'
8
 * Copyright: 2008 Regents of the University of California and the
9
 *             National Center for Ecological Analysis and Synthesis
10
 *    '$Author$'
11
 *      '$Date$'
12
 * '$Revision$'
13
 *
14
 * This program is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation; either version 2 of the License, or
17
 * (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
24
 * You should have received a copy of the GNU General Public License
25
 * along with this program; if not, write to the Free Software
26
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
 */
28
%>
29
30
<%@ include file="../../common/common-settings.jsp"%>
31
<%@ include file="../../common/configure-check.jsp"%>
32 5537 leinfelder
<%
33
	// construct the drop down and the lookup key for the available ontologies
34
	StringBuffer dropDown = new StringBuffer();
35
	List<OntologyBean> beans = OntologyService.getInstance().getOntologyBeans();
36
	for (OntologyBean bean: beans) {
37
38
		dropDown.append("<option value='");
39
		dropDown.append(bean.getId());
40
		dropDown.append("'>");
41
		dropDown.append(bean.getDisplayLabel());
42
		dropDown.append("</option>");
43
44
	}
45
%>
46 5539 leinfelder
<%
47
	//show the currently registered ontologies in metacat's plugin
48
	StringBuffer registeredDropDown = new StringBuffer();
49
	List<String> ontologies = SMS.getInstance().getOntologyManager().getOntologyIds();
50
	for (String uri: ontologies) {
51
		Ontology ontology = SMS.getInstance().getOntologyManager().getOntology(uri);
52
		String label = SMS.getInstance().getOntologyManager().getOntologyLabel(ontology);
53
		registeredDropDown.append("<option value='");
54
		registeredDropDown.append(uri);
55
		registeredDropDown.append("'>");
56
		registeredDropDown.append(label);
57
		registeredDropDown.append("</option>");
58
	}
59
%>
60 5537 leinfelder
61 5535 leinfelder
<html>
62
<head>
63
<title>Semantic search</title>
64
<link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/semtools/semtools.css">
65
66
<script type="text/javascript">
67
                    	    // Set defaults for this installation
68
                    	    //var BP_SEARCH_SERVER = "http://oor-01.cim3.net";
69
                    	    //var BP_SITE = "Sandbox";
70
                    	    //var BP_ORG = "OOR";
71
                    	  </script>
72
<script language="Javascript" type="text/JavaScript"
73
	src="<%=STYLE_SKINS_URL%>/semtools/bioportal/form_complete.js">
74
</script>
75
76
<script language="javascript" type="text/javascript" src="<%=STYLE_SKINS_URL%>/semtools/semtools.js"></script>
77
<script language="javascript" type="text/javascript" src="<%=STYLE_COMMON_URL%>/branding.js"></script>
78
79
</head>
80
<body>
81
<script language="javascript">
82
	insertTemplateOpening("<%=CONTEXT_URL%>");
83
</script>
84
85 5587 leinfelder
<div id="content_wrapper">
86
87 5535 leinfelder
<h2>Ontology Management (Metacat)</h2>
88
<p>Ontologies should be registered in Metacat before they can be used in Annotation-based searches.</p>
89 5538 leinfelder
90 5539 leinfelder
<h3>Currently Registered Ontologies</h3>
91
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="existingRegistrationForm" name="existingRegistrationForm" ">
92
	<input name="qformat" value="semtools" type="hidden" />
93
	<table>
94
		<tr>
95
			<td>Action:</td>
96
			<td>
97
				<select name="action" id="action" disabled="disabled">
98
					<option value="registerOntology">Register Ontology</option>
99
					<option value="unregisterOntology" selected="selected">Unregister Ontology</option>
100
				</select>
101
			</td>
102
		</tr>
103
		<tr>
104
			<td>Ontology:</td>
105
			<td>
106
				<select name='id' id='id'>
107
					<%=registeredDropDown.toString()%>
108
				</select>
109
			</td>
110
		</tr>
111
		<tr>
112
			<td colspan="2"><input type="submit" value="Submit"/></td>
113
		</tr>
114
	</table>
115
</form>
116
117 5538 leinfelder
<h3>Available BioPortal Ontologies</h3>
118
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="bioportalRegistrationForm" name="bioportalRegistrationForm" ">
119 5535 leinfelder
	<input name="qformat" value="semtools" type="hidden" />
120
	<table>
121
		<tr>
122
			<td>Action:</td>
123
			<td>
124
				<select name="action" id="action">
125
					<option value="registerOntology">Register Ontology</option>
126
					<option value="unregisterOntology">Unregister Ontology</option>
127
				</select>
128
			</td>
129
		</tr>
130
		<tr>
131 5538 leinfelder
			<td>Ontology:</td>
132
			<td>
133
				<select name='id' id='id'>
134
					<%=dropDown.toString()%>
135
				</select>
136
			</td>
137 5535 leinfelder
		</tr>
138
		<tr>
139
			<td colspan="2"><input type="submit" value="Submit"/></td>
140
		</tr>
141
	</table>
142
</form>
143
144 5538 leinfelder
<h3>Other Ontologies</h3>
145
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="registrationForm" name="registrationForm" ">
146 5537 leinfelder
	<input name="qformat" value="semtools" type="hidden" />
147
	<table>
148
		<tr>
149
			<td>Action:</td>
150
			<td>
151
				<select name="action" id="action">
152
					<option value="registerOntology">Register Ontology</option>
153
					<option value="unregisterOntology">Unregister Ontology</option>
154
				</select>
155
			</td>
156
		</tr>
157
		<tr>
158 5538 leinfelder
			<td>URI:</td>
159
			<td><input type="text" name="uri" id="uri" size="100" /></td>
160 5537 leinfelder
		</tr>
161
		<tr>
162 5538 leinfelder
			<td>URL:</td>
163
			<td><input type="text" name="url" id="url" size="100" /></td>
164
		</tr>
165
		<tr>
166 5537 leinfelder
			<td colspan="2"><input type="submit" value="Submit"/></td>
167
		</tr>
168
	</table>
169
</form>
170
171 5535 leinfelder
<h2>Ontology search (BioPortal)</h2>
172 5538 leinfelder
<p>Not sure which BioPortal ontology to use?</p>
173
<p>Explore ontologies in BioPortal before registering them with Metacat. Use this search interface to find appropriate ontologies.</p>
174 5535 leinfelder
<div id="bp_quick_jump"></div>
175
<script type="text/javascript">
176
    var BP_ontology_id = "all";
177
</script>
178
<script src="<%=STYLE_SKINS_URL%>/semtools/bioportal/quick_jump.js" type="text/javascript" charset="utf-8">
179
</script>
180
181
<h2>Tree browser (BioPortal)</h2>
182 5538 leinfelder
<p>Explore existing ontologies in BioPortal</p>
183 5535 leinfelder
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
184
	id="OntologyTree" width="300" height="100%"
185
	codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
186
	<param name="movie" value="http://keg.cs.uvic.ca/ncbo/ontologytree/OntologyTree.swf" />
187
	<param name="quality" value="high" />
188
	<param name="bgcolor" value="#ffffff" />
189
	<param name="allowScriptAccess" value="always" />
190
	<param name="flashVars" value="ontology=1523&alerterrors=false&canchangeontology=true&virtual=true" />
191
	<embed src="http://keg.cs.uvic.ca/ncbo/ontologytree/OntologyTree.swf" quality="high" bgcolor="#ffffff"
192
		width="300" height="100%" name="OntologyTree" align="middle"
193
		play="true"
194
		loop="false"
195
		allowScriptAccess="always"
196
		type="application/x-shockwave-flash"
197
		flashVars="ontology=1523&alerterrors=false&canchangeontology=true&virtual=true"
198
		pluginspage="http://www.adobe.com/go/getflashplayer">
199
	</embed>
200
</object>
201
202
<!-- Included default search/login -->
203
<% if ( PropertyService.getProperty("spatial.runSpatialOption").equals("true") ) { %>
204
<script language="javascript">
205
	insertMap("<%=CONTEXT_URL%>");
206
</script>
207
<br/>
208
<% } %>
209
210
<script language="javascript">
211
	insertSearchBox("<%=CONTEXT_URL%>");
212
	insertLoginBox("<%=CONTEXT_URL%>");
213
</script>
214
215 5587 leinfelder
</div>
216
217 5535 leinfelder
<script language="javascript">
218
	insertTemplateClosing("<%=CONTEXT_URL%>");
219
</script>
220
221
</body>
222
</html>