The Mapping Mechanism (5YC)
UML and the Protege knowledge model were designed for different (but related) purposes. There are several differences which do not allow a clean mapping without information loss. The most striking difference might be that UML does not handle attributes as first-class entities, whereas Protege slots can be arranged in an inheritance hierarchy. Furthermore, UML uses different modeling primitives to capture constraints, in particular the OCL language. We have not defined a mapping between any Protege constraints and OCL yet, so this information will be lost during the translation. (5YD)
- Each UML class is represented by one Protege class of the same name, and with the same role (i.e., abstract or not abstract). (5YE)
- These Protege classes are arranged in an inheritance hierarchy as represented in the UML model (UML allows for multiple inheritance). Since Protege does not support concepts such as "interfaces", all UML interfaces are handled as classes. (5YF)
- Each attribute of a UML class is represented by a slot of a suitable type. The new slot will have the name of the attribute, unless this name is already taken by a different slot (from another UML class) with a different type. In this case, the slot will be renamed to the format <attributeName>@<className>, which ensures unique slot names. (5YG)
- The new Protege slots get their multiplicity (allows multiple values or not) and the min and max cardinalities from the UML model. (5YH)
- During UML export, primitive slots (e.g., int, string and symbol) are converted to simple attributes that are attached to all UML classes where the slot is used. Non-primitive (instance) slots are translated into UML associations, whereby inverse slots are used to create bidirectional associations. (5YI)
- Metaclasses are recognized by means of the <<metaclass>> stereotype for classes. (5YJ)
Known Limitations (5YK)
- Instances are not exported. (5YL)
- There is no support for slots of the type CLS yet. (5YM)
- UML associations of a higher order (e.g., ternary relationships) have not been tested yet. (5YN)
- Overloaded slots are not recognized. (5YO)
- All classes from the UML model are derived from :STANDARD-CLASS, i.e. there is no support for other built-in metaclasses yet. (5YP)