Mav
Mav

Reputation: 123

Multiple disjoint classes in rdf range constraint

I want to define multiple classes (with limited inferencing) as the range of an owl objecttypeproperty. Let me explain in detail by providing you an example.

I have two classes: Furniture and Device, which are not disjoint, i.e., another subclass/instance can inherit from both classes, e.g., Lamp can be a furniture and device.

Now I would like to define an OWL objecttypeproperty: hasComponent that can only accept range as either :Furniture or :Device, NOT both.

:hasComponent rdf:type owl:ObjectProperty ;
         rdf:type owl:TransitiveProperty ;
         rdfs:range :Furniture ,
                    :Device .

When I create an instance using the property:

:furniture1 rdf:type :furniture .
:device1 rdf:type :device .
:furtniture1 :hasComponent :lamp .

The inferencing engine will infer that :device1 is a :furniture, which I dont want, because I have already defined that device1 is a device.

One solution is to remove rdf:range and explicitly define the instance types, but I did not want to remove the range because it will limit the scope of the search space.

Upvotes: 0

Views: 1240

Answers (1)

Ignazio
Ignazio

Reputation: 10659

You have to create a union class of all the classes involved and subtract their intersection (example: ((Furniture or Device) and not (Furniture and Device))) and set that class as the range. The same approach needs to be used for domains.

You can declare this as a named class, or insert it (with the necessary RDF/XML structure around it) directly into the range axiom. I would think you'll probably need the same class in multiple places, so a named class might be the best solution.

Upvotes: 2

Related Questions