Skip to content
Snippets Groups Projects
Commit 23746587 authored by alangrafu's avatar alangrafu Committed by GIT_AUTHOR_NAME
Browse files

Merge branch 'development'

parents 254d1083 be82596c
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ class SpecialFunction extends AbstractSpecialFunction{ ...@@ -41,7 +41,7 @@ class SpecialFunction extends AbstractSpecialFunction{
$viewFile = $conf['special']['uri'].".".$f.$conf['view']['extension'].".".$extension; $viewFile = $conf['special']['uri'].".".$f.$conf['view']['extension'].".".$extension;
$modelFile = $conf['special']['uri'].".".$f.$conf['model']['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)){ 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']; $endpoints = $context['endpoints'];
array_pop($params); array_pop($params);
...@@ -66,6 +66,8 @@ class SpecialFunction extends AbstractSpecialFunction{ ...@@ -66,6 +66,8 @@ class SpecialFunction extends AbstractSpecialFunction{
$data['params'] = $params; $data['params'] = $params;
$base = $conf['view']['standard']; $base = $conf['view']['standard'];
$base['type'] = $modelFile; $base['type'] = $modelFile;
$base['root'] = $conf['root'];
$base['home'] = $conf['basedir'];
$base['this']['value'] = $uri; $base['this']['value'] = $uri;
$base['this']['curie'] = Utils::uri2curie($uri); $base['this']['curie'] = Utils::uri2curie($uri);
$base['this']['contentType'] = $acceptContentType; $base['this']['contentType'] = $acceptContentType;
......
...@@ -36,7 +36,7 @@ $conf['special']['uri'] = 'special'; ...@@ -36,7 +36,7 @@ $conf['special']['uri'] = 'special';
$conf['special']['class'] = 'classes/BasicSpecialFunction.php'; $conf['special']['class'] = 'classes/BasicSpecialFunction.php';
//Frontpage when user goes to http://example.org/ //Frontpage when user goes to http://example.org/
$conf['root'] = 'special/index'; $conf['root'] = 'index.html';
$conf['extension_connector'] = '.'; $conf['extension_connector'] = '.';
//Priority for rdfs:Resource (default). Priorities should be >=0 //Priority for rdfs:Resource (default). Priorities should be >=0
......
{%for h in base.header %}
PREFIX {{h.prefix}}: <{{h.ns}}>
{%endfor%}
SELECT DISTINCT ?resource WHERE {
{%if base.args.arg0 %}GRAPH <{{base.args.arg0}}>{ {%endif%}
[] a ?resource .
{%if base.args.arg0 %} } {%endif%}
}
SELECT DISTINCT ?resource WHERE {
[] a ?resource .
}
SELECT DISTINCT ?g WHERE {
GRAPH ?g{
?s ?p ?o .
}
}
<?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>
<div style='float:center'>
<a href='{{base.home}}'>Home</a> | <a href='{{base.home}}/special/classes'>Classes</a> | <a href='{{base.home}}/special/namedGraphs'>Named Graphs</a>
</div>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</head> </head>
<body> <body>
<h1>Classes available</h1> <h1>Classes available</h1>
{%include "header.inc"%}
<ul> <ul>
{% if r.resource.value != null %} {% if r.resource.value != null %}
<!-- Only one class available --> <!-- Only one class available -->
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</head> </head>
<body> <body>
<h1>Instances of {{base.args.arg0}}</h1> <h1>Instances of {{base.args.arg0}}</h1>
{%include "header.inc"%}
<ul> <ul>
{% for row in r %} {% for row in r %}
<li><a href='{{ row.resource.value }}'>{{row.resource.curie}}</a></li> <li><a href='{{ row.resource.value }}'>{{row.resource.curie}}</a></li>
......
<?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>
{%include "header.inc"%}
<ul>
{% for row in r %}
<li>{{row.g.curie}}</li>
{% endfor %}
</ul>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment