how to process SPARQL queries in Jena

The work consists of two main tasks. The first assesses your knowledge of RDF/S as a modelling language. The second allows you to explore the practical use of the SPARQL query language and how to process SPARQL queries in Jena. Jena is a Java framework for building Semantic Web and linked-data applications that provides a programmatic environment for RDF, RDFS, OWL and SPARQL.

Task 1

Consider the following RDF/S graph:

:Dare rdf:type :song .

:Doctor_Dee ref:type :opera .

:composer :composed :musical_content .

:song ref:type refs:Class .

:opera rdf:type rdfs:Class .

:Damon_Albarn rdf:type :musician ;

:composed :Dare ;

:composed :Doctor_Dee ;

rdf:type :songwriter .

[url removed, login to view] the content of this document in natural language;

[url removed, login to view] the graph representation of the document;

[url removed, login to view] whether the following two statements can be represented in RDF/S and motivate your answer:

[url removed, login to view] and songwriters are musicians;

[url removed, login to view] compose operas and songwriters compose songs

Task 2

Familiarise yourself with the Music ontology. This ontology represents information on music styles and musicians. The ontology is written in OWL expressed using its RDF/XML syntax.

Write a Java program that uses JENA to:

1. Generate the list of class and object property names in the Music Ontology. Do not use SPARQL for this task but rather navigate the ontology in Jena and print out all the class names;

2. Process the following SPARQL queries:

- Find the name of the artists who have been married to exactly two other artists;

- Write a query to find the name of Johnny Cash's wife who is an artist;

- Find the URI for the group "Foo Fighters";

The output from your program should print the results for each of the queries above. Make sure the result of the queries is formatted appropriately, do not just cut and paste the RDF/XML syntax!

In order to run the queries you can use the Talis SPARQL endpoint directly from Jena. Use ResultSetFormatter to pretty print your output

Kemahiran: Java

Lihat lagi: sparql jena, list class object property names music ontology, generate list class object property names music ontology, rdfs jena java, jena sparql queries, java jena owl sparql, queries jena, use data jena resultsetformatter, query find uri group foo fighters, statements represented rdfs motivate, explain following statements can represented rdfs motivate answer, sparql married exactly artists, jena sparql result, jena sparql query, music ontology query foo fighters, java program music ontology, sparql jena java, work wife, use of graph, the second song

Tentang Majikan:
( 3 ulasan ) bajjan, United Kingdom

ID Projek: #1592616

2 pekerja bebas membida secara purata $100 untuk pekerjaan ini



$150 USD dalam 3 hari
(0 Ulasan)

Pls check PMB.

$50 USD dalam sehari
(0 Ulasan)