RE: How to avoid that collections "break" relationships

On Thursday, March 27, 2014 10:19 AM, john.walker wrote:
> > March 27, 2014 9:49 AM Gregg Kellogg wrote: 
> > > That's an interesting idea; in a JSON-LD representation, it might
> > > look like the following: 
> > > 
> > > { 
> > > "@id": "/markus", 
> > > "@type": "schema:Person", 
> > > "rdfs:seeAlso": { 
> > > "@id": "/markus/friends", 
> > > "foaf:primaryTopic": "schema:knows" 
> > > } 
> > > } 
> > > 
> > > { 
> > > "@id": "/markus/knows", 
> > > "@type": "hydra:Container", 
> > > "hydra:member": "/gregg" 
> > > } 
> > > 
> > > The only problem I see from a Linked Data perspective is that 
> > > </markus/friends> appears to be defined in the </markus> node definition, 
> > > so it wouldn't be obvious that you would do a further redirection to get 
> > > the container. 
>   
> Based on AAA assumption, would it be wrong to assume that just because
> </markus/friends> is the subject of some triples in </markus>
> resource, that I would not get additional information by following the
> link?

Yes, it would. In general, the only authoritative representation of a resource is the one you retrieve by dereferencing its URL. So you should also look there. 


> For example in the friends list, I would expect it is reasonable and
> useful to include the foaf:name of all the people you know so you can
> present these to the user without having to follow each of those links
> individually to fetch the persons name.

Yep, that's actually a best practice as Niklas explained already in a different thread.


> In fact doing this kind of flexible denormalization in the data
> publishing layer is one of the strong points of RDF and Linked Data
> IMHO.  Sticking to a world view where data is only published in
> normalized form is losing a lot of useful points.
>  
> In the above example, I would expect the use of rdfs:seeAlso gives a
> strong hint to the user agent to follow that link, plus including some
> info about that resource gives a hint of what you can expect to find
> there.

Right


> > Sorry, I have no knowledge of Hydra. 
> > My though was to skip the container completely and only serve 
> > a bunch of raw 
> > </markus> schema:knows [] . 
> > triples from </markus/friends> or the redirection target </markus/friends.rdf> 
> > 
> > Paging seems like overkill but I guess it could be necessary in other
> > situations. 
> > 
> > Tore 
>   
> Based on the JSON-LD example from Markus, what seems logical for me is
> as follows.  I minted a new hydra:relation property that tells you by
> which property the primary topic of the list is linked to the members
> by.
>   
> { 
> "@id": "/markus", 
> "@type": "schema:Person", 
> "rdfs:seeAlso": { 
> "@id": "/markus/friends", 
> "@type": "hydra:Container", 
> "foaf:primaryTopic": "/markus", 
> "hydra:relation": "schema:knows" 
> } 
> } 
>   
> { 
> "@id": "/markus/friends", 
> "@type": "hydra:Container", 
> "rdfs:label": "List of Markus' friends" ,
> "foaf:primaryTopic": "/markus", 
> "hydra:relation": "schema:knows" , 
> "hydra:member":  [ 
> { "@id": "/gregg" }, 
> { "@id": "/bill" } 
> ] 
> } 
>   
> So with appropriate inference rules you could entail that markus knows
> gregg and bill, or also just state these triples explicitly in the
> friends list.
>   
> When Markus is a very popular guy the list can also be paginated. 
>   
> Hope that makes sense. 

Yes it does. It is, however, "just" a variation of Niklas' proposal... however with more commonly known properties.


--
Markus Lanthaler
@markuslanthaler

Received on Saturday, 29 March 2014 21:42:16 UTC