1 | <html>
|
---|
2 | <head>
|
---|
3 | <!--
|
---|
4 | <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
|
---|
5 | <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
---|
6 | -->
|
---|
7 | <script src="./jquery-1.11.1.min.js"></script>
|
---|
8 | <script src="./d3.v3.min.js" charset="utf-8"></script>
|
---|
9 | <script src="./sparqlbuilder.js"></script>
|
---|
10 | <!-- script src="./sb-test.js"></script -->
|
---|
11 | <script>
|
---|
12 | <!--
|
---|
13 | function sendSPARQL(){
|
---|
14 | var ep = $("*[name=selectendpoint]").val();
|
---|
15 |
|
---|
16 | if(ep == "input"){
|
---|
17 | ep = $("*[name=inputendpoint]").val();
|
---|
18 | }
|
---|
19 |
|
---|
20 | var query = $("*[name=sparql]").val();
|
---|
21 |
|
---|
22 | query = encodeURIComponent(query);
|
---|
23 |
|
---|
24 | openpage = ep + "?format=text%2Fhtml&query=" + query;
|
---|
25 |
|
---|
26 | window.open(openpage);
|
---|
27 | }
|
---|
28 |
|
---|
29 | function trySample(sparql){
|
---|
30 | var sb = new SPARQLBuilder('sparql');
|
---|
31 | sb.loadSamplePathList();
|
---|
32 |
|
---|
33 | $('#seclass').on('epcomplete', function(){
|
---|
34 | $('#EndPointSelect').val('http://www.ebi.ac.uk/rdf/services/reactome/sparql');
|
---|
35 | sb.changeEndPoint();
|
---|
36 | });
|
---|
37 |
|
---|
38 | $('#seclass').on('secomplete', function(){
|
---|
39 | $('#StartClassSelect').val('http://www.biopax.org/release/biopax-level3.owl#Protein');
|
---|
40 | $('#EndClassSelect').val('http://www.biopax.org/release/biopax-level3.owl#Pathway');
|
---|
41 | });
|
---|
42 | }
|
---|
43 |
|
---|
44 | -->
|
---|
45 | </script>
|
---|
46 | <link rel="stylesheet" href="./sparqlbuilder.css" type="text/css" />
|
---|
47 | </head>
|
---|
48 | <body>
|
---|
49 | <div>
|
---|
50 | <form>
|
---|
51 | <input type="button" id="create" value="Start SPARQLBuilder" onclick="new SPARQLBuilder('sparql'); return false;"/>
|
---|
52 | <input type="button" id="create" value="Try with Sample" onclick="trySample('sparql'); return false;" />
|
---|
53 | <br/>
|
---|
54 | <textarea id="sparql" name="sparql" cols="60" rows="10"></textarea><br/>
|
---|
55 | <input type="button" name="sendsparql" value="Send SPARQL" onClick="sendSPARQL()"><br/>
|
---|
56 | </form>
|
---|
57 | </div>
|
---|
58 | <div id="searchResult"></div>
|
---|
59 | </body>
|
---|
60 | </html>
|
---|