[27679] | 1 | <?php
|
---|
| 2 | require_once "setup.php";
|
---|
| 3 | $base = parse_url($repo->getURIPrefix());
|
---|
| 4 | $basepath = $base["path"];
|
---|
| 5 | ?>
|
---|
| 6 | <!DOCTYPE HTML>
|
---|
| 7 | <html>
|
---|
| 8 | <head>
|
---|
| 9 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
---|
| 10 |
|
---|
[27943] | 11 | <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Pacifico">
|
---|
| 12 |
|
---|
[27679] | 13 | <link rel="stylesheet" href="css/core-style.css" type="text/css" media="screen" />
|
---|
| 14 |
|
---|
| 15 |
|
---|
| 16 | <title>SALAMI SPARQL Endpoint</title>
|
---|
[27693] | 17 |
|
---|
| 18 | <script src="js/jquery-1.10.1.js" > </script>
|
---|
| 19 |
|
---|
| 20 | <script>
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | function onSubmit() {
|
---|
| 24 |
|
---|
| 25 | $.ajax({
|
---|
[27745] | 26 | type: "GET",
|
---|
| 27 |
|
---|
[27693] | 28 | beforeSend: function (request) {
|
---|
| 29 | //request.setRequestHeader("Authority", authorizationToken);
|
---|
[27745] | 30 | //request.setRequestHeader("origin", "http://nema.lis.illinois.edu");
|
---|
| 31 | },
|
---|
| 32 |
|
---|
| 33 | url: "<?php echo $repo->getSparqlEndpoint();?>",
|
---|
| 34 | data: { "query": $('#rdf-query').val(), "output": $('#rdf-output').val() },
|
---|
| 35 | //processData: false,
|
---|
| 36 |
|
---|
| 37 | /*
|
---|
| 38 | xhrFields: {
|
---|
| 39 | withCredentials: true
|
---|
[27693] | 40 | },
|
---|
[27745] | 41 | crossDomain: true,
|
---|
| 42 | */
|
---|
[27693] | 43 |
|
---|
[27745] | 44 | // accepts: "text/plain",
|
---|
| 45 | //converters: {},
|
---|
| 46 | dataType: "text",
|
---|
| 47 |
|
---|
[27693] | 48 | success: function(msg) {
|
---|
[27745] | 49 | //var $msg = $(msg);
|
---|
| 50 | //alert("msg = " +msg);
|
---|
| 51 |
|
---|
| 52 | //$('#rdf-results').val(msg.documentElement.outerHTML);
|
---|
| 53 | $('#rdf-results').val(msg);
|
---|
| 54 | },
|
---|
| 55 |
|
---|
| 56 |
|
---|
| 57 | error: function(err) {
|
---|
| 58 | alert(err.toString());
|
---|
| 59 | if (err.status == 200) {
|
---|
| 60 | ParseResult(err);
|
---|
| 61 | }
|
---|
| 62 | else { alert('Error:' + err.responseText + ' Status: ' + err.status); }
|
---|
| 63 | }
|
---|
| 64 |
|
---|
[27693] | 65 | });
|
---|
| 66 |
|
---|
| 67 | return false;
|
---|
| 68 |
|
---|
| 69 | }
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | </script>
|
---|
| 73 |
|
---|
[27679] | 74 | </head>
|
---|
| 75 |
|
---|
| 76 | <body>
|
---|
| 77 | <div id="container">
|
---|
| 78 |
|
---|
| 79 | <div id="header">
|
---|
[27943] | 80 | <!--
|
---|
[27679] | 81 | <h1>The SALAMI SPARQL Endpoint</h1>
|
---|
[27943] | 82 | -->
|
---|
| 83 | <h1>The Salami SPARQL Endpoint</h1>
|
---|
[27679] | 84 | </div>
|
---|
| 85 |
|
---|
| 86 | <div id="navigation">
|
---|
| 87 | <ul>
|
---|
[27693] | 88 | <li><a href="index.php">Home</a></li>
|
---|
| 89 | <li class="selected"><a href="#">SPARQL</a></li>
|
---|
[27679] | 90 | <li><a href="contact.php">Contact</a></li>
|
---|
| 91 | </ul>
|
---|
| 92 | </div>
|
---|
| 93 |
|
---|
| 94 | <div id="content-container">
|
---|
| 95 |
|
---|
| 96 | <div id="content">
|
---|
| 97 |
|
---|
[27693] | 98 | <p>
|
---|
| 99 | RDF Query:
|
---|
| 100 | </p>
|
---|
[27679] | 101 |
|
---|
[27693] | 102 | <!--
|
---|
| 103 | action="<?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?>" method="post"
|
---|
| 104 | -->
|
---|
[27679] | 105 |
|
---|
[27693] | 106 | <form onsubmit="return onSubmit()">
|
---|
| 107 |
|
---|
| 108 | <textarea name="query" id="rdf-query"
|
---|
| 109 | style="width: 97%; margin-left: 10px; margin-right: 20px;" rows="8">
|
---|
| 110 | PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
---|
| 111 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
---|
| 112 |
|
---|
[27679] | 113 | SELECT * WHERE {
|
---|
| 114 | ?s ?p ?o
|
---|
| 115 | } LIMIT 10
|
---|
[27693] | 116 | </textarea>
|
---|
| 117 | <br/>
|
---|
[27679] | 118 |
|
---|
[27693] | 119 | <span style="margin: 5px 20px 5px 20px;">
|
---|
| 120 | Output type:
|
---|
[27745] | 121 | <select name="output" id="rdf-output">
|
---|
[27693] | 122 | <option>xml</option>
|
---|
| 123 | <option>json</option>
|
---|
| 124 | <option>text</option>
|
---|
| 125 | </select>
|
---|
| 126 | </span>
|
---|
[27679] | 127 |
|
---|
[27693] | 128 | <span style="margin: 5px 20px 5px 20px;">
|
---|
| 129 | Maximum results returned:
|
---|
| 130 | <select name="soft-limit">
|
---|
| 131 | <option>10</option>
|
---|
| 132 | <option>100</option>
|
---|
| 133 | <option>1000</option>
|
---|
| 134 | </select>
|
---|
| 135 | </span>
|
---|
[27679] | 136 |
|
---|
[27693] | 137 | <span style="margin: 5px 40px 5px 40px;">
|
---|
| 138 | <input type="submit" value="Execute">
|
---|
| 139 | </span>
|
---|
[27679] | 140 |
|
---|
[27693] | 141 | <span style="margin: 5px 40px 5px 40px;">
|
---|
| 142 | <input type="reset">
|
---|
| 143 | </span>
|
---|
| 144 |
|
---|
| 145 |
|
---|
[27679] | 146 | </form>
|
---|
| 147 |
|
---|
| 148 |
|
---|
[27693] | 149 | <p>
|
---|
| 150 | RDF Results:
|
---|
| 151 | </p>
|
---|
| 152 | <textarea id="rdf-results"
|
---|
[27943] | 153 | style="width: 97%; margin-left: 10px; margin-right: 20px;" rows="16">
|
---|
[27693] | 154 | </textarea>
|
---|
| 155 |
|
---|
| 156 | <p>
|
---|
| 157 | The <code>Accept</code> header you send is taken into account.
|
---|
| 158 | Various types of RDF are available, plus an HTML representation and
|
---|
| 159 | potentially the audio data (use <code>audio/*</code> to accept any
|
---|
| 160 | format of audio).
|
---|
| 161 | </p>
|
---|
| 162 |
|
---|
| 163 |
|
---|
| 164 | <p>
|
---|
| 165 | The machine-interfacable Sparql endpoint, which operates without
|
---|
| 166 | a limit on the number of tripples returned, is available at
|
---|
| 167 | <code><?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?></code>.
|
---|
| 168 | </p>
|
---|
| 169 |
|
---|
| 170 |
|
---|
| 171 | </div>
|
---|
| 172 |
|
---|
| 173 |
|
---|
| 174 | <div id="footer" style="border-top: 8px groove #7ECDF3;">
|
---|
| 175 | <table cellpadding="0px" cellspacing="0px" width="100%">
|
---|
| 176 | <tbody>
|
---|
| 177 | <tr style="background: white;">
|
---|
| 178 | <td align="center">
|
---|
| 179 | <a href="http://www.sshrc-crsh.gc.ca/Default.aspx">
|
---|
| 180 | <img width="400px" src="images/sshrc_logo.jpeg">
|
---|
| 181 | </a>
|
---|
| 182 | </td>
|
---|
| 183 | <td align="center">
|
---|
| 184 | <a href="http://www.nsf.gov/index.jsp">
|
---|
| 185 | <img width="100px" src="images/nsf_logo.jpeg">
|
---|
| 186 | </a>
|
---|
| 187 | </td>
|
---|
| 188 | <td align="center">
|
---|
| 189 | <a href="http://www.jisc.ac.uk/">
|
---|
| 190 | <img height="100px" src="images//jisc_logo.jpeg">
|
---|
| 191 | </a>
|
---|
| 192 | </td>
|
---|
| 193 | </tr>
|
---|
| 194 | </tbody>
|
---|
| 195 | </table>
|
---|
| 196 |
|
---|
| 197 | </div>
|
---|
| 198 |
|
---|
| 199 | </div>
|
---|
[27679] | 200 | </body>
|
---|
| 201 | </html>
|
---|