1 function mkBackwardRDFURI(uri)
3 var prefix = "helm:rdf:www.cs.unibo.it/helm/rdf/backward//";
4 var re1 = /#xpointer\(1\/(\d+)\/(\d+)\)/;
5 var re2 = /#xpointer\(1\/(\d+)\)/;
6 // Just one of the following replace will do something
7 uri = uri.replace(re1,",$1,$2");
8 uri = uri.replace(re2,",$1");
10 return (prefix + uri);
13 function removeXPointer(uri)
15 //var re = /#xpointer(\.*)/;
16 // CSC: Why the r.e.s below work and the one above does not?
17 var re1 = /#xpointer\(1\/(\d+)\/(\d+)\)/;
18 var re2 = /#xpointer\(1\/(\d+)\)/;
19 var res = uri.replace(re1,"");
20 res = res.replace(re2,"");
26 function mkGraphURL(uri,keys)
28 var getterURL = unescape(getParam("param.getterURL"));
29 var draw_graphURL = unescape(getParam("param.draw_graphURL"));
30 var url= setParam(location.href,"keys",keys);
31 url = setParam(url,"xmluri", getterURL + 'getempty');
32 url = setParam(url,"param.CICURI",escape(uri));
33 var uri_set_size = document.uri_set_size.elements[0].value;
34 url = setParam(url,"param.uri_set_size",uri_set_size);
36 // The generated URL is sometimes too long for I.E.
37 // So it is now better to remove some unuseful pararams from the inner URL
38 url = dropParam(url,"param.processorURL");
40 url = draw_graphURL + 'draw?url=' + escape(url);
41 var url2 = setParam(location.href,"keys","MGL,RT");
42 url2 = setParam(url2,"xmluri",escape(url));
43 url2 = setParam(url2,"param.uri_set_size",uri_set_size);
47 function mkDepURL(uri)
49 return mkGraphURL(uri,"MDG");
53 function mkMetaURL(uri)
55 return mkGraphURL(uri,"MMG");
58 function mkCICURL(uri)
60 var rawuri = removeXPointer(uri);
61 var getterURL = getParam("param.getterURL");
62 var interfaceURL = unescape(getParam("param.interfaceURL"));
63 var url= setParam(location.href,"keys",getParam("param.keys"));
64 url = setParam(url,"xmluri", getterURL + 'getxml%3Furi%3D' + rawuri);
65 url = setParam(url,"param.CICURI",rawuri);
66 url = interfaceURL + "?url=" + escape(url);
70 function mkMetaTheoryURL(uri)
72 var rdfuri = mkBackwardRDFURI(uri);
73 var getterURL = getParam("param.getterURL");
74 var url = setParam(location.href,"keys","meta_theory," + unescape(getTheoryKeys()));
75 url = setParam(url,"param.embedkeys", getEmbedKeys());
76 url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + rdfuri);