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

On 08/26/2014 02:17 PM, Markus Lanthaler wrote:
> 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 Markus,

I added this info to *Collection Design* wiki page:
https://www.w3.org/community/hydra/wiki/index.php?title=Collection_Design&diff=19&oldid=18

BTW do you plan to include all this information in core spec?

Cheers!

Received on Thursday, 28 August 2014 17:59:07 UTC