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

RE: hydra:Collection with reverse property (in manages)

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Tue, 26 Aug 2014 14:17:45 +0200
To: "'Hydra'" <public-hydra@w3.org>
Message-ID: <06a701cfc127$bf16edf0$3d44c9d0$@gmx.net>
Hi Pavlik,

On 26 Aug 2014 at 13:33, ☮ elf Pavlik ☮ wrote:
> hi, i would like to create collection of events which i attend(ed). if i
> want to stick to schema.org vocab, then i need to use reverse of
> http://schema.org/attendee
> 
> can i just define attendeeIn in @context
> 
> {
>   "@context": {
>     "attendeeIn": { "@reverse": "http://schema.org/attendee" }
>   }
> }
> 
> and simply use for property in 'manages block'?

Nope :-) That doesn't do the trick as the information that you are interested in the reverse property would be lost. The solution is quite simple however. Schema.org follows the model

   Event  --[ attendee ]--> Person

You want the collection to be constant for "attendee" and "Person". In other words, the variable is the "Event"... or subject if you look at it as triples. So instead of

> {
>   "@id": "/alice",
>   "collection": {
>     "@id": "/alice/events",
>     "@type": "Collection",
>     "manages": {
>       "property": "attendeeIn",
>       "subject": "/alice"

You would declare it as

       "property": "attendee",
       "object": "/alice"

>     }
>   }
> }
> 
> thanks for pointing out any possible gotchas!


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler
Received on Tuesday, 26 August 2014 12:18:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:43 UTC