The following example differs from the previous example primarily because the superclasses “Person” and “Pet” are from a different package than their subclasses “Dog Lover” and “Dog,” respectively. This difference is reflected in the OWL ontology by the import of this namespace.
As shown below in the next diagram, the superclasses “Person” and “Pet”, defined in the package “Case 06”, are a different color and a lighter shade than the classes defined in the package “Case 07”. This color differentiation is to distinguish them from the classes defined on this diagram. MagicDraw’s AutoStyler plugin can automatically set the display properties for classes and other UML elements using the “defined elsewhere” style; that is, when they are shown on a non-defining diagram for the UML element (see Automatic Styling of Concept Models).
Figure 1: A class with universal quantification constraint on property II.
Ontology(<http://nomagic.com/ontology/example-case/case-07> Import(<http://nomagic.com/ontology/example-case/case-06>) Declaration( Class(<http://nomagic.com/ontology/example-case/case-06#Person>) ) Declaration( Class(<http://nomagic.com/ontology/example-case/case-06#Pet>) ) Declaration( Class(:Dog) ) Declaration( Class(:DogLover) ) Declaration( ObjectProperty(<http://nomagic.com/ontology/example-case/case-06#has>) ) AnnotationAssertion(rdfs:label :Dog "Dog"@en) SubClassOf(:Dog <http://nomagic.com/ontology/example-case/case-06#Pet>) AnnotationAssertion(rdfs:label :DogLover "Dog Lover"@en) SubClassOf(:DogLover <http://nomagic.com/ontology/example-case/case-06#Person>) SubClassOf( :DogLover ObjectAllValuesFrom(<http://nomagic.com/ontology/example-case/case-06#has> :Dog) ) )
Related Pages: