Exercise 06: UML-GML Encoding

In this exercise you will model a UML class diagram and then derive an XML Schema from the modelled diagram using the Encoding Rules from Lecture 08

Note

While digital documents are accepted as submission, we request that you try to solve the exercise manually on a sheet of paper, as you will also be required to solve a similar task manually in the exam.

Exercise Task

The exercise consists of 3 subtasks

  1. Creating a UML Diagram for the scenario described.

  2. Adding OCL constraints to the model using the lessons learnt from Lecture 01 and Exercise 01.

  3. Write the XML Schema derivation for the required classes using the GML concepts described in Lecture 09

SubTask 1: Modelling a class diagram in UML

Your task is to create a UML model of a hiking map which defines the following information:

  • The hiking map consists of hiking paths and cabins.

  • The hiking paths are spatially represented as lines and are, in addition, characterised by an identifier, the level of difficulty, and the length.

  • All cabins are located along hiking paths and their position is provided as a point. Furthermore, the cabins are characterised by the name of the owner and additional offers. Additional offers are shop, guesthouse, and restaurant. This list cannot be extended.

  • At least one cabin must be located along each hiking path.

Note

The geometry classes from ISO 19107 and the object classes from ISO 19103 are to be used in the model along with the relevant stereotypes for each class.

SubTask 2: Adding OCL constraints to the class diagram

The following constraint always needs to be valid for the map

  • When a hiking path is longer than 50 km, then a minimum of two cabins need to be located along the hiking path.

SubTask 3: GML application schema

Derive an XML Schema for the above created UML Diagram.

Note

Namespaces can be omitted. Small syntax errors are not assessed, as long as the representation is uniquely interpretable.

Submission

Please submit the above tasks as a

  • screenshot/scan - if done manually (please note that everything is legible).

  • document - as a .doc, .pdf if done digitally.

Note

Please submit before 16.07.2024. All submissions before the due date will recieve feedback in Moodle. We will have a discussion about the exercise solution on 16.07.2024 and any submissions beyond this date will have to be self-evaluated by comparing to the solution posted on Moodle.