]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/searchEngine/html/index.html
The processorURL parameter must now be instantiated by the searchEngine.
[helm.git] / helm / searchEngine / html / index.html
index 8cb492b1360cd39b4d98d6b794cfdebe24c585a0..5d6dbf387bb37bcc6e857e4fb7ba6f79fd484e27 100644 (file)
@@ -42,11 +42,20 @@ function initialize()
        actinput=0;
        numeroazioniannullate=0;
        }
+
+// @processorURL@ will be substituted by the searchEngine using
+// the correct value
+var processorURL="@processorURL@";
+
+function ask_uwobo(url)
+       {
+         return (top.topurl+"/ask_uwobo?url="+escape(processorURL + "apply?xmluri=" + escape(url) + "&keys=T1%2CT2%2CL%2CE&param.processorURL="+escape(processorURL)+"&param.getterURL=http%3A//mowgli.cs.unibo.it%3A58081/&param.proofcheckerURL=http%3A//mowgli.cs.unibo.it%3A58084/&param.draw_graphURL=http%3A//mowgli.cs.unibo.it%3A58083/&param.uri_set_queueURL=http%3A//mowgli.cs.unibo.it%3A58082/&param.UNICODEvsSYMBOL=unicode&param.keys=d_c%2CC1%2CHC2%2CL&param.thkeys=T1%2CT2%2CL%2CE&param.embedkeys=d_c%2CTC1%2CHC2%2CL&param.doctype-public=-//W3C//DTD%20XHTML%201.0%20Transitional//EN&param.encoding=iso-8859-1&param.thencoding=iso-8859-1&param.media-type=text/html&param.thmedia-type=text/html&param.interfaceURL=http%3A//helm.cs.unibo.it/helm/html/cic/index.html&param.thinterfaceURL=http%3A//helm.cs.unibo.it/helm/html/theory/index.html&param.CICURI=dummy:query_result&param.naturalLanguage=yes&param.annotations=no&param.topurl=http://helm.cs.unibo.it/helm&prop.method=html"));
+       }
 function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito รจ legata ad un evento onFocus o onMouseOver.  
        {
        hw.document.close();
        switch (w)      {
-                       case -10: hw.document.write("Insert an <a href=grammarpdq.html#Id target=gw>Id</a> or an <a href=grammarpdq.html#Uri target=gw>Uri</a> here.")
+                       case -10: hw.document.write("Insert an <a href="+top.topurl+top.action+"grammarpdq.html#Id target=gw>Id</a> or an <a href="+top.topurl+top.action+"grammarpdq.html#Uri target=gw>Uri</a> here.")
                                break;
                        case -9: hw.document.write("By clicking this you may add or remove aliases as you wish.")
                                break;
@@ -64,7 +73,7 @@ function help(w) // quando invocata, visualizza l' help relativo ad un oggetto.
                                break;
                        case -3: hw.document.write("Substitutes your query with the text written in the area above. Unless you have a good knowledge of MathQL, it's recommended that you use this only to recover errors.")
                                break;
-                       case -2: hw.document.write("This is the edit/submit window. You can modify your query here, but be aware that no syntax check will be performed and that if you enter a <a href=grammar.html#rvar target=gw>variable</a> it won't be available for quick composition later. You may also want to add a <a href=grammar.html#set target=gw>set</a>, a <a href=grammar.html#val target=gw>val</a> or a <a href=grammar.html#boole target=gw>boole</a> somewhere in the query. If you do, write '&lt;set&gt;','&lt;val&gt;' or '&lt;bol&gt;' in the point you'd like it to appear, or use the buttons on the right if you are using IE. When you're done with the query, click the Submit button.")
+                       case -2: hw.document.write("This is the edit/submit window. You can modify your query here, but be aware that no syntax check will be performed and that if you enter a <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>variable</a> it won't be available for quick composition later. You may also want to add a <a href="+top.topurl+top.action+"grammar.html#set target=gw>set</a>, a <a href="+top.topurl+top.action+"grammar.html#val target=gw>val</a> or a <a href="+top.topurl+top.action+"grammar.html#boole target=gw>boole</a> somewhere in the query. If you do, write '&lt;set&gt;','&lt;val&gt;' or '&lt;bol&gt;' in the point you'd like it to appear, or use the buttons on the right if you are using IE. When you're done with the query, click the Submit button.")
                                break;
                        case -1: hw.document.write("You may see the grammar here.")
                                break;
@@ -72,23 +81,23 @@ function help(w) // quando invocata, visualizza l' help relativo ad un oggetto.
                                break;
                        case 1: hw.document.write("You may enter an arbitrary statement here; be careful since syntax errors won't be detected.");                              
                                break;  
-                       case 2: hw.document.write("Enter an <a href=grammar.html#attr_list target=gw>attr_list</a> here.");
+                       case 2: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#attr_list target=gw>attr_list</a> here.");
                                break;
-                       case 3: hw.document.write("Enter an <a href=grammar.html#id target=gw>id</a> here.");
+                       case 3: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#id target=gw>id</a> here.");
                                break;
-                       case 4: hw.document.write("You must select one previously entered <a href=grammar.html#rvar target=gw>rvar</a>. If you haven't already entered at least one, you can't choose this. ");
+                       case 4: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>rvar</a>. If you haven't already entered at least one, you can't choose this. ");
                                break;
-                       case 5: hw.document.write("Enter a <a href=grammar.html#path target=gw>path</a> here.");
+                       case 5: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#path target=gw>path</a> here.");
                                break;
-                       case 6: hw.document.write("You must select one previously entered <a href=grammar.html#svar target=gw>svar</a>. If you haven't already entered at least one, you can't choose this. ");
+                       case 6: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#svar target=gw>svar</a>. If you haven't already entered at least one, you can't choose this. ");
                                break;
-                       case 7: hw.document.write("Enter a <a href=grammar.html#string_list target=gw>string_list</a> here.");
+                       case 7: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#string_list target=gw>string_list</a> here.");
                                break;
-                       case 8: hw.document.write("You must select one <a href=grammar.html#vvar target=gw>vvar</a> previously entered as an 'attr'. If you haven't already entered at least one, you can't choose this. ");
+                       case 8: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered as an 'attr'. If you haven't already entered at least one, you can't choose this. ");
                                break;
-                       case 81: hw.document.write("You must select one <a href=grammar.html#vvar target=gw>vvar</a> previously entered in a 'let' statement. If you haven't already entered at least one, you can't choose this. ");
+                       case 81: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered in a 'let' statement. If you haven't already entered at least one, you can't choose this. ");
                                break;
-                       case 9: hw.document.write("Enter a single <a href=grammar.html#quoted_string target=gw>quoted_string</a> here.");
+                       case 9: hw.document.write("Enter a single <a href="+top.topurl+top.action+"grammar.html#quoted_string target=gw>quoted_string</a> here.");
                                break;
                        }       
        }
@@ -398,6 +407,137 @@ var topurl=document.location.protocol+'//'+document.location.host;
 //var topurl="";
 var action="/getpage?url=";
 //var action="";
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq1.html
+function templateambigpdq1_armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+
+function templateambigpdq1_resetta()
+       {
+       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+               {templateambigpdq1_armageddon();}
+       }
+
+function templateambigpdq1_listauri(document,elenco)
+       {
+       for (i=0;i<elenco.length;i++)
+               {
+               document.write("<input type=checkbox name=uricheck value="+elenco[i]+"> "+elenco[i]+"<br>"); 
+               }
+       }
+
+function templateambigpdq1_invia(document,top,elenco,ident)
+       {
+       vecchiavlds=top.vlds.length;
+       stringa=top.topurl+"/searchPattern?term="+top.terminecic;
+       stringa=stringa+"&aliases="+top.listaliases;
+       stringa=stringa+"&choices=";
+        var choices = "";
+       top.vlds[top.vlds.length]=ident;
+       for (j=0;j<elenco.length;j++)
+               {
+               if (document.disamb.uricheck[j].checked)
+                       {
+                       top.vlds[top.vlds.length]=document.disamb.uricheck[j].value;
+                       }
+               }
+       top.vlds[top.vlds.length]=";";
+       for (j=0;j<top.vlds.length;j++)
+       {
+           choices=choices+(top.vlds[j]==";"?";":escape(top.vlds[j]))+" ";
+       }
+       choices=choices.substring(0,choices.length-2);
+        stringa=stringa+escape(choices);
+       if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
+       else
+       {
+          window.open(ask_uwobo(stringa),"cw");
+       }
+       } 
+
+  function templateambigpdq1_selezionaCostanti(document,elenco) {
+    for (i=0; i<elenco.length; i++) {
+      if (elenco[i].substring(elenco[i].length-4, elenco[i].length) != ".var") {
+        document.disamb.uricheck[i].checked = true;
+      } else {
+        document.disamb.uricheck[i].checked = false;
+      }
+    }
+  }
+
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq2.html
+function templateambigpdq2_armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+
+function templateambigpdq2_resetta()
+       {
+       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+               {templateambigpdq2_armageddon();}
+       }
+
+function templateambigpdq2_listainterpretazioni(document,elenco,labels)
+       {
+       for (i=0;i<elenco.length;i++)
+               {
+                      document.write("<input type=radio name=interp value="+elenco[i]+"> "+labels[i]+"<br />"); 
+               }
+       }
+
+function templateambigpdq2_invia(document,elenco)
+       {
+       stringa=top.topurl+"/searchPattern?term="+top.terminecic;
+       stringa=stringa+"&aliases="+(top.listaliases==""?"":"%20");
+       controllo=stringa.length;
+       for (j=0;j<elenco.length;j++)
+               {
+               if (document.disamb.interp[j].checked)
+                       {
+                       stringa=stringa+escape(elenco[j]);
+
+      // TODO da implementare nella terza fase
+                       //top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
+
+                       //for (k=0;k<top.aliasglob.length;k++){alert(top.aliasglob[k])}
+                       //top.listaliases=top.listaliases+document.disamb.interp[j].value;//in caso di query ulteriori con la stessa lista di alias
+                       }
+                       
+               }
+       if (stringa.length!=controllo) 
+               {
+               window.open(ask_uwobo(stringa),"cw");
+               }
+               else {alert("You must choose one option.");}
+       } 
+
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq3.html
+function templateambigpdq3_init(aliases)
+{
+   top.aliasglob = new Array();
+   for (i=0; i<aliases.length; i++) {
+      top.aliasglob[i] = aliases[i];
+   }
+   top.vlds=new Array();
+   top.window.open(top.topurl+top.action+"editorpdq.html", "sw");
+}
 </SCRIPT>
 </HEAD>
   <script>