-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathEditStmt.jsp
97 lines (86 loc) · 2.88 KB
/
EditStmt.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<%@include file="Prelude.jsp" %>
<%
/** This code is copyright Teknowledge (c) 2003, Articulate Software (c) 2003-2017,
Infosys (c) 2017-present.
This software is released under the GNU Public License
<http://www.gnu.org/copyleft/gpl.html>.
Please cite the following article in any publication with references:
Pease A., and Benzmüller C. (2013). Sigma: An Integrated Development Environment
for Logical Theories. AI Communications 26, pp79-97. See also
http://github.com/ontologyportal
*/
// @param file: the file name.
// @param line: the line number in the file the cursor should point to at start.
if (!role.equalsIgnoreCase("admin"))
response.sendRedirect("KBs.jsp");
System.out.println("ENTER EditStmt.jsp");
String formID = request.getParameter("formID");
System.out.println(" formID == " + formID);
String KBName = request.getParameter("kb");
System.out.println(" kbName == " + KBName);
String text = request.getParameter("text");
System.out.println(" text == " + text);
KB kbEdit = KBmanager.getMgr().getKB(KBName);
System.out.println(" kb == " + kbEdit.name);
Formula form = kbEdit.getFormulaByKey(formID);
System.out.println(" form == " + form);
if ((form != null) && StringUtil.isNonEmptyString(text)) {
form.theFormula = text;
kbEdit.rehashFormula(form,formID);
formID = form.createID();
}
%>
<HTML>
<HEAD>
<TITLE>Sigma Knowledge Engineering Environment - Edit Statement </TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<table width=95% cellspacing=0 cellpadding=0>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=0>
<tr>
<td align="left" valign="top"><img src="pixmaps/sigmaSymbol-gray.gif"></td>
<td> </td>
<td align="left" valign="top"><img src="pixmaps/logoText-gray.gif"></td>
</tr>
</table>
</td>
<td valign="bottom"></td>
<td><b>[ <A href="KBs.jsp">Home</A> ]</b></td>
</tr>
</table>
<br><table ALIGN="LEFT" WIDTH=80%><tr><TD BGCOLOR='#AAAAAA'><IMG SRC='pixmaps/1pixel.gif' width=1 height=1 border=0></TD></tr></table><BR>
<script language="JavaScript">
<!--
function update_onclick() {
alert("in javascript");
document.updateForm.action = "edit_file.jsp";
document.updateForm.method = "Post";
document.updateForm.submit();
}
function textAreaOnChange() {
document.updateForm.sourceChanged.value = "true";
}
-->
</script>
<p>
<strong>Work in Progress</strong>
</p>
<form name="updateForm" method="POST" >
<Table>
<TR>
<TD>
<textarea rows="15" wrap="virtual" name="text" cols="100" onChange="textAreaOnChange()" disabled="disabled"><%= form.theFormula %></textarea>
</TD>
</TR>
<TR>
<TD align=center>
<input type="hidden" value="<%= formID %>">
<input type="submit" name="action" value="Update" disabled="disabled">
</TD>
</TR>
</Table>
</form>
</BODY>
</HTML>