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" href="css/core-style.css" type="text/css" media="screen" />
|
---|
12 |
|
---|
13 |
|
---|
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 |
|
---|
46 | </head>
|
---|
47 |
|
---|
48 | <body>
|
---|
49 | <div id="container">
|
---|
50 |
|
---|
51 | <div id="header">
|
---|
52 | <h1>The SALAMI SPARQL Endpoint</h1>
|
---|
53 | </div>
|
---|
54 |
|
---|
55 | <div id="navigation">
|
---|
56 | <ul>
|
---|
57 | <li><a href="index.php">Home</a></li>
|
---|
58 | <li class="selected"><a href="#">SPARQL</a></li>
|
---|
59 | <li><a href="contact.php">Contact</a></li>
|
---|
60 | </ul>
|
---|
61 | </div>
|
---|
62 |
|
---|
63 | <div id="content-container">
|
---|
64 |
|
---|
65 | <div id="content">
|
---|
66 |
|
---|
67 | <p>
|
---|
68 | RDF Query:
|
---|
69 | </p>
|
---|
70 |
|
---|
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#>
|
---|
81 |
|
---|
82 | SELECT * WHERE {
|
---|
83 | ?s ?p ?o
|
---|
84 | } LIMIT 10
|
---|
85 | </textarea>
|
---|
86 | <br/>
|
---|
87 |
|
---|
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>
|
---|
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>
|
---|
105 |
|
---|
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 |
|
---|
114 |
|
---|
115 | </form>
|
---|
116 |
|
---|
117 |
|
---|
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>
|
---|
169 | </body>
|
---|
170 | </html>
|
---|