Blog metadata in Topic Maps
|
Wenlock basin, Islington, London |
I've been thinking for a while of representing metadata about the blog in Topic Maps, and Robert Cerny brought this up again with his request for a way to get metadata about the entries through a web service. This would of course be a very cool thing to play around with, and having someone actually use the result would be even more fun, so clearly this needs to be done.
The ontology
So, how to represent the metadata? Well, there's not that much metadata available, and this doesn't really need to be made very difficult, either, so maybe this will do:
[entry1 : foo:blog-entry = "TMRAP support in the blog"
%"http://www.garshol.priv.no/blog/145.html"]
{entry1, dc:date, [[2008-01-10T18:09:00]]}
dc:creator(entry1 : dcc:resource, foo:lars-marius-garshol : dcc:value)
dc:subject(entry1 : dcc:resource, foo:tmrap : dcc:value)
dc:subject(entry1 : dcc:resource, foo:tmphoto : dcc:value)
dc:subject(entry1 : dcc:resource, foo:tmxml : dcc:value)
I could throw in something associating the entry with a topic representing the blog as well, I guess. I could add the category as well. Not sure if there is any need for those, or if there are any pre-existing PSIs for this.
Robert wanted this in XTM 2.0 or JTM. I think I'd prefer XTM 2.0, simply because it's the more standardized format (and probably less work on my side), but other formats could of course be added as needed.
The protocol
Then there is the question of how to get hold of this information. Robert suggested doing a GET on the blog entry with an "Accept" header specifying that the client does not want HTML, but rather XTM 2.0/JTM. This would work, and it would be extremely RESTful, but it would require me to change the entire architecture of this blog. (Whether what you get is another representation of the same resource or a different resource is also a question, and I'm not convinced that this is the right way to do it.)
It struck me that there is another way to do this, that fits more naturally into the infrastructure I already have, which is to continue to use TMRAP. Basically, all I need to do is to implement the get-topic request in TMRAP, so that you can do a GET at http://www.garshol.priv.no/blog/tmrap.py/get-topic?subject=http://www.garshol.priv.no/blog/145.html to get the topic map fragment above.
This has the added benefit that if I talk about a new dc:subject that the client has not seen before, the client can do a get-topic on that topic, too, and get its name, type, and other information.
Next steps
So, Robert, and others, what do you think? If you think this sounds good I'll just implement it. Having a first, crude version up and running should not take long.
Similar posts
Subtyping statements
Subtyping topic types has been supported in Topic Maps ever since the beginning, but support for subtyping statement types is much spottier, and, it turns out, trickier
Read | 2007-07-13 18:50
TMRAP support in the blog
I've been thinking for a while that it's a pity that many of the stories in the blog which are about the same things as the photos in the tmphoto application don't show up in that application
Read | 2008-01-10 18:09
The get-illustration web service
I'm working on a site that lists the various Topic Maps-related software that's out there, in an effort to make all the tools that have been released more visible
Read | 2008-10-28 15:20