W3C home > Mailing lists > Public > public-hydra@w3.org > January 2015

Re: Questions about new collection design

From: Tomasz Pluskiewicz <tomasz@t-code.pl>
Date: Sun, 25 Jan 2015 22:05:10 +0100
Message-ID: <54C55A86.8040608@t-code.pl>
To: public-hydra@w3.org
Hi

I don't see big problems with this design. After all Hydra is about 
designing an API, which will have to differ from the data model itself 
sometimes.

On 2015-01-25 21:14, Markus Lanthaler wrote:
> Hi Dietrich,
>
> Taking this one and replying to more of the recent discussions tomorrow..
>
> On 25 Jan 2015 at 19:10, Dietrich Schulten wrote:
>> To illustrate the first problem to those of us who read triples more
>> easily, please consider the Collection with embedded members below:
>>
>> </alice> hydra:collection </alice/friends> .
>> </alice/friends> a hydra:Collection ;
>>      hydra:manages [
>>          hydra:property schema:knows ;
>>          hydra:subject </alice> .
>>      ] ;
>>      hydra:member </bob> ;
>>      hydra:member </zelda> .
>>
>> I hope I got the triples right :) This doesn't seem to say that
>
> That's correct
>
>
>> </alice> knows anyone at all. Not a problem?
>
> No, not really I'd say
>

Open World Assumption at its best :)

>
>> I understand why we do this. A property like foaf:knows which has
>> foaf:Person as range:
>>
>> </alice> foaf:knows </alice/friends>
>>
>> would mislead a reasoner to infer that /alice/friends is a foaf:Person
>> known by /alice, although it is a hydra:Collection, not a Person.
>
> Exactly
>
>
>> But is there a way to express that the above also entails
>>
>> </alice> foaf:knows </bob>
>> </alice> foaf:knows </zelda>
>>
>> ?
>
> Sure, just add those triples :-) It starts to make more sense if you split the collection into multiple pages. We *could* also define "manages" in a way that would allow a reasoner to infer these triples automatically.
>

+1 for including adding the triples. With JSON-LD @reverse goody you 
could have it neatly packed together in a single object:

{
   "@context": {
     "knownBy": {
       "@reverse": "foaf:knows",
       "@type": "@id"
     }
   },
   "@id": "/alice/friends",
   "hydra:member": [{
     "@id": "/bob",
     "knownBy": "/alice"
   }]
}

>
> --
> Markus Lanthaler
> @markuslanthaler
>
>
Received on Sunday, 25 January 2015 21:06:10 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 25 January 2015 21:06:11 UTC