Skip to content

Instantly share code, notes, and snippets.

@csarven
Created February 24, 2014 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csarven/9187374 to your computer and use it in GitHub Desktop.
Save csarven/9187374 to your computer and use it in GitHub Desktop.
sparql.stats.270a.info.html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>SPARQLer</title>
<link rel="stylesheet" type="text/css" href="/fuseki.css" />
<script type="text/javascript">
function encode() {
var obj = document.getElementById('sparql_query_textarea');
var unencoded = obj.value;
obj.value = encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22");
}
function decode() {
var obj = document.getElementById('sparql_query_textarea');
var encoded = obj.value;
obj.value = decodeURIComponent(encoded.replace(/\+/g, " "));
}
</script>
</head>
<body>
<h1>SPARQLer - General purpose processor</h1>
<div class="moreindent">
<form action="sparql" method="get">
<p>General SPARQL query : input query, set any options and press "Get Results"</p>
<p>
<textarea id="sparql_query_textarea" style="background-color: #F0F0F0;" name="query" cols="100" rows="40">
PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;
PREFIX dcterms: &lt;http://purl.org/dc/terms/&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX skos: &lt;http://www.w3.org/2004/02/skos/core#&gt;
PREFIX wgs: &lt;http://www.w3.org/2003/01/geo/wgs84_pos#&gt;
PREFIX dbo: &lt;http://dbpedia.org/ontology/&gt;
PREFIX dbp: &lt;http://dbpedia.org/property/&gt;
PREFIX dbr: &lt;http://dbpedia.org/resource/&gt;
PREFIX sdmx: &lt;http://purl.org/linked-data/sdmx#&gt;
PREFIX sdmx-concept: &lt;http://purl.org/linked-data/sdmx/2009/concept#&gt;
PREFIX sdmx-attribute: &lt;http://purl.org/linked-data/sdmx/2009/attribute#&gt;
PREFIX sdmx-dimension: &lt;http://purl.org/linked-data/sdmx/2009/dimension#&gt;
PREFIX sdmx-measure: &lt;http://purl.org/linked-data/sdmx/2009/measure#&gt;
PREFIX qb: &lt;http://purl.org/linked-data/cube#&gt;
PREFIX prov: &lt;http://www.w3.org/ns/prov#&gt;
PREFIX year: &lt;http://reference.data.gov.uk/id/year/&gt;
PREFIX void: &lt;http://rdfs.org/ns/void#&gt;
PREFIX stats: &lt;http://stats.270a.info/vocab#&gt;
PREFIX provenance: &lt;http://stats.270a.info/provenance/&gt;
#USE THESE GRAPHS :)
PREFIX g-analysis: &lt;http://stats.270a.info/graph/analysis&gt;
SELECT *
WHERE {
}
</textarea>
<div>
<input type="button" onclick="decode()" value="Decode">
<input type="button" onclick="encode()" value="Encode">
</div>
<br/>
Target graph URI (or use <code>FROM</code> in the query)
<input name="default-graph-uri" size="25" value="" />
<br/>
Output: <select name="output">
<option value="json">JSON</option>
<option value="xml" selected="selected">XML</option>
<option value="text">Text</option>
<option value="csv">CSV</option>
<option value="tsv">TSV</option>
</select>
<br/>
XSLT style sheet (blank for none):
<input name="stylesheet" size="20" value="/xml-to-html.xsl" />
<br/>
<input type="checkbox" name="force-accept" value="text/plain"/>
Force the accept header to <tt>text/plain</tt> regardless
<br/>
<input type="submit" value="Get Results" />
</p>
</form>
</div>
<hr/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment