Skip to content
Snippets Groups Projects
Commit 7b95edc0 authored by Alvaro Graves's avatar Alvaro Graves
Browse files

Fixing "first" values for services

Removing no html queries from models/type.rdfs:Resource/
parent 8776f659
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ public function execute($service){ ...@@ -35,6 +35,7 @@ public function execute($service){
global $acceptContentType; global $acceptContentType;
global $endpoints; global $endpoints;
global $lodspk; global $lodspk;
global $first;
$context = array(); $context = array();
$context['contentType'] = $acceptContentType; $context['contentType'] = $acceptContentType;
$context['endpoints'] = $endpoints; $context['endpoints'] = $endpoints;
...@@ -93,12 +94,13 @@ public function execute($service){ ...@@ -93,12 +94,13 @@ public function execute($service){
$lodspk['transform_select_query'] = true; $lodspk['transform_select_query'] = true;
} }
chdir($conf['model']['directory']); chdir($conf['home'].$conf['model']['directory']);
$first = array();
Utils::queryFile($modelFile, $endpoints['local'], $results, $first); Utils::queryFile($modelFile, $endpoints['local'], $results, $first);
chdir($conf['home']);
$results = Utils::internalize($results); $results = Utils::internalize($results);
$lodspk['first'] = Utils::getFirsts($results);
chdir($conf['home']);
if(is_array($results)){ if(is_array($results)){
$results = Convert::array_to_object($results); $results = Convert::array_to_object($results);
} }
......
DESCRIBE ?resource WHERE {
[] a ?resource .
}
DESCRIBE ?resource WHERE {
[] a ?resource .
}
DESCRIBE ?resource WHERE {
[] a ?resource .
}
DESCRIBE ?resource WHERE {
[] a ?resource .
}
{{models.main|safe}}
{{models.main|safe}}
{{models.main|safe}}
{{models.main|safe}}
<?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>Page about {{lodspk.this.value}}</title>
<link href="{{lodspk.baseUrl}}css/basic.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="alternate" type="application/rdf+xml" title="RDF/XML Version" href="{{lodspk.this.value}}.rdf" />
<link rel="alternate" type="text/turtle" title="Turtle Version" href="{{lodspk.this.value}}.ttl" />
<link rel="alternate" type="text/plain" title="N-Triples Version" href="{{lodspk.this.value}}.nt" />
<link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.this.value}}.json" />
</head>
<body about="{{lodspk.this.value}}">
<h1>Page about <a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a></h1>
<div>
<h2>Information from {{lodspk.this.curie}}</h2>
<table>
{% for row in models.main %}
{% if row.s1%}
<tr>
<td><a href='{{row.s1.value}}'>{{row.s1.curie}}</a></td>
{% if row.p1.uri == 1 %}
<td><a rel='{{row.s1.curie}}' href='{{row.p1.value}}'>{{row.p1.curie}}</a></td>
{% else %}
<td><span property='{{row.s1.curie}}'>{{row.p1.value}}</span></td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
</table>
<br/><br/>
<h2>Information pointing to {{lodspk.this.curie}}</h2>
<table>
{% for row in models.main %}
{% if row.s2%}
<tr>
<td><a href='{{row.s2.value}}'>{{row.s2.curie}}</a></td>
<td><a rev='[{{row.p2.curie}}]' href='{{row.s2.value}}'>{{row.p2.curie}}</a></td>
</tr>
{%endif %}
{% endfor %}
</table>
</div>
</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