W3C home > Mailing lists > Public > public-hydra@w3.org > June 2014

Re: Relating hydra:Classes to hydra:IriTemplates

From: Jindřich Mynarz <mynarzjindrich@gmail.com>
Date: Mon, 23 Jun 2014 10:36:31 +0200
Message-ID: <CAE=8Bu-dieh_iM5SiTnjnH5GERRoFwYU1LsH5n=2UWGWTPH5Ew@mail.gmail.com>
To: public-hydra@w3.org
On Sun, Jun 22, 2014 at 10:01 PM, Markus Lanthaler
<markus.lanthaler@gmx.net> wrote:
> On 17 Jun 2014 at 12:19, Jindřich Mynarz wrote:
>> I was thinking a bit more about relating hydra:Classes to
>> hydra:IriTemplates. It seems to me that the intended way how to do
>> that is by using hydra:TemplatedLink to mint a property (like
>> hydra:search is defined). Consider the following example:
>
> You still have search in mind, right? In my response below, I assume you want to tell a client that the API supports schema:Person and how to find a specific person.

Yes, as I wrote in the example: :simple-search-person
rdfs:subPropertyOf hydra:search.

Let's return to the core topic of this thread. Is the following
example relating hydra:Class to hydra:IriTemplate in a way that's
consistent with the intended use of Hydra?

:simple-search-api a hydra:ApiDocumentation ;
  hydra:supportedClass schema:Person .

schema:Person a hydra:Class ;
  :simple-search-person :simple-search-person-template .

:simple-search-person a hydra:TemplatedLink ;
  rdfs:subPropertyOf hydra:search .

:simple-search-person-template a hydra:IriTemplate ;
  hydra:template "/person{?name}" ;
  hydra:mapping [
      a hydra:IriTemplateMapping ;
      hydra:variable "name" ;
      hydra:property schema:name ;
      hydra:required true
    ] .

Or, distilled even more, is the following pattern in line with Hydra?

:A :B :C .
:A a hydra:Class .
:B a hydra:TemplatedLink .
:C a hydra:IriTemplate .

- Jindřich

-- 
Jindřich Mynarz
http://mynarz.net/#jindrich
Received on Monday, 23 June 2014 08:37:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:53:59 UTC