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
Overview Demonstrate your knowledge of JavaScript and ColdFusion by implementing the following functionality: Contact form • The following validation error message shou

What are Commonsense Guidelines to prevent viruses? Discuss about Antivirus as well. Commonsense Guidelines to avoid viruses are as follows: 1. Do not open attachment of unwant

A Java package is a naming context for classes and interfaces. A package is used to make a separate name space for groups of classes and interfaces. Packages are also used to arran

What are adding methods? A subclass isn't restricted to changing the behavior of its superclass. It can also add fully latest techniques and fields that are not shared along wi

Explain all Java Primitive Data Types? boolean 1-bit. May take on the values true and false only. true and false are describe constants of the language and are not the s


Question 1 What is Response Redirection? Explain in brief Question 2 What is JDBC? Explain Question 3 Write a short note on Expressions Question 4 What is an XML na

What is an immutable object? An immutable object is one that we can't change once it's created. Steps involved in creation of an immutable object are: Make all of its data f

Normal 0 false false false EN-US X-NONE X-NONE

How many bits are we used in Unicode, ASCII, UTF-16, and UTF-8 characters?