W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > November 2010

Re: RDFa API: thoughts on PropertyGroup

From: Toby Inkster <tai@g5n.co.uk>
Date: Sun, 7 Nov 2010 19:13:34 +0000
To: Niklas Lindström <lindstream@gmail.com>
Cc: public-rdfa-wg <public-rdfa-wg@w3.org>
Message-ID: <20101107191334.6ed5b1c0@miranda.g5n.co.uk>
On Sun, 7 Nov 2010 00:49:50 +0100
Niklas Lindström <lindstream@gmail.com> wrote:

> 1. The name of the interface "PropertyGroup". Since the methods used
> to retrieve these are named "getItemBy[...]", why is it not named
> "RDFItem" or similar? Just a detail perhaps, but the naming of things
> is quite important IMHO. (It could also be called Description, in
> honor of the "D" in RDF.. ;) )

Yeah, the name's pretty awful. I was explaining to danbri on IRC a few
days ago exactly what a property group was, and when the penny dropped
his reaction was along the lines of, "ah... so it's a Description".

It's not a complicated concept - it's one that will be familiar to
anyone who's done much coding with RDF - it's just a poorly named
interface so it takes a while for people to notice that it's something
they're familiar with. Of course, people who have done lots of coding
with RDF are not our only target audience, but I don't know if the
current name is especially helpful for people who haven't either.

So +1 to Description; or even ResourceDescription. It's not dissimilar
to the rdf:Description element in RDF/XML.

> 2. The PropertyGroup should have an attribute for the subject it
> represents the properties of ("readonly attribute RDFResource
> subject;").

+1 to this too.

> 3 a. It would be really convenient to easily get a PropertyGroup for
> an RDFResource (i.e. IRI:s and BNodes), so I suggest adding a
> method to RDFResource for getting a PropertyGroup with the given
> resource as subject, such as "getItem()". This is to avoid having to
> repeatedly call "document.getItemBySubject(...)" when traversing
> linked resources.

Yes, I think I've suggested this before. The one possible problem is
that this means that IRIs and blank nodes need to "know" what graph they
are part of. That is, the code behind someResource.getItem() needs to
know which graph to look at for triples.

Perhaps an alternative would be to add getItemsByX methods to DataStore
or RDFGraph or whatever we're calling it these days.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Sunday, 7 November 2010 19:13:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:05:22 UTC