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.
I made the
hasType
as a functional property.I added an
Equivalent To
which is like this: hasType exactly 1 VehicleTypes
Is that enough please?
The following axiom is sufficient to guarantee that all the instances from the
Vehicle
class have one and just one instance ofVehicleTypes
(in Manchester syntax):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:
This can be useful if you use a reasoner that does not support cardinality restrictions, for instance.
Don't create your own vehicleType property and VehicleType class, just use
rdf:Type
andrdfs:subClassOf
:Then if you want to say that certain classes are disjunctive, use:
Making
hasType
functional is the right move since everyVehicle
can only have oneVehicleType
. However, you need to describeVehicle hasType exactly 1 VehicleType
as asubClassOf
relation rather thanequivalentTo
relation.Definition of subclass relation:
Definition of equivalent relation: