zazukoians / trifid-ld

This repository is DEPRECATED please goto:
https://github.com/zazuko/trifid
Apache License 2.0
18 stars 9 forks source link

Get triples from DBpedia when a sameAs is present and render them #23

Closed alemela closed 8 years ago

alemela commented 8 years ago

In this PR we write and deploy a construct query in order to get data from DBpedia. Is mandatory to have at least one owl:sameAs triple to a DBpedia resource to see it working.

So we add by hand <http://localhost:8080/data/person/sheldon-cooper> <http://www.w3.org/2002/07/owl#sameAs> <http://dbpedia.org/resource/Sheldon_Cooper> . to node_modules/tbbt-ld/dist/tbbt.nt, to change the demo dataset. Pay attention: this modification is not committed.

The expected result is to see another section under the normal data on the sheldon cooper page, and no addition on the others (that haven't the sameAs).

retog commented 8 years ago

What is the new config sparqlDBpediaSearch used for? Was there any problem accesinng DbPedia with ld2h? (Getting ld2h to work was the reason for #21)

retog commented 8 years ago

I don't think the image in https://github.com/zazukoians/trifid-ld/pull/23/commits/88560fdf3c47e963bf6d98d5fbf1c8c9872ef7f5 should be in trifid-ld

bergos commented 8 years ago

I like the sameAs feature, but if it requires changes in the backend than it should not be part of the default trifid repository.

retog commented 8 years ago

Can't be accepted at the moment, on one hand that added complexity with the Sparql dbpedia endpoint on the other hand the logo of the swiss confederation,

alemela commented 8 years ago

Ok for the image, in effect it has nothing to do with trifid.

For lower the complexity of this PR in our next fix, can you provide an example of the DBpedia call with ld2h that you prefer? So we can adjust the other work around that. Thanks!

retog commented 8 years ago

Ok, here's a strawman: https://github.com/retog/trifid-ld/commit/26a3671b8c55d385b3da32b15f58c181aba67c3e

It follows owl:sameAs forever and the targets get more header/footer than useful. A strait forward way to prevent this is by setting a context:

<div class="fetch" resource="{{.}}"  context="http://example.org/non-autoritative" />

With this only templates with

r2h:context <http://example.org/non-autoritative>

will be considered.

Also, if one wants to prevent owl:sameAs pointing to resources within the same domain to be shown as external-resources or for other fancy things it's probably makes sense to replace the mustache template with a javascript function (as in the catchall-template).