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
You should override the hashCode() and equals() functions from the Object class. The default implementation of the hashcode() and equals(), which are inherited from the java.

Explain Booleans in java? Booleans are named after George Boole, a nineteenth century logician. Every boolean variable has one of two values, true or false. These are not the s

For this Assignment, submit the following program: Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The

Describe the Class or static Members ? A method or a field in a Java program could be declared static. That means the member belongs to the class rather than to an individual

I want to upload an item object with it''s image is it possible that i pass a complete object of my Item along with it''s image from my Controller if yes then how may i Do it? an

Why are JSP pages the preferred API for creating a web-based client program? Because no plug-ins or security policy files are required on the client systems (applet does). Also,

Project Description: I need a Script developer who can make script for me. Need urgently. Skills required: Java, Facebook Marketing, Javascript, PHP, Script Install

I need to draw cars and trucks and background with road and a house with sky. I have to use Vehicle class as a parent class. To draw pictures, i should draw fun things coming up

To integrate your Struts application with Spring, we have two options: ? Configure Spring to manage your Actions as beans, using the ContextLoaderPlugin, and set their dependenc

This is a two part project, one in Alice, and another in Java. You can either zip the files together as one and upload the single zip file, OR upload the separate files. If you dec