diff --git a/classes/BasicSpecialFunction.php b/classes/BasicSpecialFunction.php index eed8fbee11fedf58d5cd78ee65f04199af573731..703669ba99171acbf838bcffac044a2e704d1573 100644 --- a/classes/BasicSpecialFunction.php +++ b/classes/BasicSpecialFunction.php @@ -41,7 +41,7 @@ class SpecialFunction extends AbstractSpecialFunction{ $viewFile = $conf['special']['uri'].".".$f.$conf['view']['extension'].".".$extension; $modelFile = $conf['special']['uri'].".".$f.$conf['model']['extension'].".".$extension; if(!(is_dir($conf['model']['directory'].$modelFile) || is_file($conf['model']['directory'].$modelFile)) || !is_file($conf['view']['directory'].$viewFile)){ - throw new Exception('Method does not exist!'); + throw new Exception('<h1>Method does not exist!</h1><br/>This means that <tt>'.$conf['model']['directory'].$modelFile.'</tt> or <tt>'.$conf['view']['directory'].$viewFile."</tt> (or both) don't exist.<br/>Please refer to this tutorial to create one.<br/>"); } $endpoints = $context['endpoints']; array_pop($params); diff --git a/models/special.index.model.html b/models/special.classes.model.html similarity index 100% rename from models/special.index.model.html rename to models/special.classes.model.html diff --git a/models/special.namedGraphs.model.html b/models/special.namedGraphs.model.html new file mode 100644 index 0000000000000000000000000000000000000000..b73ae66e3f2a16aed3d8342b2b913e4984f7885a --- /dev/null +++ b/models/special.namedGraphs.model.html @@ -0,0 +1,5 @@ +SELECT DISTINCT ?g WHERE { + GRAPH ?g{ + ?s ?p ?o . + } +} diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000000000000000000000000000000000000..7a29d7e7569c5b9b554bbd8ef752c5c68cf4b90f --- /dev/null +++ b/static/index.html @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" + "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml" xmlns:local="http://localhost/lodspeakr/" + version="XHTML+RDFa 1.0" xml:lang="en"> + <head> + <title>Main</title> + <link href="http://localhost/lodspeakr//lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + </head> + <body> + <h1>Services available</h1> + <ul> + <li><a href='special/classes'>List of classes in the triple store</a></li> + <li><a href='special/namedGraphs'>Named graphs in the triple store</a></li> + </ul> + </body> +</html> + + diff --git a/views/special.index.view.html b/views/special.classes.view.html similarity index 100% rename from views/special.index.view.html rename to views/special.classes.view.html diff --git a/views/special.namedGraphs.view.html b/views/special.namedGraphs.view.html new file mode 100644 index 0000000000000000000000000000000000000000..73d66269ed6f7d664442e6ff30567316f0bae83e --- /dev/null +++ b/views/special.namedGraphs.view.html @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" + "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml" {% for i, ns in base.ns %}xmlns:{{i}}="{{ns}}" + {%endfor%}version="XHTML+RDFa 1.0" xml:lang="en"> + <head> + <title>Graphs available in the triple store</title> + <link href="{{base.baseUrl}}/lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + </head> + <body> + <h1>Graphs available in the triple store</h1> + <ul> + {% for row in r %} + <li><a href='{{base.baseUrl}}special/index/{{ row.g.curie|urlencode }}'>{{row.g.curie}}</a></li> + {% endfor %} + </ul> + </body> +</html> +