Revision 5539
Added by ben leinfelder over 14 years ago
ontologies.jsp | ||
---|---|---|
1 | 1 |
<%@ page language="java"%> |
2 | 2 |
<%@page import="org.ecoinformatics.sms.ontology.bioportal.OntologyService,org.ecoinformatics.sms.ontology.bioportal.OntologyBean,java.util.List"%> |
3 |
<%@page import="org.ecoinformatics.sms.SMS,org.ecoinformatics.sms.ontology.Ontology"%> |
|
3 | 4 |
<% |
4 | 5 |
/** |
5 | 6 |
* |
... | ... | |
41 | 42 |
dropDown.append("</option>"); |
42 | 43 |
|
43 | 44 |
} |
44 |
|
|
45 | 45 |
%> |
46 |
<% |
|
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 |
%> |
|
46 | 60 |
|
47 | 61 |
<html> |
48 | 62 |
<head> |
... | ... | |
71 | 85 |
<h2>Ontology Management (Metacat)</h2> |
72 | 86 |
<p>Ontologies should be registered in Metacat before they can be used in Annotation-based searches.</p> |
73 | 87 |
|
88 |
<h3>Currently Registered Ontologies</h3> |
|
89 |
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="existingRegistrationForm" name="existingRegistrationForm" "> |
|
90 |
<input name="qformat" value="semtools" type="hidden" /> |
|
91 |
<table> |
|
92 |
<tr> |
|
93 |
<td>Action:</td> |
|
94 |
<td> |
|
95 |
<select name="action" id="action" disabled="disabled"> |
|
96 |
<option value="registerOntology">Register Ontology</option> |
|
97 |
<option value="unregisterOntology" selected="selected">Unregister Ontology</option> |
|
98 |
</select> |
|
99 |
</td> |
|
100 |
</tr> |
|
101 |
<tr> |
|
102 |
<td>Ontology:</td> |
|
103 |
<td> |
|
104 |
<select name='id' id='id'> |
|
105 |
<%=registeredDropDown.toString()%> |
|
106 |
</select> |
|
107 |
</td> |
|
108 |
</tr> |
|
109 |
<tr> |
|
110 |
<td colspan="2"><input type="submit" value="Submit"/></td> |
|
111 |
</tr> |
|
112 |
</table> |
|
113 |
</form> |
|
114 |
|
|
74 | 115 |
<h3>Available BioPortal Ontologies</h3> |
75 | 116 |
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="bioportalRegistrationForm" name="bioportalRegistrationForm" "> |
76 | 117 |
<input name="qformat" value="semtools" type="hidden" /> |
Also available in: Unified diff
list the currently registered ontologies (in case someone wants to unregister them?)