LinkedDataFragments / Client.js

[DEPRECATED] A JavaScript client for Triple Pattern Fragments interfaces.
http://linkeddatafragments.org/
Other
92 stars 35 forks source link

question regarding DESCRIBE / CONSTRUCT queries and RDF export #44

Closed obkhan closed 4 years ago

obkhan commented 6 years ago

If a URI is provided can the server return RDF/turtle/JSON-LD or other formats to the client.js to convert?

I've tried a DESCRIBE query without much luck: DESCRIBE <http://dbpedia.org/resource/12_Monkeys>

similar

CONSTRUCT {<http://dbpedia.org/resource/12_Monkeys> ?p ?o ?o ?p1 ?o1 . } WHERE {<http://dbpedia.org/resource/12_Monkeys> ?p ?o . OPTIONAL { ?o ?p1 ?o1 . FILTER (ISBLANK (?o)) } }

dallemang commented 6 years ago

There is a syntax error in that query - a "." left off the end of the first line. Is that an issue?

obkhan commented 6 years ago

@dallemang -You are indeed correct!

CONSTRUCT {http://dbpedia.org/resource/12_Monkeys ?p ?o . ?o ?p1 ?o1 . } WHERE {http://dbpedia.org/resource/12_Monkeys ?p ?o . OPTIONAL { ?o ?p1 ?o1 . FILTER (ISBLANK (?o)) } }

Query results The query is not yet supported Unsupported operator: isblank.

Requesting http://fragments.dbpedia.org/2016-04/en Requesting http://fragments.dbpedia.org/2016-04/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2F12_Monkeys Requesting http://fragments.dbpedia.org/2016-04/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FRoger_Pratt_%28cinematographer%29 Requesting http://fragments.dbpedia.org/2016-04/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FTerry_Gilliam Requesting http://fragments.dbpedia.org/2016-04/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FUniversal_Studios Requesting http://fragments.dbpedia.org/2016-04/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMick_Audsley

Question to @rubensworks @RubenVerborgh

can we export the results to RDF/turtle or other formats?

rubensworks commented 6 years ago

@obkhan Yes, CONSTRUCT queries will serialize by default to turtle. You can change this format by adding a format entry to your config file. For example, format: 'N-Triples'.

Note that the ISBLANK operator is not supported, which is why your query fails.

dallemang commented 6 years ago

Are any of the introspective things supported, e.g., ISIRI?

Also, in a HTTP setting, could we have it respond to a mimetype, and return sometimes RDF/XML, sometimes TTL, sometimes JSON-LD?

rubensworks commented 6 years ago

Are any of the introspective things supported, e.g., ISIRI?

As far as I know, the current client does not support this at the moment. A new client is however in development that should support these kind of operators.

Also, in a HTTP setting, could we have it respond to a mimetype, and return sometimes RDF/XML, sometimes TTL, sometimes JSON-LD?

ldf-client-http does in fact consider mine types when responding to HTTP requests for the supported serializations (--listformats).

rubensworks commented 4 years ago

This project has now been deprecated in favor of Comunica, if this issue is still relevant to you, feel free to open a new issue there.