- From: Ruben Verborgh <ruben.verborgh@ugent.be>
- Date: Tue, 28 Jan 2014 17:31:37 +0000
- To: public-hydra@w3.org
Dear all, I have three concerns about hydra:mappings I'd like to discuss with you. I've tried to adapt the example of IriTemplateMapping [1]. My use case needs two parameters, so what we get is this: { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@type": "IriTemplate", "template": "http://api.example.com/issues{?author,topic}", "mappings": [ { "@type": "IriTemplateMapping", "variable": "author", "property": "foaf:maker" }, { "@type": "IriTemplateMapping", "variable": "topic", "property": "hydra:freetextQuery" } ] } According to http://rdf-translator.appspot.com/, this translates to the following Turtle: [] a hydra:IriTemplate ; hydra:mappings [ a hydra:IriTemplateMapping ; hydra:property <foaf:maker> ; hydra:variable "author" ], [ a hydra:IriTemplateMapping ; hydra:property hydra:freetextQuery ; hydra:variable "topic" ] ; hydra:template "http://api.example.com/issues{?author,topic}" . My concerns are the following. 1) In the Turtle version, you can see that “mappings” is a misnomer; this should actually be "mapping". There can be one, there can be multiple, but the argument is not a list, so it should be singular. This is a more general Hydra issue, which I will address in a separate mail. 2) The range of hydra:property is currently undefined (in the text, not in the schema); I think this should be updated to: - Domain: hydra:IriTemplateMapping - Range: rdf:Property Note also how "hydra:freetextQuery" translates to the correct URI, while "foaf:maker" does not, but that's probably a mistake on my side. In general, I think it's important to emphasize in 5.2 that the value is a URI, and not a string; I didn't get this during the first pass. 3) How should a client pass the value in the template? Given the example above, ?author maps to foaf:maker. But what value should be put into the URL? The URI of the maker, that person's full name, or only last name and initial? And in any of those cases, how do we communicate that? Right now, we cannot say "the label of the foaf:maker". And then again, which maker are we talking about? Is it the result resources which have that foaf:maker as property? If it is, that definition doesn't work with hydra:freetextQuery. Of course, I understand we don't want to go to deep, but I am actually implementing this use case now: the client has data and sees this hydra:IriTemplateMapping. How can it translate this data into an actual HTTP request? Seems like a basic question that Hydra should be able to answer. Best, Ruben [1] http://www.markus-lanthaler.com/hydra/spec/latest/core/#templated-links
Received on Tuesday, 28 January 2014 17:32:10 UTC