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
Errors: When a dynamic linking failure or some other "hard" failure in the virtual machine happens, the virtual machine gives an Error. Typical Java programs could not find Error

Write a brief note on each of the following. FTP Telnet Instant messaging VoIP FTP: File Transfer Protocol: This protocol is used to upload and download the

Java Message Service: An interface executed by most J2EE containers to give point-to-point queueing and topic (publish/subscribe) behavior. JMS is frequently used by EJB's that req

Question: (a) (i) Explain the concept of inheritance. Illustrate your answer with a suitable Java example. (ii) Java does not support multiple inheritance but does provide

what is arrays and how do they operate

What is the role of hub in networks? The network traffic controller - elements of convential computer networks. Hub is used to link the different computers within the network i

How to get all the registered objects in a rmiregistry? Ans) Using list method of Naming Class.

in java string is a

What are the types of Dependency Injection Spring supports? Ans) there are two types of Dependency Injection Spring a)  Setter Injection: b)  Constructor Injection: