Can a named constraint exist in OWL?

Is it possible to define a restriction as a named class? I mean, instead:

: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. 

This is normal?

+4
source share
2 answers

Yes, that’s absolutely normal. This is a bit unusual, but AFAIK does not do anything in the OWL specifications to keep the restrictions anonymous. In fact, naming them, as you suggest, makes it much easier to reuse constraints in multiple classes.

+5
source

Yes, you can name the constraints, just declare that the named class is equivalent to the constraint. There are many examples in the OWL documentation, such as

where you will find examples for example

 EquivalentClasses( :HappyPerson ObjectAllValuesFrom( :hasChild :HappyPerson ) ) EquivalentClasses( :NarcisticPerson ObjectHasSelf( :loves ) ) EquivalentClasses( a:DogOwner ObjectSomeValuesFrom( a:hasPet a:Dog ) ) 
0
source

Source: https://habr.com/ru/post/1392119/


All Articles