Open timrdf opened 12 years ago
query such as the following should work soon.
[]
a prov:Activity;
prov:wasAttributedTo
<http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/via-sparql-query>;
prov:used
?input;
prov:generated [
?p [ a datafaqs:Epoch ]
];
.
special.service-history's
deployed at aquarius demonstrates the query that will return the inputs that have previously been given to a FAqTSelector service.
(reassigning issue to Alvaro so he can debug the lodspeakr part of this -- or its documentation)
https://github.com/timrdf/DataFAQs-lodspeakr/blob/master/models/special.configure-epoch.model.html/biordf/local/inputHistory is not filling the value (see debug print from [1] below)
prefix prov: <http://www.w3.org/ns/prov-o/>
prefix select: <http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/>
select distinct ?input
where {
[]
prov:wasAttributedTo <>;
prov:used ?input;
.
}
The view [2] is trying to access the result as:
<select>
{%for i in r.biordf.DatasetCollection%}
<option value='{{i.service.value}}'>{{i.service.value}}</option>
{%endfor%}
</select>
[1] http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/special/configure-epoch [2] https://github.com/timrdf/DataFAQs-lodspeakr/blob/master/views/special.configure-epoch.view.html
The page http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/special/configure-epoch demonstrates that the previous ("upstream"?) query is returning results:
models/special.configure-epoch.model.html/biordf/FAqTServiceCollection is returning values in
views/special.configure-epoch.view.html , which is accessing them as:
{%for i in r.biordf.FAqTServiceCollection%}
<tr>
<td property=''><a rel='' href='{{i.service.value}}'>{{i.service.value}}</a></td>
<td property=''><a rel='' href='{{i.input.value}}'>{{i.input.value}}</a></td>
</tr>
{%endfor%}
produces the table:
http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/via-sparql-query http://purl.org/twc/vocab/datafaqs#QueryToApply
http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/identity http://purl.org/twc/vocab/datafaqs#FAqTService
See the source code for the statement:
"This gets the first service in r.biordf.FAqTServiceCollection, but the identical code in the nested query results in an empty expansion prov:wasAttributedTo <>. "
at http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/special/configure-epoch
Can I have write permissions on your installation?
There was a bug while handling special pages. I pushed changes in lodspeakr/master so you can merge from there. If it works fine, close the ticket
prefix prov: <http://www.w3.org/ns/prov-o/>
prefix select: <http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/>
select distinct ?input
where {
[]
prov:wasAttributedTo <{%for row in r.biordf.FAqTServiceCollection%}{%if forloop.first%}{{row.service.value}}{%endif%}{%endfor%}>;
prov:wasAttributedTo <{{first.biordf.FAqTServiceCollection.service.value}}>;
prov:used ?input;
.
}
expands to the folowing, which is missing the "first" abbreviation.
prefix prov: <http://www.w3.org/ns/prov-o/>
prefix select: <http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/>
select distinct ?input
where {
[]
prov:wasAttributedTo <http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/via-sparql-query>;
prov:wasAttributedTo <>;
prov:used ?input;
.
}
I can get by with the long for loop version.
On page http://aquarius.tw.rpi.edu/datafaqs/DataFAQs-lodspeakr/special/configure-epoch, "previous" history 1, 2, 3, 4, 5 needs to be fleshed in.
Implementation for page is at https://github.com/timrdf/DataFAQs-lodspeakr/blob/master/models/special.service-history.model.html
Example
given faqt service http://sparql.tw.rpi.edu/services/datafaqs/core/select-faqts/via-sparql-query
find out that
https://raw.github.com/timrdf/DataFAQs/master/services/sadi/core/select-faqts/via-sparql-query-materials/sample-inputs/from-official-sadi-registry.ttl
has been input to the service for the configuration of, say, 134 epochs.
Resources
lodspeakr documentation for nested queries is at: https://github.com/alangrafu/lodspeakr/wiki/Models