Re: Can't RDF describe collection resources?

Hi Phil,

> Back in the midsts of time there were rdf predicates of aboutEach and aboutEachPrefix but these were shown to be logically flawed and, to great shouts of joy, were dropped from the 2004 specs that we all use today.

Alright, I see. So this issue has been around for long then.

> Wind forward several years and a solution to the aboutEach problem was provided by POWDER [1]. It allows you to create a little bit of XML that says what you want to say and that can then be processed to return individual triples that can be generated automatically.
> 
> The POWDER file would look something like this:
> […]
> Which I've put online at [2].

Thanks for taking the effort! This is definitely interesting and going in to the direction I want.

The document at [2] does convey the intention that comments is the collection of all comment resources and can indeed nicely generate those triples.
Can it make the relation between the blog post and the comments collection?
(Also if there are no comments?)

> Basically what we're doing here is making assertions based on URI patterns which means using a semantic extension (defined in POWDER's Formal Semantics document). I know that this is is heresy to many Sem Web folk but it does provide a way to solve exactly the problem you pose whilst ending up with what one might call 'proper triples.’

Not seeing the URI as an opaque identifier can indeed be difficult to sell to some SW people (especially reviewers).

> P.S. In the broader context, people spend a lot of time and effort designing URI schemes - good, that's as it should be. But without something like POWDER, all that design effort - the intention behind those Cool URIs - gets thrown out with the bathwater.

Interesting that you say this, because this question comes from a REST / hypermedia API research project perspective.
In REST, it is common to use the collections resource itself.
Going back to the example, it would be quite natural to talk about /posts/35/comments, whereas RDF only would talk about the individual comments.

For us, this mismatch is a problem, as we are describing resources in hypermedia APIs and the relations between those resources in RDF.
Unfortunately, in the REST community, making assertions from URI patterns is also not well-received.

I’ll look into POWDER now!

Thanks,

Ruben

> [2] http://philarcher.org/powder/blogcomments.xml



> On 01/03/2012 07:28, Ruben Verborgh wrote:
>> Dear Semantic Web enthousiasts,
>> 
>> Suppose we have a Web application for blogging:
>> - /posts/35 is a blog post
>> - /posts/35/comments are the comments to that post
>> - /posts/35/comments/3 is a specific comment to this post
>> 
>> In RDF, it is straightforward to make the relation between the blog post and a specific comment:
>>   </posts/35>  :hasComment</posts/35/comments/3>.
>> It is also easy to describe the relation between a specific comment and all comments:
>>   </posts/35/comments/4>  :memberOf</posts/35/comments>.
>> 
>> However, how do we indicate the relationship between the blog post and *all* comments that belong to it?
>> I.e., what is the relationship between</posts/35>  and</posts/35/comments>  ?
>> 
>> One could make a new predicate for that of course:
>>   </posts/35/>  :hasComments</posts/35/comments>.
>> But then, we still have to explain the relation between :hasComments and :hasComment; and we’d have to do that for every such plural predicate.
>> 
>> This seems to be a fundamental problem.
>> Clearly, the resource “comments on blog post 35” exists, but there doesn’t seem to be a straightforward way to describe it in RDF.
>> RDF lists will not be sufficient: they could indeed explain the relation between a specific comment and all comments, but not the relation between all comments and the blog post.
>> Also note that the indirect relation “_:x :hasComment _:y. _:y :memberOf _:z” is not sufficient: a blog post can have no comments, but even then it still has an (empty) comments resource.
>> 
>> Have you encountered this issue and how do you solve it?
>> 
>> Kind regards,
> 
> -- 
> 
> Phil Archer
> http://philarcher.org/
> +44 (0)7887 767755
> @philarcher1

Received on Thursday, 1 March 2012 08:58:53 UTC