Can an named restriction exist in OWL?

210 Views Asked by At

Can we define a restriction as a named class? I mean, instead of using this:

:myclass owl:equivalentClass 
         [ rdf:type owl:Restriction ;
           owl:onProperty :hasAge ;
           owl:cardinality "2"^^xsd:nonNegativeInteger ] . 

to use this:

:myclass rdf:type owl:Restriction ;
         owl:onProperty :hasAge ;
         owl:cardinality "2"^^xsd:nonNegativeInteger.  

Is that ok?

2

There are 2 best solutions below

1
On

Yes, that's absolutely fine. It's a bit unusual perhaps, but AFAIK there is nothing in the OWL specs that forces restrictions to be anonymous. In fact, naming them like you suggest makes reuse of restrictions in multiple classes a lot easier.

3
On

Yes, you can give names to restrictions, just declare that a named class is equivalent to the restriction. There are plenty of examples in the OWL documentation, see e.g.

where you find examples like

EquivalentClasses(
    :HappyPerson 
    ObjectAllValuesFrom( :hasChild :HappyPerson )
)

EquivalentClasses(
    :NarcisticPerson 
    ObjectHasSelf( :loves ) 
)

EquivalentClasses(
    a:DogOwner
    ObjectSomeValuesFrom( a:hasPet a:Dog )
)