Skip to content
Snippets Groups Projects
Commit ff185456 authored by alvaro's avatar alvaro
Browse files

Adding variable.literal == 1 when value is a literal

Also, now variable.value == variable.curie if it is a literal
parent d21f9994
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,10 @@ class Utils{ ...@@ -87,7 +87,10 @@ class Utils{
$row[$k]['uri'] = 1; $row[$k]['uri'] = 1;
}elseif($v['type'] == 'bnode'){ }elseif($v['type'] == 'bnode'){
$row[$k]['curie'] = 'blankNode'; $row[$k]['curie'] = 'blankNode';
$row[$k]['blank'] = 1;
}else{ }else{
$row[$k]['literal'] = 1;
$row[$k]['curie'] = $v['value'];
if($v['datatype']){ if($v['datatype']){
$row[$k]['type'] = $v['datatype']; $row[$k]['type'] = $v['datatype'];
} }
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<div class="container"> <div class="container">
<h1>Default view</h1> <h1>Default view</h1>
<table class="table table-striped"> <table class="table table-striped" about="{{uri}}">
<thead> <thead>
<tr><th>Subject</th><th>Predicate</th><th>Object</th></tr> <tr><th>Subject</th><th>Predicate</th><th>Object</th></tr>
</thead> </thead>
...@@ -82,9 +82,11 @@ ...@@ -82,9 +82,11 @@
<td> <td>
{%if row.o.uri == 1%} {%if row.o.uri == 1%}
<a rev='[{{row.p.curie}}]' href='{{row.o.value}}'>{{row.o.curie}}</a> <a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
{%elif row.o.blank == 1%}
<a rel='{{row.p.value}}' href='{{row.o.value}}'>{{row.o.curie}}</a>
{%else%} {%else%}
{{row.o.value}} <span property='{{row.p.value}}'>{{row.o.value}}</span>
{%endif%} {%endif%}
</td> </td>
...@@ -95,7 +97,7 @@ ...@@ -95,7 +97,7 @@
<tr> <tr>
<td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td> <td><a href='{{row.s.value}}'>{{row.s.curie}}</a></td>
<td><a rel='{{row.s.curie}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td> <td><a rev='{{row.s.value}}' href='{{row.p.value}}'>{{row.p.curie}}</a></td>
<td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td> <td>{%if forloop.first%}<a href='{{lodspk.this.value}}'>{{lodspk.this.curie}}</a>{%endif%}</td>
</tr> </tr>
{% endfor %} {% endfor %}
......
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