Bachelor en Informatique (professionnel) Semantic Web Serge Linckels http://www.linckels.lu/ Exercise 6 The goal of this exercise is to understand basic concepts of OWL. Part 1: OWL Consider the following definitions: V egetable v P izzaT opping V egetable(aubergine) P izzaT opping(tuna) P izza ≡ ∀hasT opping.P izzaT opping u ∃hasN ame.String 1. Write the OWL-file for the above definitions. see external file 2. Name the object properties and the datatype properties. object property: hasTopping datatype property: hasName 3. Name class definitions and individuals definitions. class definitions: Pizza (complete), Vegetable (incomplete) individuals: augergine, tuna 4. Define the property hasT opping as transitive and explain why it is transitive. Can this property also be symmetric, functional, or inverse functional? see external file for code. No, this property cannot be functional or inverse functional. Example: hasT opping(P izzaV egi, T una) ∧ hasT opping(Aubergine, T una) would mean: P izzaV egi = Aubergine (which is not true). 5. Explain the use of both quantifiers, universal (∀) and existential (∃) in the last definition. A pizza can only have PizzaTopping-toppings. A pizza has at least one textual name. 6. What changes must be added to the above definitions in order to guarantee that the class P izza does not share any elements with the class P izzaT opping? P izza ≡ ¬P izzaT opping 7. Create the pizza P izzaT una with its toppings tuna and aubergine. P izza(P izzaT una) hasT opping(P izzaT una, tuna) hasT opping(P izzaT una, aubergine) 8. Define the class V egP izza which has only vegetables as toppings. V egP izza ≡ P izza u ∀hasT opping.V egetable 9. Create the pizza P izzaV egi with its topping aubergine. V egP izza(P izzaV egi) hasT opping(P izzaV egi, aubergine) 1 Bachelor en Informatique (professionnel) Semantic Web Serge Linckels http://www.linckels.lu/ Part 2: Jena Framework (optional) Use the Jena Framework to develop a Java application using the above serialized OWL file. Create an application that allows to perform the following steps: • Load the OWL file. • Display the available pizzas with their respective toppings. • Create the pizza pizzaT unaOnly with its topping tuna. 2
© Copyright 2026 Paperzz