2 function getInitialProcessorURL()
4 var search = top.location.search;
5 search = search.slice(1);
6 var args = search.split("&");
7 var processorURL = "-1";
8 for (var i = 0 ; i < args.length ; i++) {
9 var couple = args[i].split("=");
10 if (couple[0] == "processorURL") processorURL = couple[1];
12 if (processorURL == "-1") processorURL = getDefaultParam("processorURL");
16 function getInitialGetterURL()
18 var search = top.location.search;
19 search = search.slice(1);
20 var args = search.split("&");
22 for (var i = 0 ; i < args.length ; i++) {
23 var couple = args[i].split("=");
24 if (couple[0] == "getterURL") getterURL = couple[1];
26 if (getterURL == "-1") getterURL = getDefaultParam("getterURL");
30 function getInitialProofCheckerURL()
32 var search = top.location.search;
33 search = search.slice(1);
34 var args = search.split("&");
35 var proofcheckerURL = "-1";
36 for (var i = 0 ; i < args.length ; i++) {
37 var couple = args[i].split("=");
38 if (couple[0] == "proofcheckerURL") proofcheckerURL = couple[1];
40 if (proofcheckerURL == "-1")
41 proofcheckerURL = getDefaultParam("proofcheckerURL");
42 return proofcheckerURL;
45 function getInitialDrawGraphURL()
47 var search = top.location.search;
48 search = search.slice(1);
49 var args = search.split("&");
50 var draw_graphURL = "-1";
51 for (var i = 0 ; i < args.length ; i++) {
52 var couple = args[i].split("=");
53 if (couple[0] == "draw_graphURL") draw_graphURL = couple[1];
55 if (draw_graphURL == "-1") draw_graphURL = getDefaultParam("draw_graphURL");
59 function getInitialURISetQueueURL()
61 var search = top.location.search;
62 search = search.slice(1);
63 var args = search.split("&");
64 var uri_set_queueURL = "-1";
65 for (var i = 0 ; i < args.length ; i++) {
66 var couple = args[i].split("=");
67 if (couple[0] == "uri_set_queueURL") uri_set_queueURL = couple[1];
69 if (uri_set_queueURL == "-1") uri_set_queueURL = getDefaultParam("uri_set_queueURL");
70 return uri_set_queueURL;
73 function getInitialUNICODEvsSYMBOL()
75 var search = top.location.search;
76 search = search.slice(1);
77 var args = search.split("&");
78 var UNICODEvsSYMBOL = "-1";
79 for (var i = 0 ; i < args.length ; i++) {
80 var couple = args[i].split("=");
81 if (couple[0] == "UNICODEvsSYMBOL") UNICODEvsSYMBOL = couple[1];
83 if (UNICODEvsSYMBOL == "-1") UNICODEvsSYMBOL = getDefaultParam("UNICODEvsSYMBOL");
84 return UNICODEvsSYMBOL;
87 function getInitialUNICODEvsSYMBOLsymbol(defaultValue)
89 if (defaultValue == "symbol")
95 function getInitialUNICODEvsSYMBOLunicode(defaultValue)
97 if (defaultValue == "unicode")
103 function getProfileId()
105 return document.profile.elements[0].value;
108 function getUwoboURL()
110 return document.uwoboURL.elements[0].value;
113 function getGetterURL()
115 return document.getterURL.elements[0].value;
118 function getProofCheckerURL()
120 return document.proofcheckerURL.elements[0].value;
123 function getDrawGraphURL()
125 return document.draw_graphURL.elements[0].value;
128 function getURISetQueueURL()
130 return document.uri_set_queueURL.elements[0].value;
133 function getRdflyURL()
135 return document.rdflyURL.elements[0].value;
138 function getUNICODEvsSYMBOL()
140 if (document.UNICODEvsSYMBOL.radioUNICODEvsSYMBOL[0].checked)
146 function getNaturalLanguage()
148 if (document.naturalLanguage.elements[0].checked)
154 function getMaxGraphSize()
156 return document.maxGraphSize.elements[0].value;
159 function getUpdateURL()
161 return '¶m.processorURL=' + escape(getUwoboURL()) +
162 '¶m.getterURL=' + escape(getGetterURL()) +
163 '¶m.uri_set_queueURL=' + escape(getURISetQueueURL()) +
164 '¶m.draw_graphURL=' + escape(getDrawGraphURL()) +
165 '¶m.proofcheckerURL=' + escape(getProofCheckerURL()) +
166 '¶m.rdflyURL=' + escape(getRdflyURL()) +
167 '¶m.naturalLanguage=' + escape(getNaturalLanguage()) +
168 '¶m.uri_set_size=' + escape(getMaxGraphSize()) +
169 '¶m.UNICODEvsSYMBOL=' + escape(getUNICODEvsSYMBOL());
172 function chopSlash(url)
174 return url.slice(0,url.lastIndexOf('/'));
177 function refreshLinks()
179 var search = top.location.search;
180 search = search.slice(1);
181 var args = search.split("&");
182 var cicuri = "-1", theoryuri = "-1", mode = "-1";
183 for (var i = 0 ; i < args.length ; i++) {
184 var couple = args[i].split("=");
186 case "cicuri" : cicuri =couple[1]; break;
187 case "theoryuri" : theoryuri =couple[1]; break;
188 case "mode" : mode =couple[1]; break;
191 if (cicuri == "-1") cicuri = getDefaultParam("cicuri");
192 if (theoryuri == "-1") theoryuri = getDefaultParam("theoryuri");
193 if (mode == "-1") mode = getDefaultParam("mode");
195 document.links[2].href =
196 document.links[2].protocol + '//' +
197 document.links[2].host +
198 document.links[2].pathname +
199 "?getterURL=" + getGetterURL();
201 document.links[3].href =
202 document.links[3].protocol + '//' +
203 document.links[3].host +
204 document.links[3].pathname +
205 "?processorURL=" + getUwoboURL() +
206 "&getterURL=" + getGetterURL();
210 document.location.protocol + '//' +
211 document.location.host +
212 document.location.pathname));
213 document.links[4].href =
214 getUwoboURL() + "apply" +
216 "¶m.topurl=" + topurl +
219 topurl + "/html/library/index.html" +
220 "?cicuri=" + cicuri +
221 "&theoryuri=" + theoryuri +
223 "&processorURL=" + getUwoboURL() +
224 "&getterURL=" + getGetterURL() +
225 "&proofcheckerURL=" + getProofCheckerURL() +
226 "&draw_graphURL=" + getDrawGraphURL() +
227 "&uri_set_queueURL=" + getURISetQueueURL() +
228 "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL()
232 function selectUwoboURL(ss)
234 if (ss.selectedIndex == 0) {
235 document.uwoboURL.elements[0].value = "";
237 document.uwoboURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58080/";
241 function selectGetterURL(ss)
243 if (ss.selectedIndex == 0) {
244 document.getterURL.elements[0].value = "";
246 document.getterURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58081/";
250 function selectProofCheckerURL(ss)
252 if (ss.selectedIndex == 0) {
253 document.proofcheckerURL.elements[0].value = "";
255 document.proofcheckerURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58084/";
259 function selectDrawGraphURL(ss)
261 if (ss.selectedIndex == 0) {
262 document.draw_graphURL.elements[0].value = "";
264 document.draw_graphURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58083/";
268 function selectURISetQueueURL(ss)
270 if (ss.selectedIndex == 0) {
271 document.uri_set_queueURL.elements[0].value = "";
273 document.uri_set_queueURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58082/";
277 function selectRdflyURL(ss)
279 if (ss.selectedIndex == 0) {
280 document.rdflyURL.elements[0].value = "";
282 document.rdflyURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58086/";
286 function selectProfile(ss, interfaceURL)
288 location = getUwoboURL() +
289 'apply?keys=SPK¶m.processorURL=' + escape(getUwoboURL()) +
290 '¶m.profile=' + escape(ss.options[ss.selectedIndex].value) +
291 '&xmluri=' + escape(interfaceURL + 'html/configuration.html');
294 function saveProfile(origProfileId)
296 var profileId = getProfileId();
299 var options = document.profileList.elements[0];
300 for (i = 0; i < options.length; i++)
301 if (profileId == options[i].value) exists = true;
303 if (confirm('Update the profile \'' + profileId + '\'?'))
304 location = getUwoboURL() + 'setparams?id=' + profileId + getUpdateURL();
306 if (confirm('Create a new profile \'' + profileId + '\' with the current settings?'))
307 location = getUwoboURL() + 'createprofile?id=' + profileId + '&orig=' + origProfileId + getUpdateURL();