The page for the lectures can be found here.
This page contains the schedule and contents of the lab exercises, part of the course Semantic Web Technologies.
Please send your solutions for the exercises by email to debruijn AT inf.unibz.it. The format for the solutions is mentioned under the heading Output for each exercise.
The exercises may be done in a group. Please indicate so when submitting the solutions for an exercise.
The lab exercises are mandatory. The exercises will be graded, and will make up 34% of the overall mark, if the average grade for the exercises is higher than the grade of the exam.
The final deadline for all lab exercises is May 30, 2007. However, the exercises will help to better understand the lecture material, and the output of each exercise will typically be used in the next exercise. And therefore, it is beneficial to the students to complete exercises as soon as possible
The goal of the lab exercises is to give you hands-on experience in using Semantic Web Technologies. The tools we use in the labs are Protege, an ontology modeling tool, Jena, a Java framework for RDF and OWL, and FLORA-2, an F-Logic reasoner based on XSB.
The lab exercises will be on Wednesdays from 17:00-19:00 in computer room E431, on March 28, April 18, May 2, May 9 and May 16, and in seminar room E420 on May 23.
Model an ontology according to the methodology in the paper: Ontology Development 101. The domain to model is the university domain. Model universities, faculties, courses, university employees, professors, students, etc. Follow the steps in the paper for creating the ontology, and pay special attention to the competency questions in the first step of the methodology. Optionally, include also some instance information; include at least the university of Bolzano, yourself, a number of courses and a number of professors you know at the university, and the relations between them.
Use the Protege tool for creating the ontology with RDFS. Save the project as RDF files and have a look inside. You will see an RDFS file which contains the ontology and an RDF file which contains the instance data.
Protégé allows to model several features which are not present in RDFS. As these features will not be exported, when saving the project as RDF files, you should stick to the features offered by RDFS when modeling your ontology (see pages 5 and 6 of the lecture 2 slides)
Make sure to create an "RDF Files" project in Protege. The output
consists of all the files generated by Protege.
Make sure to select "plain RDF" when saving the project.
The output of the exercise consists of the RDF and RDFS files included in the project, as well as the list of competency questions you originally formulated in the first step of the methodology.
Use Jena to query your ontology. Find a simple introduction into using Jena to query SPARQL here.
You can use the ARQ command line utilities to test SPARQL queries. You may have to download the ARQ distribution separately to obtain the command line utilities.
Create a Java application to query your ontology (both RDF and RDFS files). Issue (variants of) the following queries:
The output of the exercise consists of the java sources which you used to query the ontology, the queries in a separate file, the RDF files, and, finally, a file containing the query results. Please include some comments in the query files to indicate what the query is meant to do.
Use the OWL functionality of Protege to extend your ontology with constraints and Boolean class combinations.
In order to use the full OWL functionality of Protege, follow the following steps:
Extend the universities using property restrictions and boolean conclusions as you see fit. Make sure you use at least some cardinality restrictions, some existential and universal restrictions and some boolean combinations.
The OWL files of the ontology.
Use the Jena 2 ontology API to manipulate your ontology using a Java program:
Create an F-Logic ontology and use FLORA-2 to reason over this ontology. Consult the FLORA-2 manual to check the actual syntax and the commands to use for loading F-Logic files into FLORA-2 and executing these queries.
Model the following information using FLORA-2 F-Logic syntax:
Write queries to check the following:
Make sure the programs use the extension flr, e.g. myOntology.flr. Load the program in flora using flLoad myOntology. Execute query by entering the body of the query, following by a dot '.', e.g. ?- X:person.
Any term starting with a capital is a variable! Object identifiers start with a lower-case letter!
End every fact and every rule with a dot '.'!
Find an example program here. Queries you might want to try are ?- X:person. and ?- X:singleParent. Find example output for the query ?- X:person. here
Use FLORA-2 to model ontologies and services and implement a simple discovery mechanism. A simple services ontology in which services and goals can be described using categories and preconditions/effects can be found here.
The example file also contains services categories in the areas of book selling and computer selling. Additionally, a number of preconditions and effects are given. For simplicity, conditions are simply constants organized in a hierarchy using ::.
The example file additionally contains an example goal description and an example service description, as well as a simple matching mechanism based on categories. You will see that the example goal and service match.
Overview of course material for exam
To give an idea of the questions asked at the exam, there is a test exam.