-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo-vertical.html
207 lines (188 loc) · 7.84 KB
/
demo-vertical.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<!-- Copyright (c) 2012-2013 Epimorphics Ltd. Released under Apache License 2.0 http://www.apache.org/licenses/ -->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>SPARQL console</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="lib/css/bootstrap.css" rel="stylesheet" />
<link href="lib/css/font-awesome.css" rel="stylesheet" />
<link href="lib/css/codemirror.css" rel="stylesheet" />
<link href="lib/css/jquery.dataTables.css" rel="stylesheet" />
<link href="css/qonsole.css" rel="stylesheet" />
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<script src="lib/js/respond.min.js"></script>
<![endif]-->
<link rel="shortcut icon" href="img/favicon.ico">
<script src="lib/js/require.js"></script>
<!-- This link provides CORS support in IE8+ -->
<!--[if lt IE 10]>
<script src="lib/js/jquery.xdomainrequest.min.js"></script>
<![endif]-->
<script type="text/javascript">
// configuration
var qonfig = {
endpoints: {
"default": "http://environment.data.gov.uk/sparql/bwq/query",
},
prefixes: {
"bw": "http://environment.data.gov.uk/def/bathing-water/",
"bwq": "http://environment.data.gov.uk/def/bathing-water-quality/",
"ef-sp": "http://location.data.gov.uk/def/ef/SamplingPoint/",
"interval": "http://reference.data.gov.uk/def/intervals/",
"stats": "http://statistics.data.gov.uk/def/administrative-geography/",
"sr": "http://data.ordnancesurvey.co.uk/ontology/spatialrelations/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
queries: [
{ "name": "Properties of a named bathing water",
"query": "select ?predicate ?object\nwhere {\n" +
" ?bw rdfs:label \"Spittal\"@en ;\n" +
" ?predicate ?object\n}"
},
{ "name": "all OWL classes",
"query": "select ?class ?label ?description\nwhere {\n" +
" ?class a owl:Class.\n" +
" optional { ?class rdfs:label ?label}\n" +
" optional { ?class rdfs:comment ?description}\n}"
},
{
'name': 'Example with embedded comments',
'query': '# comment 1\n@prefix foo: <http://fubar.com/foo>.\n@prefix bar: <http://fubar.com/bar>.\n#comment 2\nselect * {}'
}
],
allowQueriesFromURL: true
};
require( ["js/config"], function() {
require( ["jquery", "js/app/qonsole", "bootstrap"], function( $, qonsole ) {
$( function() {qonsole.init( qonfig );} );
} );
} );
</script>
</head>
<body class="">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="row">
<div class="navbar-header col-md-12">
<h1 class="brand">Qonsole</h1>
<h2 class="brand">a query console for SPARQL</h2>
</div>
</div>
</div>
</nav>
<div class="container qonsole">
<div class="col-md-12 well">
<h2 class="">Example queries</h2>
<span class="form-inline">
<select class="form-control" id="examples"></select>
</span>
</div>
<div class="col-md-12 well vertical">
<h2 class="">Prefixes</h2>
<ul class="list-inline prefixes">
<li class="keep">
<a data-toggle="modal" href="#prefixEditor" class="btn" title="Add a SPARQL prefix">
<i class="fa fa-plus-circle"></i>
</a>
</li>
</ul>
</div>
<div class="col-md-12 well">
<div class="query-edit">
<div id="query-edit-cm" class=""></div>
</div>
<div class="query-chrome">
<form class="form-inline" role="form">
<div class="form-group">
<label for="endpoints">SPARQL endpoint:</label>
<select class="form-control" id="endpoints">
</select>
</div>
<div class="form-group">
<input type="hidden" class="form-control" id="sparqlEndpoint" />
</div>
<div class="form-group">
<label for="format">Results format:</label>
<select class="form-control" name="format">
<option value="tsv">table</option>
<option value="text">plain text</option>
<option value="json">JSON</option>
<option value="xml">XML</option>
</select>
</div>
<div class="form-group">
<a href="#" class="btn btn-success run-query form-control">perform query</a>
</div>
</form>
</div>
</div>
<!-- results -->
<div id="results-block" class="row sparql sparql-results">
<div class="col-md-12">
<div class="well">
<div class="row">
<div class="col-md-12">
<span class="timeTaken hidden"></span>
</div>
</div>
<div class="row">
<div class="col-md-12" id="results">
<h2 class="col-md-12">Query results</h2>
</div>
</div>
</div>
</div>
</div>
<div class="row clearfix"></div>
<footer>
<p class="text-center">© <a href="http://www.epimorphics.com">Epimorphics Ltd</a> 2012–2013.
Freely re-usable under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Open Source license</a>.</p>
</footer>
</div><!-- .container-->
<!-- modal dialogue -->
<div class="modal fade" id="prefixEditor" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Add a SPARQL prefix</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="inputPrefix" class="col-lg-2 control-label">Prefix</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="inputPrefix" placeholder="Prefix" autofocus>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-sm btn-primary" id="lookupPrefix">Lookup <span></span> on prefix.cc</button>
</div>
</div>
<div class="form-group">
<label for="inputURI" class="col-lg-2 control-label">URI</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="inputURI" placeholder="URI">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">cancel</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" id="addPrefix">add prefix</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</body>
</html>