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 |
|
---|
11 | <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Pacifico">
|
---|
12 |
|
---|
13 | <link rel="stylesheet" href="css/core-style.css" type="text/css" media="screen" />
|
---|
14 |
|
---|
15 |
|
---|
16 | <title>SALAMI SPARQL Endpoint</title>
|
---|
17 |
|
---|
18 | <script src="js/jquery-1.10.1.js" > </script>
|
---|
19 |
|
---|
20 | <script>
|
---|
21 |
|
---|
22 |
|
---|
23 | function onSubmit() {
|
---|
24 |
|
---|
25 | $.ajax({
|
---|
26 | type: "GET",
|
---|
27 |
|
---|
28 | beforeSend: function (request) {
|
---|
29 | //request.setRequestHeader("Authority", authorizationToken);
|
---|
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
|
---|
40 | },
|
---|
41 | crossDomain: true,
|
---|
42 | */
|
---|
43 |
|
---|
44 | // accepts: "text/plain",
|
---|
45 | //converters: {},
|
---|
46 | dataType: "text",
|
---|
47 |
|
---|
48 | success: function(msg) {
|
---|
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 |
|
---|
65 | });
|
---|
66 |
|
---|
67 | return false;
|
---|
68 |
|
---|
69 | }
|
---|
70 |
|
---|
71 |
|
---|
72 | </script>
|
---|
73 |
|
---|
74 | </head>
|
---|
75 |
|
---|
76 | <body>
|
---|
77 | <div id="container">
|
---|
78 |
|
---|
79 | <div id="header">
|
---|
80 | <!--
|
---|
81 | <h1>The SALAMI SPARQL Endpoint</h1>
|
---|
82 | -->
|
---|
83 | <h1>The Salami SPARQL Endpoint</h1>
|
---|
84 | </div>
|
---|
85 |
|
---|
86 | <div id="navigation">
|
---|
87 | <ul>
|
---|
88 | <li><a href="index.php">Home</a></li>
|
---|
89 | <li class="selected"><a href="#">SPARQL</a></li>
|
---|
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 |
|
---|
98 | <p>
|
---|
99 | RDF Query:
|
---|
100 | </p>
|
---|
101 |
|
---|
102 | <!--
|
---|
103 | action="<?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?>" method="post"
|
---|
104 | -->
|
---|
105 |
|
---|
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 |
|
---|
113 | SELECT * WHERE {
|
---|
114 | ?s ?p ?o
|
---|
115 | } LIMIT 10
|
---|
116 | </textarea>
|
---|
117 | <br/>
|
---|
118 |
|
---|
119 | <span style="margin: 5px 20px 5px 20px;">
|
---|
120 | Output type:
|
---|
121 | <select name="output" id="rdf-output">
|
---|
122 | <option>xml</option>
|
---|
123 | <option>json</option>
|
---|
124 | <option>text</option>
|
---|
125 | </select>
|
---|
126 | </span>
|
---|
127 |
|
---|
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>
|
---|
136 |
|
---|
137 | <span style="margin: 5px 40px 5px 40px;">
|
---|
138 | <input type="submit" value="Execute">
|
---|
139 | </span>
|
---|
140 |
|
---|
141 | <span style="margin: 5px 40px 5px 40px;">
|
---|
142 | <input type="reset">
|
---|
143 | </span>
|
---|
144 |
|
---|
145 |
|
---|
146 | </form>
|
---|
147 |
|
---|
148 |
|
---|
149 | <p>
|
---|
150 | RDF Results:
|
---|
151 | </p>
|
---|
152 | <textarea id="rdf-results"
|
---|
153 | style="width: 97%; margin-left: 10px; margin-right: 20px;" rows="16">
|
---|
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>
|
---|
200 | </body>
|
---|
201 | </html>
|
---|