-
Notifications
You must be signed in to change notification settings - Fork 22
/
justification.html
58 lines (55 loc) · 2.32 KB
/
justification.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id='docHTML'>
<head>
<title>Tabulator: Display Explanations</title>
<link rel="stylesheet" href="chrome://tabulator/content/tabbedtab.css" type="text/css" />
<link rel="stylesheet"
href="chrome://tabulator/skin/airPane.css" type="text/css" />
<script src="js/util.js" type="text/javascript"></script>
<script src="js/uri.js" type="text/javascript"></script>
<script src="js/rdf/term.js" type="text/javascript"></script>
<script src="js/rdf/identity.js" type="text/javascript"></script>
<!-- identity.js has to be included or RDFSymbol generated by RDFNamespace does not have hashString methods -->
<script type="text/javascript">
//----hack to make airPane.js happy
Icon = {};
Icon.src = {};
//----end of hack
Array.prototype.remove = function remove(x){
var i = this.indexOf(x);
if(i>=0){
this.splice(i, 1);
}
};
var tabulator = Components.classes["@dig.csail.mit.edu/tabulator;1"].getService(Components.interfaces.nsISupports).wrappedJSObject;
var kb = tabulator.kb;
var lb = tabulator.lb;
var sf = tabulator.fetcher;
var myDocument = document;
//The mission of tabulator has complete here
//replace this with a dummy thing to cheat tabulator.panes.register
//in airPane.js
var tabulator = {};
tabulator.panes = {};
tabulator.panes.register = function(){};
</script>
<script src="js/panes/airPane.js" type="text/javascript"></script>
<script type="text/javascript">
function onLoad(){
var explanationID = getURIQueryParameters(window.location)['explanationID'];
var triple_to_explain = kb.the(undefined, ap_tms('explanationID'),
kb.literal(explanationID)); // a formula actually
//@@ do something when there's no triple to explain. Probably when you
//restrart the browser
//var stsJust = kb.statementsMatching(triple_to_explain, ap_just);
//all the reasons for the triple to explain
document.body.appendChild(airPane.renderExplanationForStatement(triple_to_explain));
//alert(kb.any(undefined, ap_tms('explanationID'),
// kb.literal(explanationID)));
}
window.onload=onLoad;
</script>
</head>
<body>
</body>