RE: How to avoid that collections "break" relationships

On Thursday, March 27, 2014 11:25 AM, Niklas Lindström wrote:
> On Thu, Mar 27, 2014 at 1:48 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"
> > }
> 
> This is basically the same pattern as the void:Linkset one, right?

I'd say so. Both of these examples are quite close to LDP's model:

{
   "@id": "/markus/knows",
   "@type": "ldp:???Container",
   "ldp:membershipResource": "/markus",
   "ldp:hasMemberRelation": "schema:knows"
}


> With the less precise predicate foaf:primaryTopic instead of
> void:linkPredicate. But that might be fine (especially since as
> mentioned VoID Linksets are about linking separate datasets). Btw, I
> suggest using schema:about instead, if we're using schema.org in
> general.

Really? Schema:about schema:knows? It isn't really about the property
schema:knows, right?

 
> Regarding lists of friends – what is the need for connecting
> artificial containers/lists of people, and just implying friendship?
> Is this really about managing reified triples? Why not just publish
> documents containing :knows links between me and my friends? The
> documents can of course be collections, paginated and so on. But
> that's a dataset partitioning mechanism (using linked documents),
> orthogonal from the links between me and my friends. Conflating this
> seems to cause the problems we're having here.

All of this is driven by Web APIs. Using such containers/lists is so common
there that I've decided to include a representation thereof in Hydra. In
quite a lot of cases allows existing plain old JSON services to be upgraded
to  JSON-LD+Hydra services by just adding a context to the JSON
representations, i.e., without breaking existing clients.


--
Markus Lanthaler
@markuslanthaler

Received on Saturday, 29 March 2014 21:56:08 UTC