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
Differentiation between if statement and a switch statement ?

What is virtual function? While derived class overrides the base class method by redefining the same function, after that if client wants to access redefined the method from der

The design of the website will be left to the individual student. The website must be written only in xml, displayed in xhtml using transforms and xsl for styling elements. Javascr

Implement the compare method of the following class RectangleComparator. The method compares two rectangles. The method should return: A positive integer if the area of the first r

The report: Your report must describe the requirements of the application, outline the design of the solution, and provide a testing procedure to prove the application works. In yo


try { pa="weblog"; pas="weblog"; Connection c; Statement st;

Need an engineer who has knowledge working on Flex Reporting tool. Who knows how data needs to be taken care of from DB, SharePoint, ERP and then process using logic/intelligence u

How to Returning Multiple Values From Methods ? It is not probable to return more than one value from techniques. You cannot, for example, return the licensePlate, speed and m

Component classes generally move the task of generating output to the renderer. All JSF components follow it. Render kit is a set of related renderers. javax.faces.render.RenderKit