Thursday 30 August 2007

Piggy Bank and bioGUID - browsing the biodiversity Semantic Web


Piggy Bank is, according to its developers:
...a Firefox extension that turns your browser into a mashup platform, by allowing you to extract data from different web sites and mix them together.

I've been rather underwhelmed in the past, but Jim Balhoff asked me why bioGUID didn't play ball, so I decided to take another look.



On pointing Piggy Bank at a bioGUID page, such as casent0498428 and clicking on the "data coin" icon in the bottom right corner of the Firefox browser window failed to produce anything interesting (Piggy Bank just grabbed some text from the web page, not the underlying RDF). After a bit of fussing, I finally got bioGUID to work with Piggy Bank.



BioGUID resolves a GUID and returns RDF as an XML document, with a XSL instruction included so that the web browser renders it as HTML. This means that a user with a web browser gets a nicley formatted page, but a Semantic Web tool gets RDF. However, Piggy Bank needs some help. First, I include a link to the RDF in the <head> element of the HTML, as described on the Piggy Bank web sitee.g.:

<link rel="alternate" type="application/rdf+xml"
href="http://bioguid.info/rdf/casent:0008682-d03&format=raw">

The &format=raw parameter is important as this tells bioGUID to return RDF with the MIME type "application/rdf+xml". Piggy Bank needs this MIME type set, otherwise it just parses HTML. I normally return RDF as "application/xml" so it displays nicely in web browsers if I'm debugging, and to ensure the XML is transformed into HTML. Clearly I'm going to have to rethink this, perhaps by exploring content negotiation.

Anyway, for the time being Piggy Bank and bioGUID seem to work together, as this screen shot shows:



If you want to explore Piggy Bank as a Semantic WEb browser for biodoversity data, one place to start is http://bioguid.info/pmid:17079492 and the sequences it links to, many of which link to specimens.

No comments: