]> matita.cs.unibo.it Git - helm.git/commitdiff
added html templates and pages
authorStefano Zacchiroli <zack@upsilon.cc>
Tue, 21 Jan 2003 11:38:40 +0000 (11:38 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Tue, 21 Jan 2003 11:38:40 +0000 (11:38 +0000)
23 files changed:
helm/searchEngine/html/aliaslist.html [new file with mode: 0644]
helm/searchEngine/html/blank.html [new file with mode: 0644]
helm/searchEngine/html/boole.html [new file with mode: 0644]
helm/searchEngine/html/editor.html [new file with mode: 0644]
helm/searchEngine/html/editorpdq.html [new file with mode: 0644]
helm/searchEngine/html/expnamedsubst.html [new file with mode: 0644]
helm/searchEngine/html/expr.html [new file with mode: 0644]
helm/searchEngine/html/genid.html [new file with mode: 0644]
helm/searchEngine/html/grammar.html [new file with mode: 0644]
helm/searchEngine/html/grammarpdq.html [new file with mode: 0644]
helm/searchEngine/html/index.html [new file with mode: 0644]
helm/searchEngine/html/loc_obj.html [new file with mode: 0644]
helm/searchEngine/html/mat_con.html [new file with mode: 0644]
helm/searchEngine/html/paginacollink.html [new file with mode: 0644]
helm/searchEngine/html/pdq.html [new file with mode: 0644]
helm/searchEngine/html/query_choice.html [new file with mode: 0644]
helm/searchEngine/html/set.html [new file with mode: 0644]
helm/searchEngine/html/start.html [new file with mode: 0644]
helm/searchEngine/html/summary.html [new file with mode: 0644]
helm/searchEngine/html/templateambigpdq1.html [new file with mode: 0644]
helm/searchEngine/html/templateambigpdq2.html [new file with mode: 0644]
helm/searchEngine/html/templateambigpdq3.html [new file with mode: 0644]
helm/searchEngine/html/val.html [new file with mode: 0644]

diff --git a/helm/searchEngine/html/aliaslist.html b/helm/searchEngine/html/aliaslist.html
new file mode 100644 (file)
index 0000000..c74e2ca
--- /dev/null
@@ -0,0 +1,79 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function invia()
+       {
+       stadd="";
+       for (num=0;num<parent.calias;num++)
+               {
+               stadd=stadd+parent.alist[num]+" ";
+               //alert(stadd);
+               }
+       //top.window.open(top.topurl+"/getpage?url=editorpdq.html","sw");
+       top.window.sw.editalias(stadd);
+       //alert(parent.mcq);
+       parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Alias list]</font>","");
+       //alert(parent.mcq);
+       //top.qw.document.close();
+       //top.qw.document.write(parent.mcq);
+       if (parent.mcq=="<font color=\"#ff0000\">[Alias list]</font> [Expr]")   
+               {
+               parent.mcq="[Expr]";
+               }
+       else 
+               {
+               parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">","");
+               parent.mcq=parent.mcq.replace("</font>","");
+               }
+       parent.parse(parent.mcq);
+       }
+function rimuovialias()
+       {
+       //alert(document.aliaslist.elenco.value);
+       if (document.aliaslist.elenco.value!=""){
+       for (num=Number(document.aliaslist.elenco.value);num<top.aliasglob.length;num++)
+               {
+               top.aliasglob[num]=top.aliasglob[num+1];
+               }
+       top.aliasglob.length--;
+       parent.aggiorna();}
+       }
+function listalias()
+       {
+       for (num=0;num<top.aliasglob.length;num++)
+               {
+               document.write("<OPTION value="+num+">"+top.aliasglob[num]);
+               //alert (top.aliasglob[num]);
+               }
+       }
+function addalias()
+       {
+       if (parent.idcheck(document.aliaslist.idi.value)==1 && parent.uricheck(document.aliaslist.uri.value)==1)
+               {
+               top.aliasglob[top.aliasglob.length]="alias "+document.aliaslist.idi.value+" "+document.aliaslist.uri.value;
+               parent.aggiorna();
+               }
+       }
+function istruzioni()
+       {       
+       top.hw.document.close();
+       top.hw.document.write("You must now enter a list of alias. An Alias is the word 'alias' followed by an <a href='grammarpdq.html#Id' target='gw'>Id</a>, followed by an <a href='grammarpdq.html#Uri' target='gw'>Uri</a>.You may enter as many of them as you want, after each one click the button 'add alias' or press enter and it will be added. When you are done, click 'done'.");
+       }
+istruzioni();
+</SCRIPT>
+</HEAD>
+<BODY>
+<form name="aliaslist" action="Javascript:addalias();" method="get">
+alias
+<input name="idi" type=text size="15">
+<input name="uri" type=text size="45" value="cic:/">
+<input type=submit value="add alias">
+<input type=button value="Done" onClick="top.window.open(top.topurl+'/getpage?url=blank.html','hw');top.window.open(top.topurl+'/getpage?url=editorpdq.html','sw');invia();" ><br>
+<select name="elenco" size=7>
+<script language=Javascript> listalias(); document.aliaslist.idi.focus(); </script>
+</select>
+<br>
+<input type=button value="delete selected" onClick="rimuovialias()";>
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/blank.html b/helm/searchEngine/html/blank.html
new file mode 100644 (file)
index 0000000..903e316
--- /dev/null
@@ -0,0 +1,4 @@
+<HTML>
+<body bgcolor="#ffffff";>
+</body>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/boole.html b/helm/searchEngine/html/boole.html
new file mode 100644 (file)
index 0000000..015ac57
--- /dev/null
@@ -0,0 +1,66 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function help()
+       {
+       alert ("spiegazione del bottone selezionato");
+       }
+function choice()
+{
+top.stadd="";
+with (document.form1) {
+       if (selopt[0].checked) {
+               top.stadd=boole1.value;
+                                         }
+       if (selopt[1].checked) {
+               top.stadd="([boole])";
+                                         }
+       if (selopt[2].checked) {
+               top.stadd=boole2.value+" [boole]";
+                                         }
+       if (selopt[3].checked) {
+               top.stadd="[boole] "+boole3.value+" [boole]";
+                                         }
+       if (selopt[4].checked) {
+               top.stadd="[val] "+boole4.value+" [val]";
+                                         }
+       if (selopt[5].checked) {
+               boole5.value=top.tpa(boole5.value);
+               top.stadd=boole5.value;
+                                         }
+                  }
+if (top.stadd!="") top.aggq();
+       else alert("You left at least one field unfilled");
+}
+</SCRIPT>
+</HEAD>
+<BODY>
+<h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
+<input type="button" value="&lt;-" onmouseOver="top.help(-8)" onclick="top.annulla()">
+<input type="button" value="-&gt;" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
+<h2> Select one of the following: </h2>
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt"> <select name="boole1" onFocus="selopt[0].checked=true">
+<OPTION value=false> false
+<OPTION value=true> true
+</select> <br>
+<input type="radio" name="selopt"> ( [boole] ) <br>
+<input type="radio" name="selopt"> <select name="boole2" onFocus="selopt[2].checked=true">
+<OPTION value=not> not
+<OPTION value=ex> ex
+</select> [boole] <br>
+<input type="radio" name="selopt"> [boole] <select name="boole3" onFocus="selopt[3].checked=true">
+<OPTION value=and> and
+<OPTION value=or> or
+</select> [boole]  <br>
+<input type="radio" name="selopt"> [val] <select name="boole4" onFocus="selopt[4].checked=true">
+<OPTION value=sub> sub
+<OPTION value=meet> meet
+<OPTION value=eq> eq
+</select>
+[val]<br>
+<input type="radio" name="selopt"> <input name="boole5" type=text onFocus="selopt[5].checked=true;top.help(1)"> <br>
+<input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
+</form>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/editor.html b/helm/searchEngine/html/editor.html
new file mode 100644 (file)
index 0000000..b032f0c
--- /dev/null
@@ -0,0 +1,120 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+qbf=/[[^\[\]<>]*|<set>|<val>|<boole>]*/
+function invia()
+       {
+       window.open(top.topurl+"/execute?query="+escape(document.edit.qta.value),"cw");
+       }
+function parse1()
+       {
+       while (fb.indexOf("<")>-1){
+       if (fb.indexOf("<")>0)
+               {
+               fb=fb.replace("<","&lt;");
+               }
+                                        }
+       while (fb.indexOf(">")>-1){
+       if (fb.indexOf(">")>0)
+               {
+               fb=fb.replace(">","&gt;");
+               }
+                                        }
+       //while (fb.indexOf("[?")>-1){
+               //fb=fb.replace("[?","&gt;");
+                       //               }
+       }
+function parse()
+       {
+       while (fb.indexOf("<set>")>-1)
+               {
+               fb=fb.replace("<set>","[set]");
+               }
+       while (fb.indexOf("<val>")>-1)
+               {
+               fb=fb.replace("<val>","[val]");
+               }
+       while (fb.indexOf("<boole>")>-1)
+               {
+               fb=fb.replace("<boole>","[boole]");
+               }
+       parse1();
+       }
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+"/getpage?url=start.html","qw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       }
+function comprimispazi()
+       {
+       stringa=document.edit.qta.value;
+       while (stringa.charAt(0)==" ") {stringa=stringa.substring(1,stringa.length)}
+       sle=stringa.length;
+       for (i=1;i<sle;i++)
+               {
+               if (stringa.charAt(i)==" " && stringa.charAt(i+1)==" ") {
+                       //alert("i="+i+"char="+stringa.charAt(i));
+                       //alert(stringa.substring(0,i)+"---"+stringa.substring(i+1,stringa.length));
+                       stringa=stringa.substring(0,i)+stringa.substring(i+1,stringa.length); i--;}             
+               }
+       document.edit.qta.value=stringa;
+       }
+function apply()
+       {
+       top.storep=1;
+       fb=document.edit.qta.value;
+       ok=qbf.test(fb);
+       if (ok){
+       parse();
+       //alert("parse ok");
+       top.fb=fb;
+       top.storeps=1;top.storepv=1;top.storepb=1;
+       top.parse();
+       //alert("top.parse ok");
+       top.query=top.fb;
+       top.qw.document.close();
+       top.qw.document.write(top.query);
+       top.aggform();  //alert("aggform ok");
+       top.aggcw();//alert("aggcw ok");
+       comprimispazi();}
+       }
+function inserisci(mq)
+       {
+       document.edit.qta.focus();
+       var TR=document.selection.createRange();
+       if(TR!=null)
+               {
+                       TR.text=TR.text+mq;
+               } 
+       else document.edit.qta.value+=mq;
+       //comprimispazi();
+       }
+function agg()
+       {
+       document.edit.qta.value=top.cquery;
+       comprimispazi();
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<table>
+<tr><td>
+<form name="edit" method="get" action="Javascript:invia()">
+<textarea name="qta" cols="40" rows="8" onMouseOver="top.help(-2)";>
+</textarea>
+</td>
+<td>
+<input type="button" value="set" onMouseOver="top.help(-6)" onClick="inserisci(' <set> ');"><br>
+<input type="button" value="val" onMouseOver="top.help(-6)" onClick="inserisci(' <val> ');"><br>
+<input type="button" value="bol" onMouseOver="top.help(-6)" onClick="inserisci(' <boole> ');"><br>
+</td></tr></table>
+<input type="submit" value="Submit the query" onMouseOver="top.help(-4)"></input>
+<input type="reset" value="Restart" onMouseOver="top.help(-5)" onClick="armageddon()"></input>
+<input type="button" value="Apply Changes" onMouseOver="top.help(-3)" onClick="apply();top.actinput++;top.storia[top.actinput]=top.query;top.numeroazioniannullate=0;"></input>
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/editorpdq.html b/helm/searchEngine/html/editorpdq.html
new file mode 100644 (file)
index 0000000..ae49abc
--- /dev/null
@@ -0,0 +1,90 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var alias="";
+var expr="";
+function armageddon()
+       {
+       if (confirm("Are you sure you want to delete your query and start a new one?"))
+               {
+               top.terminecic="";top.listaliases="";top.ricordaliaslist=0;top.vlds=new Array();var alias="";var expr="";
+               top.initialize();
+               top.window.open(top.topurl+"/getpage?url=start.html","qw");
+               top.window.open(top.topurl+"/getpage?url=blank.html","cw");
+               top.window.open(top.topurl+"/getpage?url=blank.html","hw");
+               top.window.open(top.topurl+"/getpage?url=blank.html","gw");
+               top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+               }
+       }
+function nuovapdqsa()
+       {
+       if (confirm("Are you sure you want to change expression?"))
+               {
+               top.terminecic="";
+               document.invio.expression.value="";document.invio.aliaslist.value=unescape(top.listaliases);
+               top.ricordaliaslist=1;
+               window.open(top.topurl+"/getpage?url=pdq.html","cw");
+               window.open(top.topurl+"/getpage?url=editorpdq.html","sw");
+               }
+       }
+function invia()
+       {
+       if (document.invio.expression.value!="")
+               {top.terminecic=escape(document.invio.expression.value);
+    top.listaliases="";
+               for (i=0;i<top.aliasglob.length;i++)
+                       {
+                       top.listaliases=top.listaliases+escape(top.aliasglob[i]+" ");
+                       }
+               //alert(top.listaliases);
+    window.open(top.topurl+"/searchPattern?term="+escape(document.invio.expression.value)+"&aliases="+top.listaliases,"cw");
+    }
+               //window.open(top.topurl+"/getpage?url=templateambigpdq2.html","bw")}   
+       else {alert("Please complete the query before.")}
+       }
+function warning()
+       {
+       alert("You may not modify this field.",alias);
+       document.invio.aliaslist.value=alias;
+       document.invio.expression.value=expr;
+       }
+function editalias(valore)
+       {
+       top.window.sw.alias=valore;
+       document.invio.aliaslist.value=valore;
+       }
+function editexpr(valore)
+       {
+       top.window.sw.expr=valore;
+       document.invio.expression.value=valore;
+       }
+function listalias()
+       {
+       for (num=0;num<top.aliasglob.length;num++)
+               {
+               //alert(top.aliasglob[num]);
+               document.write("<OPTION value="+num+">"+top.aliasglob[num]);
+               }
+       }
+function editaalias()
+       {
+       if (document.invio.expression.value!=""){top.terminecic=escape(document.invio.expression.value)}
+  top.window.open(top.topurl+"/getpage?url=aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<form name="invio" action="Javascript:invia();">
+<select name="aliaslist" size=1>
+<script language=Javascript> listalias(); </script>
+</select> Your list of alias.
+<input type=button value="edit" onMouseOver="top.help(-9)" onClick="editaalias()";>
+</br>
+<textarea name="expression" cols="43" rows="6"></textarea><br>Your expression.<br>
+<input type=submit value="Submit" onMouseOver="top.help(-4)"></input>
+<input type=button value="Restart" onMouseOver="top.help(-5)" onClick="armageddon()"></input>
+<input type=button value="New expression" onMouseOver="top.help(-8)" onClick="nuovapdqsa()"></input>
+</form>
+<script language=Javascript>document.invio.expression.value=unescape(top.terminecic); </script>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/expnamedsubst.html b/helm/searchEngine/html/expnamedsubst.html
new file mode 100644 (file)
index 0000000..bb81733
--- /dev/null
@@ -0,0 +1,78 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function invia()
+       {
+       stadd="{";
+       for (num=0;num<parent.calias;num++)
+               {
+               stadd=stadd+parent.alist[num]+":=[Expr];";
+               //alert(stadd);
+               }
+       //alert(parent.mcq);
+       //alert(stadd.charAt(stadd.length-1));
+       if (stadd.charAt(stadd.length-1)==";"){stadd=stadd.substring(0,stadd.length-1);}
+       stadd=stadd+"}"
+       if (stadd==("{}")){stadd=""}
+       parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[exp_named_subst]</font>",stadd);
+       //alert(parent.mcq);
+       //top.qw.document.close();
+       //top.qw.document.write(parent.mcq);
+       parent.parse(parent.mcq);
+       }
+function rimuovialias()
+       {
+       //alert(document.aliaslist.elenco.value);
+       if (document.aliaslist.elenco.value!=""){
+       for (num=Number(document.aliaslist.elenco.value);num<parent.calias;num++)
+               {
+               //alert (parent.alist[num]+" "+parent.alist[num+1]);
+               parent.alist[num]=parent.alist[num+1];
+               }
+       parent.calias--;parent.aggiorna2();}
+       }
+function listalias()
+       {
+       for (num=0;num<parent.calias;num++)
+               {
+               document.write("<OPTION value="+num+">"+parent.alist[num]);
+               //alert (parent.alist[num]);
+               }
+       }
+function addalias()
+       {
+       ok=0;
+       if (document.aliaslist.varid.value.indexOf("/")>0)
+               {if (parent.uricheck(document.aliaslist.varid.value)==1 && document.aliaslist.varid.value.substring(document.aliaslist.varid.value.length-3,document.aliaslist.varid.value.length)=="var")
+                       {ok=1}
+               }
+       else {if (parent.idcheck(document.aliaslist.varid.value)==1)
+               {ok=1}
+               }       
+       if (ok==1)
+               {
+               //alert (document.aliaslist.idi.value+" "+document.aliaslist.uri.value);
+               parent.alist[parent.calias]=document.aliaslist.varid.value
+               //alert (parent.alist[parent.calias]);
+               parent.calias=parent.calias+1;
+               parent.aggiorna2();
+               }
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+You must now enter a list of named_subst. A named_subst is an <a href="grammarpdq.html#Id" target="gw">Id</a> or a <a href="grammarpdq.html#Varuri" target="gw">Varuri</a> followed by ":=" followed by an expression.
+You may enter as many of them as you want (even none), after each one click the button "add" or press enter and it will be added. When you are done, click "done".
+<br>
+<form name="aliaslist" action="Javascript:addalias();" method="get">
+<input name="varid" type=text size="35"> Insert here the Id or the Uri you want to add.
+<input type=submit value="add">
+<input type=button value="Done" onClick="invia();" ><br>
+<select name="elenco" size=7>
+<script language=Javascript> listalias(); </script>
+</select>
+<br>
+<input type=button value="delete selected" onClick="rimuovialias()";>
+</form>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/expr.html b/helm/searchEngine/html/expr.html
new file mode 100644 (file)
index 0000000..291b40c
--- /dev/null
@@ -0,0 +1,51 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function choice()
+       {
+with (document.form1) {        
+       stadd="";top.qw.document.close();quanti=0;
+       if (selopt[0].checked) {stadd="\[Genid]"+document.form1.ex1.value+"[Expr].[Expr]"}
+       if (selopt[1].checked) {stadd="![Genid]:[Expr].[Expr]"}
+       if (selopt[2].checked) {stadd="[Expr]-&gt;[Expr]"}
+       if (selopt[3].checked) {stadd="([Expr])-&gt;[Expr]"}
+       if (selopt[4].checked) {stadd=document.form1.ex2.value}
+       if (selopt[5].checked) {
+                               while (quanti<1)
+                                       {
+                                       quanti=prompt("How many expressions in the list?","1");//alert(quanti);
+                                       if (isNaN(quanti)){quanti=0;}
+                                       }
+                               stadd="(";
+                               for (i=0;i<Math.floor(quanti);i++)
+                               {stadd=stadd+"[Expr] "}
+                               stadd=stadd+")";
+                              }
+       parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Expr]</font>",stadd);
+       //top.qw.document.write(parent.mcq);
+       parent.parse(parent.mcq);
+                       }
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+You are entering an expression. Select one of the following.
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt">\[Genid]<select name="ex1" onFocus="selopt[0].checked=true;">
+<option value=":">:
+<option value=":=">:=
+</select>[Expr].[Expr] <br>
+<input type="radio" name="selopt">![Genid]:[Expr].[Expr] <br>
+<input type="radio" name="selopt">[Expr]-&gt;[Expr]<br>
+<input type="radio" name="selopt">([Expr])-&gt;[Expr]<br>
+<input type="radio" name="selopt"> <select name="ex2" onFocus="selopt[4].checked=true;">
+<option value="Prop"> Prop 
+<option value="Set"> Set
+<option value="Type"> Type
+<option value="?"> ?
+</select> <br>
+<input type="radio" name="selopt"> ( [Expr list] ) <br>
+<input type=submit value="Select">
+</form>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/genid.html b/helm/searchEngine/html/genid.html
new file mode 100644 (file)
index 0000000..8883ca3
--- /dev/null
@@ -0,0 +1,27 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+sel=2;stadd="";
+function choice()
+       {
+       if (sel==0){stadd=document.form1.gen0.value;if (!parent.idcheck(document.form1.gen0.value)){stadd=""}}
+       if (sel==1){stadd=document.form1.gen1.value;if (!parent.uricheck(document.form1.gen1.value)){stadd=""}
+       if (stadd.substring(stadd.length-3,stadd.length)=="con"){stadd="";alert("You may not enter a Conuri.")}}
+       if (sel==1 && stadd!="") {stadd=stadd+" [exp_named_subst]";}
+       if (stadd!="") {parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Genid]</font>",stadd);
+       //top.qw.document.close();top.qw.document.write(parent.mcq);
+       parent.parse(parent.mcq);}
+       sel=2;
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+You are now entering a Genid. It may be a simple <a href="grammarpdq.html#Id" target="gw">Id</a>, or an <a href="grammarpdq.html#Uri" target="gw">Uri</a> followed by nothing or by an <a href="grammarpdq.html#Exp_Named_Subst" target="gw">Exp_Named_Subst</a>.
+<form name="form1" action="Javascript:choice();" method="get">
+<input name="gen0" type=text onFocus="sel=0"> Insert here the <a href="grammarpdq.html#Id" target="gw">Id</a>
+<br>
+<input name="gen1" type=text value="cic:/" onFocus="sel=1"> Or insert here the <a href="grammarpdq.html#Uri" target="gw">Uri</a>. The uri may not be a <a href="grammarpdq.html#Conuri" target="gw">Conuri</a>.<br>
+<input type=submit value="Enter">
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/grammar.html b/helm/searchEngine/html/grammar.html
new file mode 100644 (file)
index 0000000..a18b27c
--- /dev/null
@@ -0,0 +1,76 @@
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<A NAME="string">
+<P><B>&lt;string&gt;</B>::= '"' [ "\" . | '^ " \' ] * '"'</A>
+<A NAME="path">
+<P><B>&lt;path&gt;</B>::= &lt;<A HREF="#string">string</A>&gt; [ "/" &lt;<A HREF="#string">string</A>&gt; ] *</A>
+<A NAME="string_list">
+<P><B>&lt;string_list&gt;</B>::= &lt;<A HREF="#string">string</A>&gt; [ "," &lt;<A HREF="#string">string</A>&gt; ] *</A>
+<A NAME="alpha">
+<P><B>&lt;alpha&gt;</B>::= [ 'A - Z' | 'a - z' |' :_' ] + </A>
+<A NAME="number">
+<P><B>&lt;number&gt;</B>::= [ '0 - 9' ] + </A>
+<A NAME="id">
+<P><B>&lt;id&gt;</B>::= &lt;<A HREF="#alpha">alpha</A>&gt; [ &lt;<A HREF="#alpha">alpha</A>&gt; | &lt;<A HREF="#number">number</A>&gt; ] * </A>
+<A NAME="rvar">
+<P><B>&lt;rvar&gt;</B>::= "@" &lt;<A HREF="#id">id</A>&gt; </A>
+<A NAME="svar">
+<P><B>&lt;svar&gt;</B>::= "%" &lt;<A HREF="#id">id</A>&gt; </A>
+<A NAME="vvar">
+<P><B>&lt;vvar&gt;</B>::= "$" &lt;<A HREF="#id">id</A>&gt; </A>
+<A NAME="refine">
+<P><B>&lt;refine&gt;</B>::= [ "sub" | "super" ] ? </A>
+<A NAME="qualifier">
+<P><B>&lt;qualifier&gt;</B>::= [ "inverse" ] ? &lt;<A HREF="#refine">refine</A>&gt; &lt;<A HREF="#path">path</A>&gt; </A>
+<A NAME="assign">
+<P><B>&lt;assign&gt;</B>::= &lt;<A HREF="#vvar">vvar</A>&gt; "&lt;-" &lt;<A HREF="#path">path</A>&gt; </A>
+<A NAME="attr_list">
+<P><B>&lt;attr_list&gt;</B>::= [ "attr" &lt;<A HREF="#assign">assign</A>&gt; [ "," &lt;<A HREF="#assign">assign</A>&gt;] * ] ? </A>
+<A NAME="set">
+<P><B>&lt;set&gt;</B>::= "ref" &lt;<A HREF="#val">val</A>&gt; </A><BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "pattern" &lt;<A HREF="#val">val</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#svar">svar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#rvar">rvar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "(" &lt;<A HREF="#set">set</A>&gt; ")"<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "relation" &lt;<A HREF="#qualifier">qualifier</A>&gt; &lt;<A HREF="#val">val</A>&gt; &lt;<A HREF="#attr_list">attr_list</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "select" &lt;<A HREF="#rvar">rvar</A>&gt; "in" &lt;<A HREF="#set">set</A>&gt; "where" &lt;<A HREF="#boole">boole</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#set">set</A>&gt; [ "union" | "intersect" | "diff" ] &lt;<A HREF="#set">set</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "let" &lt;<A HREF="#svar">svar</A>&gt; "be" &lt;<A HREF="#set">set</A>&gt; "in" &lt;<A HREF="#set">set</A>&gt; <BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "let" &lt;<A HREF="#vvar">vvar</A>&gt; "be" &lt;<A HREF="#val">val</A>&gt; "in" &lt;<A HREF="#set">set</A>&gt; <BR> </A>
+<A NAME="boole">
+<P><B>&lt;boole&gt;</B>::= [ "false" | "true" ] </A><BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "(" &lt;<A HREF="#boole">boole</A>&gt; ")"<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| [ "not" | "ex" ] &lt;<A HREF="#boole">boole</A>&gt; <BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#boole">boole</A>&gt; [ "and" | "or" ] &lt;<A HREF="#boole">boole</A>&gt; <BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#val">val</A>&gt; [ "sub" | "meet" | "eq" ] &lt;<A HREF="#val">val</A>&gt; <BR> </A>
+<A NAME="val">
+<P><B>&lt;val&gt;</B>::= "{" [ &lt;<A HREF="#string_list">string_list</A>&gt; ] ? "}" </A><BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#string">string</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "refof" &lt;<A HREF="#set">set</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#rvar">rvar</A>&gt; "." &lt;<A HREF="#vvar">vvar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#vvar">vvar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "(" &lt;<A HREF="#val">val</A>&gt; ")"<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "property" &lt;<A HREF="#qualifier">qualifier</A>&gt; &lt;<A HREF="#val">val</A>&gt;</A>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/grammarpdq.html b/helm/searchEngine/html/grammarpdq.html
new file mode 100644 (file)
index 0000000..55fec76
--- /dev/null
@@ -0,0 +1,22 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+</SCRIPT>
+</HEAD>
+<BODY>
+<a name="Id">
+<p><b>&lt;Id&gt;</b>::=[ 'A-Z' | 'a-z' ][ 'A-Z' | 'a-z' | '0-9' | \- | _ | \' ]*</a>
+<a name="Uri">
+<p><b>&lt;Uri&gt;</b>::=&lt;<a href="#Conuri">Conuri</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; | &lt;<a href="#Indtyuri">Indtyuri</a>&gt; | &lt;<a href="#Indconuri">Indconuri</a>&gt;</a>
+<a name="Conuri">
+<p><b>&lt;Conuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a> &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.con&quot;</a>
+<a name="Varuri">
+<p><b>&lt;Varuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.var&quot;</a>
+<a name="Indtyuri">
+<p><b>&lt;Indtyuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+</a>
+<a name="Indconuri">
+<p><b>&lt;Indconuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+ &quot;/&quot; ['0-9']+</a>
+<a name="Exp_Named_Subst">
+<p><b>&lt;Exp_Named_Subst&gt;</b>::=&quot;{&quot; [ [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; &quot;;&quot; ]* [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; ] ]? &quot;}&quot;</a>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/index.html b/helm/searchEngine/html/index.html
new file mode 100644 (file)
index 0000000..d26024e
--- /dev/null
@@ -0,0 +1,346 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var query="*"; // stringa che contiene la query nel suo stato attuale.
+var storeps=1;
+var storepv=1;
+var storepb=1; // queste tre variabili contengono il numero da assegnare al prossimo simbolo set, val o boole per creare il link nel frame in alto a sinistra.
+var stadd; // contiene la stringa da aggiungere alla query.
+var fb; // contiene la stringa da aggiungere alla query prima che i set,val e boole siano convertiti in link.
+var ltr="*"; // qui viene memorizzato qual Ã¨ l' ultimo link su cui si Ã¨ cliccato.
+var norvars=0;
+var nosvars=0;
+var novvars1=0;
+var novvars2=0; // queste tre variabili servono per sapere dove memorizzare i nomi delle rvar,svar e vvar inserite dall' utente. 
+var wrong=0;
+var ricordaliaslist=0;
+var actinput=0;
+var numeroazioniannullate=0;
+var terminecic="";var listaliases="";vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
+var disambiguation_choices = "";
+aliasglob=new Array();//per conservare la lista degli alias
+function initialize()
+       {
+       rvars=new Array(100);
+       svars=new Array(100);
+       vvars1=new Array(100);
+       vvars2=new Array(100); // contengono le rvar,svar e vvar inserite dall' utente. 
+       storia=new Array();
+       storia[0]="*";
+       norvars=0;
+       nosvars=0;
+       novvars1=0;
+       novvars2=0;
+       ltr="*";
+       query="*";
+       storeps=1;
+       storepv=1;
+       storepb=1;
+       ricordaliaslist=0;
+       vlds=new Array();
+       aliasglob=new Array();
+       actinput=0;
+       numeroazioniannullate=0;
+       }
+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 -9: hw.document.write("By clicking this you may add or remove aliases as you wish.")
+                               break;
+                       case -81: hw.document.write("Allows you to recover your last input")
+                               break;
+                       case -8: hw.document.write("Allows you to delete your last input")
+                               break;
+                       case -7: hw.document.write("Erases your query and starts a new pre-defined query.")
+                               break;
+                       case -6: hw.document.write("Puts this string in the current cursor position. This button works only with Internet Explorer.")
+                               break;
+                       case -5: hw.document.write("Erases your query and starts a new one.")
+                               break;
+                       case -4: hw.document.write("If you click this your query will be processed and the results will appear in the frame above.")
+                               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.")
+                               break;
+                       case -1: hw.document.write("You may see the grammar here.")
+                               break;
+                       case 0: hw.document.write("")
+                               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.");
+                               break;
+                       case 3: hw.document.write("Enter an <a href=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. ");
+                               break;
+                       case 5: hw.document.write("Enter a <a href=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. ");
+                               break;
+                       case 7: hw.document.write("Enter a <a href=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. ");
+                               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. ");
+                               break;
+                       case 9: hw.document.write("Enter a single <a href=grammar.html#quoted_string target=gw>quoted_string</a> here.");
+                               break;
+                       }       
+       }
+function tpa(quotpath)
+       {
+       while (quotpath.indexOf("<")>-1)
+               {quotpath=quotpath.replace("<","&lt;");}
+       while (quotpath.indexOf(">")>-1)
+               {quotpath=quotpath.replace(">","&gt;");}
+       return (quotpath);
+       }
+function gramcheck(how,what) // esegue il controllo sintattico sulla stringa "what", controllando che rispetti i requisiti indicati dalla clausola "how". Se qualcosa non Ã¨ ok, la variabile "wrong" viene posta ad 1 e la stringa da aggiungere viene ignorata, mentre viene visualizzato un apposito messaggio di errore.             
+       {
+       var slash=0;
+       var alpha=/[A-Za-z:_]/
+       var numero=/[0-9]/
+       switch (how)    {               
+                       case "qsl": // lista di quoted string
+                               if (what.charAt(0)!="{") {gramcheck("qs",what);break;}
+                               if (what.charAt(what.length-1)!="}") {alert ("The list must end with a '}'.");wrong=1;break;}
+                               what=what.substring(1,what.length-1);//alert (what);
+                               while (what.indexOf("\",\"")>-1)
+                                       {
+                                       as=what.substring(0,what.indexOf("\",\"")+1);//alert(as);
+                                       what=what.substring(what.indexOf("\",\"")+2,what.length);//alert(what);
+                                       gramcheck("qs",as);
+                                       }
+                               gramcheck("qs",what);
+                               break;
+                       case "qp": // quoted path
+                               if (what.charAt(0)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               if (what.charAt(what.length-1)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               while (what.indexOf("\"/\"")>-1)
+                                       {
+                                       as=what.substring(0,what.indexOf("\"/\"")+1);//alert(as);
+                                       what=what.substring(what.indexOf("\"/\"")+2,what.length);//alert(what);
+                                       gramcheck("qs",as);
+                                       }
+                               gramcheck("qs",what);
+                               break;
+                       case "qs": // quoted string
+                               if (what.charAt(0)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               if (what.charAt(what.length-1)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               what=what.substring(0,what.length-1);//alert (what);
+                               if (wrong==1) break;
+                               else while (what.length>0)
+                                       {
+                                       what=what.substring(1,what.length);
+                                       if (what.charAt(0)=="\"" && slash==0) {alert ("A \" in a quoted string must be preceded by a \\.");wrong=1;break;} 
+                                       if (what.charAt(0)=="\\") {slash=1} else {slash=0} 
+                                       if (slash==1 && what.length==1) {alert ("A \\ in a quoted string must be followed by something.");wrong=1;}
+                                       }
+                               break;
+                       case "vlist": // lista di vvar (tutto ciò che si trova dopo "attr")
+                               //alert(what.substring(0,4));                           
+                               if ((what.substring(0,4))!="attr"){wrong=1;alert("A vvar_list must begin with the word 'attr'")}
+                               what=what.substring(5,(what.length));vl=what;
+                               //alert(what+"what");
+                               while (what.length>0)
+                                                       {
+                                                       if (what.indexOf(",")>0) {vv=(what.substring(0,what.indexOf(",")));}
+                                                       else {vv=what}                                  
+                               //alert(vv+"vv");
+                                                       if (vv.charAt(0)!="$"){wrong=1;alert("A vvar must begin with a '$'");}
+                                                       if (vv.indexOf("<-")>0)
+                                                                       {
+                                                                       what=what.substring(vv.length+1,what.length);
+                               //alert(what+" nuovowhat "+wrong);
+                                                                       path=vv.substring(vv.indexOf("<-")+2,vv.length);
+                               //alert(path+" path "+wrong);
+                                                                       gramcheck("qp",path); 
+                                                                       vv=vv.substring(1,(vv.indexOf("<-")));
+                               //alert(vv+" vv "+wrong);
+                                                                       gramcheck("id",vv);
+                                                                       }
+                                                       else {wrong=1;alert("An Assign must contain a '<-'.");what="";}
+                               //alert (what+"what");  
+                                                       }
+                               break;
+                       case "id":
+                               //alert (what.charAt(0));
+                               if (!alpha.test(what.charAt(0))) {wrong=1;alert("An ID must begin with a letter , ':' , or '_' .");}
+                               while (what.length>1)   {
+                                       what=what.substring(1,(what.length));
+                                       if (!alpha.test(what.charAt(0)) && !numero.test(what.charAt(0)))
+                                       {wrong=1;alert(what.charAt(0)+" is not a valid character for an id.");}
+                                       //document.write(what+"<BR>");
+                                                       }       
+                               break;
+                       }
+       
+       if (how=="vlist" && wrong==0) // nel caso in cui sia stato eseguito il controllo su una lista di vvar e non siano stati riscontrati errori, tutte le variabili inserite vengono memorizzate.
+               {
+               while (vl.length>0)
+                       {
+                       if (vl.indexOf(",")>-1)
+                               {
+                               vvars2[novvars2++]=vl.substring(0,vl.indexOf("<"));
+                               vl=vl.substring(vl.indexOf(",")+1,vl.length);
+                               }
+                       else    
+                               {
+                               vvars2[novvars2++]=vl.substring(0,vl.indexOf("<"));;
+                               vl="";
+                               }                                               
+                       }
+               //alert ("esco dal loop");
+               }
+       if (wrong==0) {cw.inputok=1} else stadd="";
+       }
+function savelink(n,t) // invocata quando si clicca su un link, memorizza quale di questi debba poi essere sostituito. 
+       {
+       if (t=='s') { top.ltr="[?set"+String(n)+"]";}
+       if (t=='v') { top.ltr="[?val"+String(n)+"]";}
+       if (t=='b') { top.ltr="[?bol"+String(n)+"]";}
+//     alert(ltr);
+       }
+function aggcw() // invocata automaticamente ad ogni modifica della variabile "query", fa apparire nel frame in alto a destra il menu di composizione relativo al primo link della query. Consente quindi di comporre tutta la query senza mai cliccare su alcun link. 
+       {
+       pq=query;
+       while (pq.length>0)
+               {
+               if (pq.indexOf("[?")>-1)        
+                       {
+                       ltr=pq.slice(pq.indexOf("[?"));
+                       ltr=ltr.substring(ltr.indexOf("[?"),(ltr.length-ltr.indexOf("[?"))-(ltr.length-ltr.indexOf("]")-1));
+                       wto=ltr.substring(2,5);
+                       if (wto=="set") {window.open(top.topurl+"/getpage?url=set.html","cw");pq="";}
+                       else if (wto=="val") {window.open(top.topurl+"/getpage?url=val.html","cw");pq="";}
+                       else if (wto=="bol") {window.open(top.topurl+"/getpage?url=boole.html","cw");pq="";}
+                       else pq=pq.substring(pq.indexOf("[?")+2,pq.length);
+                       }
+               else {window.open(top.topurl+"/getpage?url=blank.html","cw");pq="";}
+               } 
+       }
+function aggform() // aggiorna il form nel frame centrale. Invocata ad ogni cambio della variabile "query".
+       {
+       cquery=query;
+       while (cquery.indexOf("<")>-1)
+               {
+               cquery=cquery.replace(cquery.substring(cquery.indexOf("<"),cquery.indexOf(">")+1),"");
+               //alert(cquery);
+               }
+       while (cquery.indexOf("[?")>-1)
+               {
+               //alert(cquery);
+               if (cquery.indexOf("]")>-1)
+                       {
+                       while (cquery.indexOf("]")<cquery.indexOf("[?") && cquery.indexOf("]")>-1)
+                       {cquery=cquery.replace("]","q+u+a+d+r+a+c+h+i+u+s+a");}//alert("loop"+cquery.indexOf("]")+cquery.indexOf("[?"))}
+                       ag1=cquery.slice(cquery.indexOf("[?"));//alert(ag1);
+                       ag1=ag1.substring(ag1.indexOf("[?"),(ag1.length-ag1.indexOf("[?"))-(ag1.length-ag1.indexOf("]")));//alert(ag1);
+                       ag2=ag1.substring(2,5);//alert(ag2);
+                       if (ag2=="set") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<set>");
+                       else if (ag2=="val") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<val>");
+                       else if (ag2=="bol") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<boole>");
+                       else cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("[?")+1),"q+u+a+d+r+a");
+                       //alert(cquery);
+                       }
+               else {cquery=cquery.replace("[?","q+u+a+d+r+a?")}
+               //alert(cquery);        
+               }
+       while (cquery.indexOf("q+u+a+d+r+a+c+h+i+u+s+a")>-1)
+               {
+               cquery=cquery.replace("q+u+a+d+r+a+c+h+i+u+s+a","]");
+               }
+       while (cquery.indexOf("q+u+a+d+r+a")>-1)
+               {
+               cquery=cquery.replace("q+u+a+d+r+a","[");
+               }
+       while (cquery.indexOf("&lt;")>-1)
+               {
+               cquery=cquery.replace("&lt;","<");
+               }
+       while (cquery.indexOf("&gt;")>-1)
+               {
+               cquery=cquery.replace("&gt;",">");
+               }
+       top.sw.agg();
+       }
+function ripristina()
+       {
+       //alert (actinput+" "+storia.length);
+       if (numeroazioniannullate>0)
+               {
+               numeroazioniannullate--;
+               query=storia[actinput+1];actinput++;
+               qw.document.close();
+               qw.document.write(query);
+               aggform();
+               sw.apply();
+               aggcw();
+               cw.focus();
+               }
+       }
+function annulla()
+       {
+       //alert (actinput+" "+storia.length);
+       if (actinput>0)
+               {
+               numeroazioniannullate++;
+               query=storia[actinput-1];actinput--;
+               qw.document.close();
+               qw.document.write(query);
+               aggform();
+               sw.apply();
+               if (query=="*"){cw.location=top.topurl+"/getpage?url=set.html";ltr="*";} else {aggcw();}
+               cw.focus();
+               }
+       }
+function parse() // prende la stringa che si sta tentando di inserire nella query, aggiunge i link dove necessario e mette il risultato nella variabile "fb"
+       {
+       while (fb.indexOf("[set]")>-1){
+       if (fb.indexOf("set")>0)
+               {
+      fb=fb.replace("[set]","<A HREF="+top.topurl+"/getpage?url=set.html target=cw onclick=top.savelink("+top.storeps+",'s')>[?set"+top.storeps+"]</A>");
+               top.storeps++;
+               }
+                                        }
+       while (fb.indexOf("[val]")>-1){
+       if (fb.indexOf("val")>0)
+               {
+      fb=fb.replace("[val]","<A HREF="+top.topurl+"/getpage?url=val.html target=cw onclick=top.savelink("+top.storepv+",'v')>[?val"+top.storepv+"]</A>");
+               top.storepv++;
+               }
+                                        }
+       while (fb.indexOf("[boole]")>-1){
+       if (fb.indexOf("boole")>0)
+               {
+               fb=fb.replace("[boole]","<A HREF="+top.topurl+"/getpage?url=boole.html target=cw onclick=top.savelink("+top.storepb+",'b')>[?bol"+top.storepb+"]</A>");
+               top.storepb++;
+               }
+                                        }
+       }
+function aggq() // aggiorna la query sostituendo l' ultimo link editato con la stringa inserita, poi aggiorna tutti i frame.
+       {
+       //window.open(top.topurl+"/getpage?url=summary.html","cw");
+       qw.document.close();
+       fb=stadd;       
+       nst=ltr.substring(5,(ltr.length-1));// alert(nst+" "+ltr);
+       query=query.replace("<A HREF="+top.topurl+"/getpage?url=set.html target=cw onclick=top.savelink("+nst+",'s')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+"/getpage?url=val.html target=cw onclick=top.savelink("+nst+",'v')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+"/getpage?url=boole.html target=cw onclick=top.savelink("+nst+",'b')>"+ltr+"</A>",ltr);
+       parse();
+       query=query.replace(ltr,fb);
+       actinput++;storia[actinput]=query;numeroazioniannullate=0;//alert (actinput+" "+storia.length);
+       qw.document.write(query);aggform();
+       aggcw();
+       cw.focus();
+       }
+  var topurl=document.location.protocol+'//'+document.location.host;
+</SCRIPT>
+</HEAD>
+  <script>
+    document.write(' <FRAMESET ROWS="69%,31%"> <FRAMESET COLS="40%,60%"> <FRAMESET ROWS="46%,54%"> <FRAME NAME="qw" SRC="'+topurl+'/getpage?url=start.html"> <FRAME NAME="sw" SRC="'+topurl+'/getpage?url=blank.html"> </FRAMESET> <FRAME NAME="cw" SRC="'+topurl+'/getpage?url=blank.html"> </FRAMESET> <FRAMESET COLS="49%,51%"> <FRAME NAME="gw" SRC="'+topurl+'/getpage?url=blank.html" onFocus="help(-1)";> <FRAME NAME="hw" SRC="'+topurl+'/getpage?url=blank.html"> </FRAMESET> </FRAMESET>');
+  </script>
+</HTML>
diff --git a/helm/searchEngine/html/loc_obj.html b/helm/searchEngine/html/loc_obj.html
new file mode 100644 (file)
index 0000000..97e8314
--- /dev/null
@@ -0,0 +1,18 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function invia()
+       {
+       top.window.open(top.topurl+"/locate?id="+document.locate.oggetto.value,"bw");
+       //top.window.open(top.topurl+"/getpage?url=blank.html","bw");
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<form name="locate" method="get" action="Javascript:invia();">
+<input name="oggetto" type=text size=30>
+Insert here the name of the object you want to search.
+<br><input type=submit value="Display results">
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/mat_con.html b/helm/searchEngine/html/mat_con.html
new file mode 100644 (file)
index 0000000..3f4d37e
--- /dev/null
@@ -0,0 +1,16 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function checkint(grado)
+       {
+       if (isNaN(grado))
+               alert ("warning: you must enter a natural number in the grade box");
+       else if (Number(grado)<0|Number(grado)!=Math.floor(Number(grado))) alert ("warning: you must enter a natural number in the grade box");
+       }
+parent.mcq="[Alias list] [Expr]";
+parent.aggq();
+</SCRIPT>
+</HEAD>
+<BODY>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/paginacollink.html b/helm/searchEngine/html/paginacollink.html
new file mode 100644 (file)
index 0000000..83f41bc
--- /dev/null
@@ -0,0 +1,13 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function apriquery()
+       {
+       window.open(top.topurl+"/getpage?url=index.html","new",hotkeys="no");
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<a href="#" onClick="apriquery();">Query composer</a>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/pdq.html b/helm/searchEngine/html/pdq.html
new file mode 100644 (file)
index 0000000..9088ad4
--- /dev/null
@@ -0,0 +1,130 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var mcq="";
+var toq=0;
+alist=new Array(10);
+var calias=0;
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+"/getpage?url=start.html","qw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       }
+function idcheck(ident)
+       {
+       lettera=/[a-zA-Z]/;
+       partediid=/[a-zA-Z0-9_\-\']/;
+       if (!lettera.test(ident.charAt(0))){alert("an Id must begin with a letter.");return(0)}
+       while (ident.length>0)
+               {
+               ident=ident.substring(1,(ident.length));
+               if (ident.length>0){
+               if (!partediid.test(ident.charAt(0))){alert(ident.charAt(0)+" is not a valid character for an Id.");return(0);}
+               }}
+       return(1)
+       }
+function uricheck(ident)
+       {
+       cifra=/[0-9]/
+       cic=ident.substring(0,5);//alert(cic);
+       if (cic!="cic:/"){alert("an Uri must begin with the string 'cic:/'");return(0);}
+       ident=ident.substring(5,ident.length);//alert(ident);
+       if (ident.indexOf(".")<0){alert("an Uri must contain a '.'");return(0);}
+       ident1=ident.substring(0,ident.indexOf("."));//alert(ident1);
+       ident2=ident.substring(ident.indexOf(".")+1,ident.length);//alert(ident2);
+       while (ident1.length>0)
+               {       
+               if (ident1.indexOf("/")>-1)             
+                       {
+                       if (idcheck(ident1.substring(0,ident1.indexOf("/")))==0){return (0)}
+                       ident1=ident1.substring(ident1.indexOf("/")+1,ident1.length);//alert(ident1);
+                       }
+               else {if (idcheck(ident1)==0){return (0)}       
+                       ident1="";}
+               }
+       if (ident2=="con"||ident2=="var"){return(1)}
+       if (ident2.substring(0,6)!="ind#1/"){alert ("syntax error in the Uri.");return(0);}
+       ident2=ident2.substring(6,ident2.length);//alert(ident2);
+       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+       if (ident2.indexOf("/")>-1)
+               {
+               while (ident2.charAt(0)!="/")
+                       {
+                       //alert(ident2);
+                       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+                       ident2=ident2.substring(1,ident2.length);
+                       }
+               }
+       while (ident2.length>0)
+               {
+               //alert(ident2);
+               ident2=ident2.substring(1,ident2.length);
+               if (ident2.length>0){
+               if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+               }}
+       
+       return(1)
+       }
+function aggiorna()
+       {
+       window.open(top.topurl+"/getpage?url=aliaslist.html","bw");
+       top.cw.bw.document.aliaslist.idi.focus();
+       }
+function aggiorna2()
+       {
+       window.open(top.topurl+"/getpage?url=expnamedsubst.html","bw");
+       bw.document.aliaslist.varid.focus();
+       }
+function parse() 
+       {
+       //alert(mcq);
+       calias=0;
+       if (mcq.indexOf("[")>-1)
+               {
+               mcq=mcq.replace("[","<font color=\"#ff0000\">[");
+               mcq=mcq.replace("]","]</font>");
+               top.qw.document.close();
+               top.qw.document.write(mcq);
+               if (mcq.charAt(mcq.indexOf("[")+1)=="A")
+                       {
+                       window.open(top.topurl+"/getpage?url=aliaslist.html","bw")
+                       }
+               if (mcq.charAt(mcq.indexOf("[")+1)=="E")
+                       {
+                       window.open(top.topurl+"/getpage?url=expr.html","bw")
+                       }
+               if (mcq.charAt(mcq.indexOf("[")+1)=="G")
+                       {
+                       window.open(top.topurl+"/getpage?url=genid.html","bw")
+                       }
+               if (mcq.charAt(mcq.indexOf("[")+1)=="e")
+                       {
+                       window.open(top.topurl+"/getpage?url=expnamedsubst.html","bw")
+                       }
+               }
+               else 
+                       {
+                       while (mcq.indexOf("&gt;")>-1)
+                               {
+                               mcq=mcq.replace("&gt;",">");
+                               }
+                       top.window.sw.editexpr(mcq);
+                       window.open(top.topurl+"/getpage?url=blank.html","bw");
+                       window.open(top.topurl+"/getpage?url=blank.html","qw");
+                       }
+       }       
+function aggq()
+       {
+       parse(mcq);
+       //top.qw.document.write(mcq);   
+       }
+</SCRIPT>
+</HEAD>
+<script>
+  document.write(' <frameset rows="24%,76%" border="0" noresize> <frame name=tw src="'+top.topurl+'/getpage?url=query_choice.html";> <frame name=bw src="'+top.topurl+'/getpage?url=blank.html";> </frameset> ');
+</script>
+</HTML>
diff --git a/helm/searchEngine/html/query_choice.html b/helm/searchEngine/html/query_choice.html
new file mode 100644 (file)
index 0000000..8cb800f
--- /dev/null
@@ -0,0 +1,32 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+"/getpage?url=start.html","qw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<form>
+<table><tr><td>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+'/getpage?url=loc_obj.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=blank.html';top.gw.location=top.topurl+'/getpage?url=blank.html';parent.toq=1;this.blur();"> Locate Object<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+'/getpage?url=mat_con.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=editorpdq.html';parent.toq=2;this.blur();"> Match Conclusion<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+'/getpage?url=mat_con.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=editorpdq.html';parent.toq=3;this.blur();"> Search Pattern
+</td>
+</tr></table>
+</form>
+<SCRIPT language="Javascript">
+if (top.ricordaliaslist==1)
+       {
+       window.open(top.topurl+"/getpage?url=expr.html","bw");parent.mcq="<font color=\"#ff0000\">[Expr]</font>";
+       top.qw.document.close();top.qw.document.write("<font color=\"#ff0000\">[Expr]</font>");
+       }
+</script>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/set.html b/helm/searchEngine/html/set.html
new file mode 100644 (file)
index 0000000..3154d93
--- /dev/null
@@ -0,0 +1,157 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var inputok=0;
+function listrvars()
+       {
+       for (num=0; num<top.norvars; num++)
+               {
+               document.write("<OPTION value="+top.rvars[num]+">"+top.rvars[num]);
+               }
+       }
+function listsvars()
+       {
+       for (num=0; num<top.nosvars; num++)
+               {
+               document.write("<OPTION value="+top.svars[num]+">"+top.svars[num]);
+               }
+       }
+function listvvars()
+       {
+       for (num=0; num<top.novvars; num++)
+               {
+               document.write("<OPTION value="+top.vvars[num]+">"+top.vvars[num]);
+               }
+       }
+function help()
+       {
+       alert ("spiegazione del bottone selezionato");
+       }
+function choice()
+{
+top.stadd="";
+with (document.form1) {
+       inputok=0;voidfield=0;top.wrong=0;
+       if (selopt[0].checked) {
+               top.stadd="ref [val]";
+               inputok=1;
+                                         }
+       if (selopt[1].checked) {
+               top.stadd="pattern [val]";
+               inputok=1;
+                                         }
+       if (selopt[2].checked) {
+               top.stadd=set1.value;
+               if (set1.value!="") {inputok=1} else voidfield=1;
+                                         }
+       if (selopt[3].checked) {
+               top.stadd=set2.value;
+               if (set2.value!="") {inputok=1} else voidfield=1;
+                                         }
+       if (selopt[4].checked) {
+               top.stadd="([set])";
+               inputok=1;
+                                         }
+       if (selopt[5].checked) {
+               if (set5.value.charAt(set5.value.length-1)==","){set5.value=set5.value.substring(0,set5.value.length-1)}
+               if (set5.value.length<7) {set5.value=""};
+               set4.value=top.tpa(set4.value);
+               top.stadd="relation "+set25.value+" "+set3.value+" "+set4.value+" [val] "+set5.value;
+               top.gramcheck("qp",set4.value);
+               //alert(set5.value.charAt(set5.value.length-1));
+               top.stadd=top.tpa(top.stadd);
+               //while (top.stadd.indexOf("<")>-1)
+                       //{top.stadd=top.stadd.replace("<","&lt;");}
+               if (set5.value!="")
+               {top.gramcheck("vlist",set5.value);}
+               else inputok=1;
+                                         }
+       if (selopt[6].checked) {
+               top.stadd="select @"+set6.value+" in [set] where [boole]";
+               top.gramcheck("id",set6.value);
+               if ((set6.value!="") && (inputok==1))
+                       {
+                       top.rvars[top.norvars]="@"+set6.value;
+                       top.norvars++;  
+                       }
+                                         }
+       if (selopt[7].checked) {
+               top.stadd="[set] "+set7.value+" [set]";
+               inputok=1;      
+                                         }
+       if (selopt[8].checked) {
+               top.stadd="let %"+set8.value+" be [set] in [set]";
+               top.gramcheck("id",set8.value);
+               if ((set8.value!="") && (inputok==1))
+                       {
+                       top.svars[top.nosvars]="%"+set8.value;
+                       top.nosvars++;  
+                       }
+                                         }
+       if (selopt[9].checked) {
+               top.stadd="let $"+set9.value+" be [val] in [set]";
+               top.gramcheck("id",set9.value);
+               if ((set9.value!="") && (inputok==1))
+                       {
+                       top.vvars1[top.novvars1]="$"+set9.value;
+                       top.novvars1++; 
+                       }
+                                         }
+       if (selopt[10].checked) {
+               set10.value=top.tpa(set10.value);
+               top.stadd=set10.value;
+               if (set10.value!="") {inputok=1} else voidfield=1;
+                                         }
+                  }
+if (top.stadd!="" && inputok==1) {top.aggq()}
+       else if (voidfield==1) alert("You left at least one field unfilled");
+}
+</SCRIPT>
+</HEAD>
+<BODY>
+<h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
+<input type="button" value="&lt;-" onmouseOver="top.help(-8)" onclick="top.annulla()">
+<input type="button" value="-&gt;" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
+<h2> Select one of the following: </h2>
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt"> ref [val] <br>
+<input type="radio" name="selopt"> pattern [val] <br>
+<input type="radio" name="selopt"> <select name="set1" type=text onFocus="selopt[2].checked=true;top.help(6)"> 
+<script language=Javascript> listsvars(); </script>
+</select>
+<br>
+<input type="radio" name="selopt"> <select name="set2" type=text onFocus="selopt[3].checked=true;top.help(4)">
+<script language=Javascript> listrvars(); </script>
+</select>
+<br>
+<input type="radio" name="selopt"> ( [set] ) <br>
+<input type="radio" name="selopt"> relation 
+<select name="set25" onFocus="selopt[5].checked=true">
+<OPTION selected value="">  
+<OPTION value=inverse> inverse
+</select> 
+<select name="set3" onFocus="selopt[5].checked=true">
+<OPTION selected value=""> 
+<OPTION value=sub> sub
+<OPTION value=super> super
+</select> 
+<input name="set4" type=text size=15 value="&quot;&quot;" onFocus="selopt[5].checked=true;top.help(5)">
+[val] <input name="set5" type=text size=20 onFocus="selopt[5].checked=true;top.help(2);if (this.value=='') this.value='attr $';">
+<br>
+<input type="radio" name="selopt"> select @ <input name="set6" type=text onFocus="selopt[6].checked=true;top.help(3)"> 
+in [set] where [boole] <br> <input type="radio" name="selopt"> [set] 
+<select name="set7" onFocus="selopt[7].checked=true">
+<OPTION value=union> union
+<OPTION value=intersect> intersect
+<OPTION value=diff> diff
+</select> 
+[set]  <br>
+<input type="radio" name="selopt"> let %<input name="set8" type=text onFocus="selopt[8].checked=true;top.help(3)"> be [set] in [set] <br>
+<input type="radio" name="selopt"> let $<input name="set9" type=text onFocus="selopt[9].checked=true;top.help(3)"> be [val] in [set] <br>
+<input type="radio" name="selopt"> <input name="set10" type=text 
+onFocus="selopt[10].checked=true;top.help(1)">  <br>
+<input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
+<!--input type="button" value="compose" onclick="choice()"><!--input type="button" value="get help" onclick="help()">
+</form>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/start.html b/helm/searchEngine/html/start.html
new file mode 100644 (file)
index 0000000..ceaea48
--- /dev/null
@@ -0,0 +1,13 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+</SCRIPT>
+</HEAD>
+<BODY>
+<center>
+  <input type=button value="Compose a query" onClick="top.cw.location=top.topurl+'/getpage?url=set.html';top.gw.location=top.topurl+'/getpage?url=grammar.html#set';top.sw.location=top.topurl+'/getpage?url=editor.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.initialize();">
+<br><br>
+<input type=button value="Submit a pre-defined query" onClick="top.cw.location=top.topurl+'/getpage?url=pdq.html';top.gw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=blank.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.initialize();"> 
+</center>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/summary.html b/helm/searchEngine/html/summary.html
new file mode 100644 (file)
index 0000000..8284f0d
--- /dev/null
@@ -0,0 +1,23 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function armageddon()
+       {
+       top.ltr=top.query;
+       top.stadd=document.win.parqu.value;
+       top.aggq();
+       }
+function fill()
+       {
+       document.win.parqu.value=top.query;
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<FORM NAME="win">
+<TEXTAREA ROWS=20 COLS=58 NAME="parqu" onMouseOver=fill()>
+</TEXTAREA><BR>
+<INPUT type="button" value="modifica" onClick=armageddon()>
+</FORM>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/templateambigpdq1.html b/helm/searchEngine/html/templateambigpdq1.html
new file mode 100644 (file)
index 0000000..30b23ec
--- /dev/null
@@ -0,0 +1,80 @@
+<HTML>
+<HEAD>
+<TITLE>@TITLE@</TITLE>
+<SCRIPT language="Javascript">
+var ambiguousinput="@MSG@";
+var elenco = new Array(@CHOICES@);
+var id = "@ID@";
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+"/getpage?url=start.html","qw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       }
+function resetta()
+       {
+       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+               {armageddon();}
+       }
+function listauri()
+       {
+       for (i=0;i<elenco.length;i++)
+               {
+               document.write("<input type=checkbox name=uricheck value="+elenco[i]+"> "+elenco[i]+"<br>"); 
+               }
+       }
+function invia()
+       {
+       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]=id;
+       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]))+" ";
+               //if (j!=top.vlds.length-1) {stringa=stringa+","}
+               }
+       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(stringa,"cw");
+               }
+       } 
+  function selezionaCostanti() {
+    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;
+      }
+    }
+  }
+</SCRIPT>
+</HEAD>
+<BODY>
+<h3><SCRIPT language="Javascript">document.write(ambiguousinput);</SCRIPT></h3>
+<br>Please select one or more of the following.
+<br>
+<form name="disamb">
+<SCRIPT language="Javascript">listauri();</SCRIPT><br>
+<input type=button value="Ok" onClick="invia();">
+<input type=button value="Constants Only" onClick="selezionaCostanti();">
+<input type=button value=Cancel onClick="resetta();">
+<form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/templateambigpdq2.html b/helm/searchEngine/html/templateambigpdq2.html
new file mode 100644 (file)
index 0000000..71fe436
--- /dev/null
@@ -0,0 +1,65 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+elenco = new Array(@INTERPRETATIONS@);
+labels = new Array(@INTERPRETATIONS_LABELS@);
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+"/getpage?url=start.html","qw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
+       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       }
+function resetta()
+       {
+       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+               {armageddon();}
+       }
+function listainterpretazioni()
+       {
+       for (i=0;i<elenco.length;i++)
+               {
+      document.write("<input type=radio name=interp value="+elenco[i]+"> "+labels[i]+"<br>"); 
+               }
+       }
+function invia()
+       {
+       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) 
+               {
+               alert(stringa);
+               window.open(stringa,"cw");
+               }
+               else {alert("You must choose one option.");}
+       } 
+</SCRIPT>
+</HEAD>
+<BODY>
+<h3>There are more than one possible interpretations.</h3>
+<br>Please choose one of the following.
+<br>
+<form name="disamb">
+<SCRIPT language="Javascript">listainterpretazioni();</SCRIPT><br>
+<input type=button value="Ok" onClick="invia();">
+<input type=button value=Cancel onClick="resetta();">
+<form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/templateambigpdq3.html b/helm/searchEngine/html/templateambigpdq3.html
new file mode 100644 (file)
index 0000000..aa6ba6b
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+       <head>
+               <script>
+                       aliases = new Array(@NEW_ALIASES@);
+                       top.aliasglob = new Array();
+                       for (i=0; i<aliases.length; i++) {
+                               top.aliasglob[i] = aliases[i];
+                       }
+                       top.window.open(top.topurl+"/getpage?url=editorpdq.html", "sw");
+               </script>
+       </head>
+       <body>
+               <pre>@RESULTS@</pre>
+       </body>
+</html>
diff --git a/helm/searchEngine/html/val.html b/helm/searchEngine/html/val.html
new file mode 100644 (file)
index 0000000..0e9aae5
--- /dev/null
@@ -0,0 +1,102 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function listrvars()
+       {
+       for (num=0; num<top.norvars; num++)
+               {
+               document.write("<OPTION value="+top.rvars[num]+">"+top.rvars[num]);
+               }
+       }
+function listvvars1()
+       {
+       for (num=0; num<top.novvars1; num++)
+               {
+               document.write("<OPTION value="+top.vvars1[num]+">"+top.vvars1[num]);
+               }
+       }
+function listvvars2()
+       {
+       for (num=0; num<top.novvars2; num++)
+               {
+               document.write("<OPTION value="+top.vvars2[num]+">"+top.vvars2[num]);
+               }
+       }
+function help()
+       {
+       alert ("spiegazione del bottone selezionato");
+       }
+function choice()
+{
+top.stadd="";top.wrong=0;voidfield=1;
+with (document.form1) {
+       if (selopt[0].checked) {
+               voidfield=0;
+               val1.value=top.tpa(val1.value);
+               top.stadd=val1.value;
+               top.gramcheck("qsl",val1.value);
+                                         }
+       if (selopt[1].checked) {
+               top.stadd="refof [set]";
+                                         }
+       if (selopt[2].checked) {
+               if (val2.value==""||val8.value==""){voidfield=1;}
+               else {top.stadd=val2.value+"."+val8.value;}
+                                         }
+       if (selopt[3].checked) {
+               top.stadd=val3.value;
+                                         }
+       if (selopt[4].checked) {
+               top.stadd="([val])";
+                                         }
+       if (selopt[5].checked) {
+               voidfield=0;
+               val6.value=top.tpa(val6.value);
+               top.stadd="property "+val45.value+" "+val5.value+" "+val6.value+" [val]";
+               top.gramcheck("qp",val6.value);
+                                         }
+       if (selopt[6].checked) {
+               val7.value=top.tpa(val7.value);
+               top.stadd=val7.value;
+               if (val7.value!="") {inputok=1} else voidfield=1;
+                                         }
+                  }
+if (top.stadd!="") top.aggq();
+       else if (voidfield==1) alert ("You left at least one field unfilled");
+}
+</SCRIPT>
+</HEAD>
+<BODY>
+<h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
+<input type="button" value="&lt;-" onmouseOver="top.help(-8)" onclick="top.annulla()">
+<input type="button" value="-&gt;" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
+<h2> Select one of the following: </h2>
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt"> <input name="val1" type=text value="{&quot;&quot;}" onFocus="selopt[0].checked=true;top.help(7)"> <br>
+<input type="radio" name="selopt"> refof [set] <br>
+<input type="radio" name="selopt"> <select name="val2" type=text onFocus="selopt[2].checked=true;top.help(4)">
+<script language=Javascript> listrvars(); </script>
+</select> . <select name="val8" type=text onFocus="selopt[2].checked=true;top.help(8)">
+<script language=Javascript> listvvars2(); </script>
+</select>
+<br>
+<input type="radio" name="selopt"> <select name="val3" type=text onFocus="selopt[3].checked=true;top.help(81)">
+<script language=Javascript> listvvars1(); </script>
+</select>
+<br>
+<input type="radio" name="selopt"> ( [val] ) <br>
+<input type="radio" name="selopt"> property
+<select name="val45" onFocus="selopt[5].checked=true">
+<OPTION selected value="">  
+<OPTION value=inverse> inverse
+</select> 
+<select name="val5" onFocus="selopt[5].checked=true">
+<OPTION selected value=""> 
+<OPTION value=sub> sub
+<OPTION value=super> super
+</select> <input name="val6" type=text value="&quot;&quot;" onFocus="selopt[5].checked=true;top.help(5)"> [val] <br>
+<input type="radio" name="selopt"> <input name="val7" type=text onFocus="selopt[6].checked=true;top.help(1)">  <br>
+<input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
+</form>
+</BODY>
+</HTML>