This week, I've been playing with merging multiple RDF data sources, and doing SPARQL queries across the set. This should let us offer enhanced metadata on the website...
Here's the imaginary future IngentaConnect abstract page (in an audio browser):
What's that you say user? You enjoyed reading "Obesity and Poverty" on Ingenta? Did you know that people who bought it on Amazon, also bought... What's that? You're thinking of buying a hard copy so you can read it again in the bath? Well it's up to you, but now it's £28 from the big yellow place..."
"Hey, pal, I notice you're reading "Realising the Full Potential of the Web" on Ingenta Do you realise that's by Tim Berners-Lee? Did you know that he's geolocated at 42.361860,-71.091840? eh?
In order to experiment with merge queries, I first had a go at implementing the SPARQL Protocol using Jena.
You submit a GET which goes:
query=[Scary SPARQL query]
& named-graph-uri=[URI of some other RDF data]
(line breaks added for clarity)
For default-graphs, the service tries to open a connection to a known triplestore, for named-graphs it requests the document and reads it.
Next, I set up some demos:
Example 1. Merging with Amazon to enhance Book data
The demo is a form containing the query. Here's the the results (sorry it's a flat copy - can't open it up for real yet).
Data is merged from 3 sources:
1. Book from metastore XML API(Flat copy).
2. Book from Amazon (this is the real service live btw.)
I made this nice RDF/XML by URL pipelining standard stuff from their API with an XSLT stylesheet.
3. An owl:sameAs statement - to hook em together.
2. Merging with personal FOAF documents to enhance Author data
Here's the query, and the results.
Data is merged from 2 sources:
1. Metastore XML API: Article, Author
2. An RDF business card document on the web
The two are merged by joining on surname.
I'll open the API for experimentation as soon as I can get it past the legal people. Registration of interest in that, comments, and suggestions for other merges, very welcome.