简体   繁体   中英

Protege restrictions on class

I have created an ontology using Protege. I created an object property "IsMarriedWith" which is symmetric. I want to create a new class "Single" for not married individuals, i tried to add a restriction in Class expression editor by using this expression

not IsMarriedWith

But this doesn't work with me, so can i perform this with only the object property that i have?( i mean without adding a new object property called "Single")

You can define the Married and Single classes as follows:

Class: Married
SubClassOf:
   isMarriedWith exactly 1 Thing


Class: Single    
SubClassOf:
   isMarriedWith max 0 Thing

For the definition of Married I assumed a person is allowed to be married to only 1 other individual. This means that if you have an individual x that is married to 2 different individuals y and z , x will not be classified as being married. If you want to allow for a person being married to more than 1 individual you can use:

Class: Married
SubClassOf:
   isMarriedWith some Thing

For Single the number of individuals that an individual can be married to is set at maximum 0. To say that individual x is not married, you will need to specify:

Individual: x
Type: isMarriedWith max 0 Thing 

For further information you can visit my blog wrt Translating UML to OWL .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM