- From: Ruben Verborgh <ruben.verborgh@ugent.be>
- Date: Wed, 10 Sep 2014 18:21:36 +0200
- To: Erik Wilde <dret@berkeley.edu>
- Cc: László Lajos Jánszky <laszlo.janszky@gmail.com>, public-hydra@w3.org
Hi Erik, > speaking for our motivation to create https://tools.ietf.org/html/draft-wilde-link-desc-01, we needed a way to represent data types and value ranges for template parameters. if you want to declaratively represent forms, then that's necessary. Sure; that's why the Hydra Core Vocabulary offers IriTemplateMapping [1]. Like HTTP Link Descriptions, Hydra adds meaning to parameters from RFC6570. > for example, when i have a template parameter that's representing the "page number" that i can use when accessing a collection, then i want to know that this parameter is an integer, and i also want to know that i can access pages 1 to 42. only if this is represented i can build random access to pages and know which ones i can access. Yes. Basically, this realizes what HTML forms would do (where <label>s guide the user to the meaning of the fields). Here is an equivalent Hydra example: { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@type": "IriTemplate", "template": "http://api.example.com/issues{?page}", "mapping": [ { "@type": "IriTemplateMapping", "variable": "page", "property": "http://example.com/feedpaging/page", } ] } This is very similar to what Link Descriptions do, right? Best, Ruben [1] http://www.hydra-cg.com/spec/latest/core/#templated-links
Received on Wednesday, 10 September 2014 16:22:09 UTC