]> matita.cs.unibo.it Git - helm.git/commitdiff
New implementation of the graphs stuff: now every hard-coded URL has
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 15 Oct 2001 06:14:13 +0000 (06:14 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 15 Oct 2001 06:14:13 +0000 (06:14 +0000)
been removed.

helm/on-line/html/control.html
helm/on-line/html/library/control.html
helm/on-line/html/library/index.html
helm/on-line/javascript/control.js
helm/on-line/javascript/defaults.js
helm/on-line/javascript/prelude.js
helm/on-line/javascript/utils.js
helm/on-line/xslt/metadataLib.xsl

index 791a8b28a14edabccd73634966cf40b83be80097..98bfebaf4a3bcaa6930f961d423d90fee0650953 100644 (file)
@@ -26,9 +26,9 @@ td.back { background-color: #e6e6fa; color: brown }
 
 <div id="indent">
 The on-line interface will use a
-<a href="http://www.cs.unibo.it/helm/getter" target="_top">Getter</a> to locate and
+<a href="file:///projects/helm/public_html/getter" target="_top">Getter</a> to locate and
 download documents and an
-<a href="http://www.cs.unibo.it/helm/uwobo" target="_top">UWOBO</a> to apply transformations
+<a href="file:///projects/helm/public_html/uwobo" target="_top">UWOBO</a> to apply transformations
 to them.
 
 
@@ -40,9 +40,9 @@ to instances of them.
 <br /><br />
 
 To control the behaviour of them, use the apposite
-<a onClick="refreshLinks();" href="http://www.cs.unibo.it/helm/getter/panel/index.html" target="_top">Getter panel</a>
+<a onClick="refreshLinks();" href="file:///projects/helm/public_html/getter/panel/index.html" target="_top">Getter panel</a>
 and
-<a onClick="refreshLinks();" href="http://www.cs.unibo.it/helm/uwobo/panel/index.html" target="_top">UWOBO panel</a>.
+<a onClick="refreshLinks();" href="file:///projects/helm/public_html/uwobo/panel/index.html" target="_top">UWOBO panel</a>.
 
 <br /><br />
 
@@ -112,6 +112,72 @@ and
 
 <br />
 
+<table border="0">
+  <tr>
+    <th colspan="2" align="left">Graph Drawer URL</th>
+  </tr>
+  <tr>
+    <td>
+      <form name="draw_graphURL">
+        <script>
+         document.write('<input type="text" value="' + getInitialDrawGraphURL() + '" size="50"/>');
+       </script>
+      </form>
+    </td>
+    <td>
+      <form>
+        <select onChange="selectDrawGraphURL(this)">
+         <option value="">---</option>
+         <option value="localhost">localhost</option>
+         <option value="marcello.cs.unibo.it">marcello</option>
+         <option value="phd.cs.unibo.it">phd</option>
+         <option value="eolo.cs.unibo.it">eolo</option>
+       </select>
+      </form>
+    </td>
+    <td>
+      <form>
+        <input type="button" value="Check" onClick="top.result.location = getDrawGraphURL() + 'help'"/>
+      </form>
+    </td>
+  </tr>
+</table>
+
+<br />
+
+<table border="0">
+  <tr>
+    <th colspan="2" align="left">URI-Set URL</th>
+  </tr>
+  <tr>
+    <td>
+      <form name="uri_set_queueURL">
+        <script>
+         document.write('<input type="text" value="' + getInitialURISetQueueURL() + '" size="50"/>');
+       </script>
+      </form>
+    </td>
+    <td>
+      <form>
+        <select onChange="selectURISetQueueURL(this)">
+         <option value="">---</option>
+         <option value="localhost">localhost</option>
+         <option value="marcello.cs.unibo.it">marcello</option>
+         <option value="phd.cs.unibo.it">phd</option>
+         <option value="eolo.cs.unibo.it">eolo</option>
+       </select>
+      </form>
+    </td>
+    <td>
+      <form>
+        <input type="button" value="Check" onClick="top.result.location = getURISetQueueURL() + 'help'"/>
+      </form>
+    </td>
+  </tr>
+</table>
+
+<br />
+
 <table border="0">
   <tr>
     <th colspan="2" align="left">Browser</th>
index 697bf0f55d16a00fe43fe8bbe509acff31c5157a..5d353fc0d8b4f4e376f7bd0a73ef89fc4109489d 100644 (file)
@@ -60,6 +60,8 @@
 <![CDATA[
        top.processorURL = getParam2('processorURL');
        top.getterURL = getParam2('getterURL');
+       top.draw_graphURL = getParam2('draw_graphURL');
+       top.uri_set_queueURL = getParam2('uri_set_queueURL');
        top.UNICODEvsSYMBOL = getParam2('UNICODEvsSYMBOL');
        top.topurl = getParam2('topurl');
        top.mode = getParam2('mode');
index 87a8f4491fce86970df1a472e6fc12a818f81f8c..16ca2a00f9eb4c158169df043839d0a150e5aaf3 100644 (file)
@@ -23,6 +23,8 @@
        '&theoryuri=' + getParam2('theoryuri') +
        '&processorURL=' + getParam2('processorURL') +
        '&getterURL=' + getParam2('getterURL') +
+       '&draw_graphURL=' + getParam2('draw_graphURL') +
+       '&uri_set_queueURL=' + getParam2('uri_set_queueURL') +
        '&UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL');
   var escaped_control_frame_URL = escape(control_frame_URL);
   document.write('<frame src="' +
@@ -46,6 +48,8 @@
         '&param.keys=L2H' +
        '&param.uri=' + getParam2('theoryuri') +
        '&param.getterURL=' + getParam2('getterURL') +
+       '&param.draw_graphURL=' + getParam2('draw_graphURL') +
+       '&param.uri_set_queueURL='+getParam2('uri_set_queueURL') +
        '&param.UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL') +
         '&param.target=theory' +
        //'&param.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) + 
@@ -67,6 +71,8 @@
         '&param.keys=L2H' +
        '&param.uri=' + getParam2('cicuri') +
        '&param.getterURL=' + getParam2('getterURL') +
+       '&param.draw_graphURL=' + getParam2('draw_graphURL') +
+       '&param.uri_set_queueURL='+getParam2('uri_set_queueURL') +
        '&param.UNICODEvsSYMBOL=' + getParam2('UNICODEvsSYMBOL') +
         '&param.target=cic' +
        //'&param.interfaceURL=' + location.protocol + "//" + location.host + chopSlash(chopSlash(chopSlash(location.pathname))) +
index dca05a8b2e71b9ec44f142be2a54ab0bf0bbe1e2..3384875c6aedb950c2bb7a8d32fa38b7d691b0a0 100644 (file)
@@ -22,9 +22,11 @@ function updateOutput(output,format)
   var topurl = top.topurl;
   var processorURL = top.processorURL;
   var getterURL = top.getterURL;
+  var draw_graphURL = top.draw_graphURL;
+  var uri_set_queueURL = top.uri_set_queueURL;
   var mode_list = mode.split(",");
   var new_mode = output.options[output.selectedIndex].value;
-  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&mode=";
+  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&draw_graphURL=" + draw_graphURL + "&uri_set_queueURL=" + uri_set_queueURL + "&mode=";
   
   if (new_mode != mode_list[0]) {
     updateMode(0, new_mode);
@@ -92,6 +94,8 @@ function refreshReload()
       "&theoryuri=" + top.theoryuri +
       "&processorURL=" + top.processorURL +
       "&getterURL=" + top.getterURL +
+      "&draw_graphURL=" + top.draw_graphURL +
+      "&uri_set_queueURL=" + top.uri_set_queueURL +
       "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
 
    var href =
@@ -132,6 +136,8 @@ function makeURL(type,uri,cicflags,typesflags)
   var mode = top.mode;
   var processorURL = top.processorURL;
   var getterURL = top.getterURL;
+  var draw_graphURL = top.draw_graphURL;
+  var uri_set_queueURL = top.uri_set_queueURL;
   var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
   var mode_list = mode.split(",");
   
@@ -156,8 +162,11 @@ function makeURL(type,uri,cicflags,typesflags)
     if (format == "html" && type == "cic") {
       //Important note: do not modify this function without modifying
       //getCICMathMLKeys
-      keys = escape("d_c,C1,HC2,L")+"&param.processorURL=" + escape(processorURL) +
+      keys = escape("d_c,C1,HC2,L") +
+       "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
        "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&prop.encoding=iso-8859-1" +
@@ -171,6 +180,8 @@ function makeURL(type,uri,cicflags,typesflags)
       keys = escape("T1,T2,L,E")+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
        "&param.keys=" + escape("d_c,C1,HC2,L") +
        "&param.thkeys=" + escape("T1,T2,L,E") +
@@ -192,6 +203,8 @@ function makeURL(type,uri,cicflags,typesflags)
 
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.thencoding=iso-8859-1" +
@@ -203,6 +216,8 @@ function makeURL(type,uri,cicflags,typesflags)
       keys = escape("d_c,C1,G,C2,L")+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&prop.doctype-public="+
        "&prop.encoding=" +
        "&prop.media-type=text/xml" +
@@ -218,6 +233,8 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.embedkeys=d_c,TC1,G,C2,L" +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.thencoding=iso-8859-1" +
index 271f6eabcb8e228401685a4a73746e9a82ba9ffe..2174375dc7d0becf221476d5903bac8ecd449c23 100644 (file)
@@ -6,14 +6,18 @@ function getDefaultParam(name)
     return "http://phd.cs.unibo.it:8080/helm/servlet/uwobo/";
   case "getterURL":
     return "http://phd.cs.unibo.it:8081/"; 
+  case "draw_graphURL":
+    return "http://phd.cs.unibo.it:8083/"; 
+  case "uri_set_queueURL":
+    return "http://phd.cs.unibo.it:8084/"; 
+  case "UNICODEvsSYMBOL":
+    return "symbol";
   case "cicuri":
     return "cic:/";
   case "theoryuri":
     return "theory:/";
   case "mode":
     return "processed,cic,html,yes,no,normal,no";
-  case "UNICODEvsSYMBOL":
-    return "symbol";
   }
   
   return "???";
index 69479641cd5af9ee32d8ae20aa3d678ee60df6d6..f319735038448a6d956367e7a2eaba9871329d13 100644 (file)
@@ -27,6 +27,34 @@ function getInitialGetterURL()
   return getterURL;
 }
 
+function getInitialDrawGraphURL()
+{
+  var search = top.location.search;
+  search = search.slice(1);
+  var args = search.split("&");
+  var draw_graphURL = "-1";
+  for (var i = 0 ; i < args.length ; i++) {
+     var couple = args[i].split("=");
+     if (couple[0] == "draw_graphURL") draw_graphURL = couple[1];
+  }
+  if (draw_graphURL == "-1") draw_graphURL = getDefaultParam("draw_graphURL");
+  return draw_graphURL;
+}
+
+function getInitialURISetQueueURL()
+{
+  var search = top.location.search;
+  search = search.slice(1);
+  var args = search.split("&");
+  var uri_set_queueURL = "-1";
+  for (var i = 0 ; i < args.length ; i++) {
+     var couple = args[i].split("=");
+     if (couple[0] == "uri_set_queueURL") uri_set_queueURL = couple[1];
+  }
+  if (uri_set_queueURL == "-1") uri_set_queueURL = getDefaultParam("uri_set_queueURL");
+  return uri_set_queueURL;
+}
+
 function getInitialUNICODEvsSYMBOL()
 {
   var search = top.location.search;
@@ -67,6 +95,16 @@ function getGetterURL()
   return document.getterURL.elements[0].value;
 }
 
+function getDrawGraphURL()
+{
+  return document.draw_graphURL.elements[0].value;
+}
+
+function getURISetQueueURL()
+{
+  return document.uri_set_queueURL.elements[0].value;
+}
+
 function getUNICODEvsSYMBOL()
 {
   if (document.UNICODEvsSYMBOL.radioUNICODEvsSYMBOL[0].checked)
@@ -128,6 +166,8 @@ function refreshLinks()
        "&mode=" + mode +
        "&processorURL=" + getUwoboURL() +
        "&getterURL=" + getGetterURL() +
+       "&draw_graphURL=" + getDrawGraphURL() +
+       "&uri_set_queueURL=" + getURISetQueueURL() +
        "&UNICODEvsSYMBOL=" + getUNICODEvsSYMBOL()
       );
 }
@@ -153,3 +193,25 @@ function selectGetterURL(ss)
 
   refreshLinks();
 }
+
+function selectDrawGraphURL(ss)
+{
+  if (ss.selectedIndex == 0) {
+    document.draw_graphURL.elements[0].value = "";
+  } else {
+    document.draw_graphURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":8083/";
+  }
+
+  refreshLinks();
+}
+
+function selectURISetQueueURL(ss)
+{
+  if (ss.selectedIndex == 0) {
+    document.uri_set_queueURL.elements[0].value = "";
+  } else {
+    document.uri_set_queueURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":8084/";
+  }
+
+  refreshLinks();
+}
index d7903ef6226d0cccfe9628751b2e6b20de5f0eb7..42599f7e8462bf17553b8513994a55e320f678fe 100644 (file)
@@ -8,14 +8,17 @@ function setParam(url,name,value)
   var urla = url.split("?");
   var search = urla[1];
   var args = search.split("&");
+  var found = false;
 
   for (var i = 0 ; i < args.length ; i++) {
      var couple = args[i].split("=");
-     if (couple[0] == name) args[i] = name + "=" + value;
+     if (couple[0] == name) {
+        found = true;
+        args[i] = name + "=" + value;
+     }
   }
 
-
-  return (urla[0] + "?" + args.join("&"));
+  return (urla[0] + "?" + args.join("&") + (found ? "" : ("&" + name + "=" + value)));
 }
 
 function extractParam(url,name)
index 414eb8b10f100157fd29ad46d7c01e22f31f8803..a1ea8c58d5f8a0c63d61152f076e6fe1d640d705 100644 (file)
@@ -6,7 +6,7 @@
 
 <xsl:param name="CICURI" select="''"/>
 <xsl:param name="getterURL" select="''"/>
-<xsl:param name="draw_graphURL" select="'http://localhost:8083/'"/>
+<xsl:param name="draw_graphURL" select="''"/>
 
 <xsl:template match="/">
  <html>
@@ -80,7 +80,7 @@
    var getterURL = "<xsl:value-of select="$getterURL"/>";
    var draw_graphURL = "<xsl:value-of select="$draw_graphURL"/>";
 <![CDATA[
-   var url = setParam(location.href,"keys","MMG");
+   var url = setParam(location.href,"keys","MDG");
    url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + CICURI);
    url = draw_graphURL + 'draw?url=' + escape(url);
    var url2 = setParam(location.href,"keys","ML2,RT");