Query example in sparql - java and jena api, JAVA Programming

Exercise 1) Lets start by query example in SPARQL:

QUERY: What are the school's names that belong to the "local authority district" 00AA?
NOTE 1: "Authority districts" divide UK into different regions. The "00AA" is the code for a specific region.

ANSWER:

PREFIX sch-ont:  
SELECT ?name WHERE {
?school a sch-ont:School.
?schoolsch-ont:establishmentName ?name.
?schoolsch-ont:districtAdministrative.
}

The previous code is in SPARQL. Youhave to make a JAVA application that displays the answer in the console.

Exercise 2)
QUERY: Display 10 local-authority-district codes that a school can belong to.

Exercise 3)
QUERY: Display the name of 100 schools that either belongs to local-authority-district with code 00AA or with code 00BE.

Exercise 4)
QUERY: Display the Primary schools names that exist in UK.
NOTE: A primary school has the word "Primary" in its name.

Exercise 5)
QUERY: Display the school names that exist in the town "Margate". Order them by descendent order.
NOTE: A Town is part of an Address of a School. The node school is connected to the node address by the predicate sch-ont:address. The node address is connected to the literal town using sch-ont:town as predicate.

Exercise 6)
QUERY: Display the school names AND THE TOWN NAME that exists in the town "Margate". Order them by descendent order.
HINT: take a look at SPARQL filters...

Posted Date: 3/20/2013 5:57:40 AM | Location : United States







Related Discussions:- Query example in sparql - java and jena api, Assignment Help, Ask Question on Query example in sparql - java and jena api, Get Answer, Expert's Help, Query example in sparql - java and jena api Discussions

Write discussion on Query example in sparql - java and jena api
Your posts are moderated
Related Questions
Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the pa

The game of Life, invented by John Conway, is supposed to model the genetic laws for birth, survival, and death (see Scienti_c American, October 1970, p. 120). We will play it on a

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Sequence diagrams are communication diagrams which detail what messages are sent and when. The sequence diagrams are placed according to time. The time performs as you move from to

write a java program implementing multithreading concept in hotel management

How many ways are there to call a function in a program? Explain with example? Two Ways of Calling Functions: Functions do not run automatically. While the page loads, every

Specifically, you'll create a program that will hold minutes worked and assign a value. Calculate the value into hours and minutes. Display the result as shown in Figure 2. Reme

What is a Relational Database? Give the names of any three RDBMS software? Database consist of two or more then two tables are called Relational database. Oracle dabatbase S

Ask question #MBookshelves A library decides buy bookshelves to store its books and they need to determine the bookshelves’ heights and widths in order to minimize storage costs. T

Introduction In this assignment you will use Processing to create some geometric objects and graphical user interface (GUI) elements that Processing itself lacks. Processing h