* Ben Metcalfe <[EMAIL PROTECTED]> [2006-05-02 15:18+0100]
>       Hi -
>       
>       I was having a quick look at the Programme Catalogue (amazing
> what the OU has put out over the years -
> http://blogs.open.ac.uk/Maths/ajh59/006117.html) and a couple of things
> came to mind:
>       
>        - is there an API/any way of making a query to the catalogue
> that will return an XML response?
>        - are you going to offer support for sparql (the reason i ask
> is that's the way the Talis/Silkworm/library webservice
> (http://directory.talis.com/ui/) API looks like it's going -
> http://api.talis.com/1/dir/sparql)
>       - is the catalgoue reference number coding scheme
> hackable/defined according to some convention? If so, is the convention
> published anywhere?
>       - is it possible to make compound(?) queries on the catalogue -
> e.g. to search for series "Dr WHo" AND contributor(?) Tom Baker
>       
>       thanks
>       tony
> 
> 
> Hi Tony,
>  
> Yes there are API's - loads of them!  If you perform your search you
> should see "Feeds" for every page returned.
>  
> For example http://open.bbc.co.uk/catalogue/infax/contributor/4362 (Tony
> Blair) returns FOAF data
> (http://open.bbc.co.uk/catalogue/xml/contributor/4362) and an Atom dump
> (http://open.bbc.co.uk/catalogue/feed/contributor/4362).
>  
> If you want to convert your web-based searches into REST-like requests,
> you want to pick out the "/infax/" in the url and change it to "/xml/"
> and "/feed/".
>  
> I don't know anything about Sparql so I'll check it out.

SPARQL is a bit like SQL for RDF data. It lets you query patterns of
entity/relationship-like structures. Leigh Dodds has some example
SPARQL queries against the BBC catalogue data at:
http://www.ldodds.com/blog/archives/000272.html

...but these are each couched against a specific RDF document served
from the catalogue, eg.
http://open.bbc.co.uk/catalogue/xml/series/DR+WHO

It would be nifty if the catalogue could expose its own SPARQL
interface, but that could be somewhat expensive (much like exposing 
one's SQL database to the world to query). 

A halfway-house would be for the existing search facility to return
RDF, Atom etc., which could then be queried locally. Or for that service
to be considered a form of parameterised SPARQL service, ie. model this
as a decision to expose a selected number of possible queries, but have 
the server return SPARQL result sets (in XML or JSON) so they can be 
consumed locally with standard SPARQL library code.

The Jena RDF toolkit has some SPARQL tutorial materials, and links to
others including a handy piece from Phil McCarthy:

http://jena.sourceforge.net/ARQ/Tutorial/
http://www-128.ibm.com/developerworks/xml/library/j-sparql/

The main thing to know about SPARQL resultset format is that has 
more or less the same basic logical structure as you'd be familiar with 
from SQL (JDBC, etc), ie. you get a set of hits, each row of which is 
a bundle of variable-to-value bindings. 

Playing with the online demos at http://www.sparql.org/ and 
http://librdf.org/query is a good way to get a sense for what 
SPARQL has to offer. 

cheers,

Dan

ps. there are a few cases in the data where foaf:homepage is used 
where I'd have expected foaf:isPrimaryTopicOf, ie. the catalogue 
references a generated page. I'm not so comfortable calling these a 
"homepage" since in many/most cases, the person concerned won't even
know about them, which seems to counter to most senses of "homepage".

> As far as I know advanced Boolean searches aren't currently implemented,
> but I'll feed back to the team who worked on this that people (seem to)
> want it.


>  
>  
> Cheers
>  
>  
> Ben :: backstage.bbc.co.uk
> 
> -
> Sent via the backstage.bbc.co.uk discussion group.  To unsubscribe, please 
> visit http://backstage.bbc.co.uk/archives/2005/01/mailing_list.html.  
> Unofficial list archive: 
> http://www.mail-archive.com/[email protected]/
-
Sent via the backstage.bbc.co.uk discussion group.  To unsubscribe, please 
visit http://backstage.bbc.co.uk/archives/2005/01/mailing_list.html.  
Unofficial list archive: http://www.mail-archive.com/[email protected]/

Reply via email to