Changeset 27693 for gs2-extensions/afrepo/trunk/src/src/html/sparql.php
- Timestamp:
- 2013-06-21T17:50:51+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/afrepo/trunk/src/src/html/sparql.php
r27679 r27693 13 13 14 14 <title>SALAMI SPARQL Endpoint</title> 15 16 <script src="js/jquery-1.10.1.js" > </script> 17 18 <script> 19 20 21 function onSubmit() { 22 23 alert("OnSubmit"); 24 25 $.ajax({ 26 type: "POST", 27 beforeSend: function (request) { 28 //request.setRequestHeader("Authority", authorizationToken); 29 }, 30 31 url: "<?php echo $repo->getSparqlEndpoint();?>", 32 data: "query=" + $('#rdf-query'), 33 processData: false, 34 success: function(msg) { 35 $("#rdf-results").append("The result =" + StringifyPretty(msg)); 36 } 37 }); 38 39 return false; 40 41 } 42 43 44 </script> 45 15 46 </head> 16 47 … … 24 55 <div id="navigation"> 25 56 <ul> 26 <li class="selected"><a href="#">Home</a></li>27 <li ><a href="sparql.php">SPARQL</a></li>57 <li><a href="index.php">Home</a></li> 58 <li class="selected"><a href="#">SPARQL</a></li> 28 59 <li><a href="contact.php">Contact</a></li> 29 60 </ul> … … 34 65 <div id="content"> 35 66 36 <form action="<?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?>" method="post"> 37 <input type="hidden" name="output" value="text"/> 67 <p> 68 RDF Query: 69 </p> 38 70 39 <textarea name="query" cols="80" rows="18"> 40 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 41 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 71 <!-- 72 action="<?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?>" method="post" 73 --> 74 75 <form onsubmit="return onSubmit()"> 76 77 <textarea name="query" id="rdf-query" 78 style="width: 97%; margin-left: 10px; margin-right: 20px;" rows="8"> 79 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 80 PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 42 81 43 82 SELECT * WHERE { 44 83 ?s ?p ?o 45 84 } LIMIT 10 46 </textarea><br> 85 </textarea> 86 <br/> 47 87 48 <em>Soft limit</em> <input type="text" name="soft-limit"> 49 <input type="submit" value="Execute"><input type="reset"> 88 <span style="margin: 5px 20px 5px 20px;"> 89 Output type: 90 <select name="output"> 91 <option>xml</option> 92 <option>json</option> 93 <option>text</option> 94 </select> 95 </span> 50 96 97 <span style="margin: 5px 20px 5px 20px;"> 98 Maximum results returned: 99 <select name="soft-limit"> 100 <option>10</option> 101 <option>100</option> 102 <option>1000</option> 103 </select> 104 </span> 51 105 52 <select name="output"> 53 <option>xml</option> 54 <option>json</option> 55 <option>text</option> 56 </select> 106 <span style="margin: 5px 40px 5px 40px;"> 107 <input type="submit" value="Execute"> 108 </span> 109 110 <span style="margin: 5px 40px 5px 40px;"> 111 <input type="reset"> 112 </span> 113 57 114 58 115 </form> 59 116 60 117 61 <p>The <code>Accept</code> header you send is taken into account. 62 Various types of RDF are available, plus an HTML representation and 63 potentially the audio data (use <code>audio/*</code> to accept any 64 format of audio).</p> 65 <?php if ($repo->getSparqlEndpoint()) { ?> 66 <p>A Sparql endpoint is available at 67 <code><?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?></code>.</p> 68 <?php } ?> 118 <p> 119 RDF Results: 120 </p> 121 <textarea id="rdf-results" 122 style="width: 97%; margin-left: 10px; margin-right: 20px;" rows="8"> 123 </textarea> 124 125 <p> 126 The <code>Accept</code> header you send is taken into account. 127 Various types of RDF are available, plus an HTML representation and 128 potentially the audio data (use <code>audio/*</code> to accept any 129 format of audio). 130 </p> 131 132 133 <p> 134 The machine-interfacable Sparql endpoint, which operates without 135 a limit on the number of tripples returned, is available at 136 <code><?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?></code>. 137 </p> 138 139 140 </div> 141 142 143 <div id="footer" style="border-top: 8px groove #7ECDF3;"> 144 <table cellpadding="0px" cellspacing="0px" width="100%"> 145 <tbody> 146 <tr style="background: white;"> 147 <td align="center"> 148 <a href="http://www.sshrc-crsh.gc.ca/Default.aspx"> 149 <img width="400px" src="images/sshrc_logo.jpeg"> 150 </a> 151 </td> 152 <td align="center"> 153 <a href="http://www.nsf.gov/index.jsp"> 154 <img width="100px" src="images/nsf_logo.jpeg"> 155 </a> 156 </td> 157 <td align="center"> 158 <a href="http://www.jisc.ac.uk/"> 159 <img height="100px" src="images//jisc_logo.jpeg"> 160 </a> 161 </td> 162 </tr> 163 </tbody> 164 </table> 165 166 </div> 167 168 </div> 69 169 </body> 70 170 </html>
Note:
See TracChangeset
for help on using the changeset viewer.