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

Assignment Help:

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...


Related Discussions:- Query example in sparql - java and jena api

Session scope and Request scope, What is the difference among session scope...

What is the difference among session scope and request scope when saving formbean? Ans) When the scope is request, the values of formbean would be there for the current request.

Create an applet for the central museum, 1) Central museum is one of the fa...

1) Central museum is one of the famous tourist places in london. They ask comments from every customer visiting them.  For that, they maintained one register to store visitor;s com

Give an example for passing arguments to methods, Give an example for Passi...

Give an example for Passing Arguments to Methods ? class Car { String licensePlate = ""; // e.g. "New York 543 A23" double speed = 0.0; // in kilometers per h

Vehicle loan application - weblogic administrator, Vehicle Loan Application...

Vehicle Loan Application: Type                                         Web-based Application Role                                          Weblogic administrator + develop

What type of operations takes place inside microprocessors, What type of op...

What type of operations takes place inside Microprocessors Building Blocks? Enlist them along with brief description. Bus Interface Unit: The bus interface unit is the part o

Annotation or attribute oriented programming? , Annotation or Attribute ori...

Annotation or Attribute oriented programming There are two types of code generation processes. Passive code generation: is template driven . Input process are used in mo

Develop wechat program to integrate with sugarcrm, Wechat and SugarCRM P...

Wechat and SugarCRM Project Description: Seeking the partner able to develop wechat program to integrate with SugarCRM. Wechat Official Account able to perform some functi

Virtual function, What is virtual function? While derived class override...

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

Need sms application server, Project Description: A java application is ...

Project Description: A java application is required with the subsequent features 1. Ability to use GSM Modem (and/or Mobile phones) or SMPP to send and receive SMS messages

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd