2

I am building an Ontology.

I have a Class called Vehicle

I have an Object Property called hasType

I have a Class called VehicleTypes

How can I force all the instances from Vehicle class to have one and just one instance of VehicleTypes

What I have tried

I am working on Protege.

  1. I made the hasType as a functional property.

  2. I added an Equivalent To which is like this: hasType exactly 1 VehicleTypes

Is that enough please?

Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
  • possible duplicate of [Object property instance on class?](http://stackoverflow.com/questions/29276563/object-property-instance-on-class) – Joshua Taylor Apr 07 '15 at 01:36

3 Answers3

0

Making hasType functional is the right move since every Vehicle can only have one VehicleType. However, you need to describe Vehicle hasType exactly 1 VehicleType as a subClassOf relation rather than equivalentTo relation.

Definition of subclass relation:

if the class description C1 is defined as a subclass of class description C2, then the set of individuals in the class extension of C1 should be a subset of the set of individuals in the class extension of C2.

Definition of equivalent relation:

links a class description to another class description. The meaning of such a class axiom is that the two class descriptions involved have the same class extension (i.e., both class extensions contain exactly the same set of individuals).

Artemis
  • 3,271
  • 2
  • 20
  • 33
  • In a clearer way, if you use `equivalent To` relation between `Vehicle` and `hasType exactly 1 VehicleType`, then any instance which has exactly one `VehicleType` as a property is an instance of `Vehicle`. – justhalf Apr 21 '15 at 07:27
0

The following axiom is sufficient to guarantee that all the instances from the Vehicle class have one and just one instance of VehicleTypes (in Manchester syntax):

Class: Vehicle
    SubClassOf: hasType exactly 1 VehicleType

This, in fact, is the minimal ontology that guarantees it. If you do not need to be minimal, you can also enforce it with the following:

ObjectProperty: hasType
    Characteristics: Functional
Class: Vehicle
    SubClassOf: hasType some VehicleType

This can be useful if you use a reasoner that does not support cardinality restrictions, for instance.

Antoine Zimmermann
  • 5,314
  • 18
  • 36
0

Don't create your own vehicleType property and VehicleType class, just use rdf:Type and rdfs:subClassOf:

:Car rdfs:subClassOf  :Vehicle.
:Boat rdfs:subClassOf :Vehicle.

Then if you want to say that certain classes are disjunctive, use:

:Car owl:disjointWith :Boat.
Konrad Höffner
  • 11,100
  • 16
  • 60
  • 118