<?php
include_once("includes/base.inc");

$page = new Page("/");
$page->event = "query";
$page->name = "Data Query";
$page->title = "Data Query";
$page->body = "<h2>SPARQL Query Interface</h2>";
$page->body .= "<p>Use this form to submit queries to our triple store using the <a href=\"http://www.w3.org/TR/rdf-sparql-query/\" rel=\"nofollow\">SPARQL Query Language</a>.</p>";
$page->body .= "<p>The endpoint has the URI <b class=\"uri\">http://semanticdiet.com/sparql</b></p>";
$page->body .= "<form method=\"GET\" action=\"sparql\">";
$page->body .= "<textarea rows=\"15\" cols=\"80\" name=\"query\">PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?s ?label WHERE { ?s a owl:Class . ?s rdfs:label ?label }
ORDER BY ?label
</textarea><br/>";
$page->body .= "<input type=\"submit\"/>";
$page->body .= "</form>";

$currentTheme->render($page);
?>