Re: a good example implementation

Hi Milan,

> so if i wanted to have a search URI template in my json-ld, something like 
>   http://www.youtypeitwepostit.com/search/{search}
> then I have to use Hydra.

The Hydra Core Vocabulary would indeed be my preferred choice here; others might exist.

> Ok, but I don’t see how vocabularies solve this. What do you mean by that?

Well, the Hydra Core Vocabulary is a vocabulary that allows you to talk about IRI templates.
For example:

{
  "@context": "http://www.w3.org/ns/hydra/context.jsonld",
  "@type": "IriTemplate",
  "template": "http://api.example.com/issues{?q}",
  "mapping": [
    {
      "@type": "IriTemplateMapping",
      "variable": "q",
      "property": "hydra:freetextQuery",
      "required": true
    }
  ]
}

The above snippet is JSON-LD, and uses Hydra Core Vocabulary concepts
(hydra:IriTemplate, hydra:template, hydra:mapping, …) to explain the IRI template.
More info: http://www.w3.org/ns/hydra/spec/latest/core/#templated-links

This shows how the Hydra Core Vocabulary solves the expression of IRI templates in RDF.

Best,

Ruben

Received on Friday, 26 June 2015 12:46:08 UTC