简体   繁体   中英

Multiple domains/ranges for object property

I am currently try to design an ontology but I am a new in this area. My ontology will have classes and object properties. No individual will be available.

I have an object property called Has . This property will have multiple domains and ranges. For example:

Student (Class Domain) Has (Object Property) Department (Class Range)

Mother (Class Domain) Has (Object Property) Child (Class Range)

Organisation (Class Domain) Has (Object Property) Department (Class Range)

I also expect more domains and ranges for the Has property to be added. I expect to have lot of object properties which will have multiple domains and ranges.

How to write Java code to store such information in an OWL file? Furthermore, I would like to know:

How to make a query to know how many domains and ranges a specific object property have and which domain matches which range?

How to write a code for finding does an object property has a specific triple? For example, Has (School, Department) . This triple means a School has a Department. If this triple is not available in the ontology, then I need to insert it into the ontology.

Declaring domains and ranges with OWL API is done by creating OWLObjectPropertyDomainAxiom and OWLObjectPropertyRangeAxiom objects.

However, from your description of the problem I do not think that multiple domains and ranges for the same property are the best modelling solution. It's probably a better choice to have multiple object properties with their own domain and range, using multiple ones only when required.

For examples see https://github.com/owlcs/owlapi/wiki/Documentation

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