You are on page 1of 1

Download the BBC Music Ontology (http://musicontology.com/).

It represent inform
ation on the programmes and music broadcast by the BBC. The ontologies are writt
en in OWL (expressed using its N3 and RDF/XML notations respectively).
Write a Java program that uses JENA to:
1.Generate the list of class and object property names in the Music Ontology.
2. Process the following SPARQL queries:
- Write a query to find the name of Johnny Cash¡‾s wife (Johnny Cash is a music
artist and so is his wife);
- Find the name of the artists who have been married to two other artists;
n order to run the queries you can use the Talis SPARQL endpoint (http://api.tal
is.com/stores/bbc-backstage/services/sparql).

A sample query for your help : This query list the name of all the artists who a
re married.
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX rel: <http://purl.org/vocab/relationship/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?artist1_name ?artist2_name
WHERE
{
?artist1 a mo:MusicArtist;
foaf:name ?artist1_name.
?artist2 a mo:MusicArtist;
foaf:name ?artist2_name.
?artist1 rel:spouseOf ?artist2.
}

You might also like