During this lab, you will manipulate an ontology in you source code to build a semantic-aware application. Namely, you will reuse the ontology you previously developped, to annotate a dataset produced by the city of Aarhus, Denmark. These data are collected from temperature sensors, and they are stored in CSV files, which is at 3 stars on the Linked Data hierarchy. You will convert it to 5-star data by using the ontology you built last lab.
To complete this lab, a codebase is provided. It’s a wrapper around one of the main libraries for manipulating the Semantic Web principles and technologies in Java : Apache Jena.
git clone https://framagit.org/nseydoux/iss-semantics-lab
mvn compile
mvn test
. The tests will fail, because nothing is implemented yet. These tests are unit tests, validating each functionnality that you have to develop. Try to run them as you go.The codebase that you cloned contains Java interfaces (functions specifications), namely IControlFunctions
and IModelFunctions
. These interfaces are implemented by the stubbed classes DoItYourselfModel
and DoItYourselfControl
. The functions to implement are of increasing complexity in order: the first one is the easiest, and as you progress you can reuse the previous elements you developped.
IModelFunction
Start by implementing IModelFunction
in DoItYourselfModel
. These functions provide knowledge-base related operations. To help you, you will find functions in the IConvenienceInterface
that wrap lower-level Jena functions and SPARQL queries.
After having written each functions, run the tests. You can read the code for the tests if you are unsure of what you should do.
The controller uses functions from the model, and uses them to enrich the dataset. Once you complete the interface implementation, go to the main function in the Controler class. You must edit some code snippets depending on your environment.