ontologyprotegedescription-logicobject-properties

Restriction on object property ontology in Protege


I have created an ontology in Protege 5.2 and now I am trying to create correctly the object properties of my corresponding classes. Here is a snippet of my UML diagram according to which I have built my ontology: Snippet of my ontology

Regarding the isLocated object property, they are characterized in the following way: If a Node X has a SITE value Z, and the same value Z appears in SITEIST of a Location Y, then Node X is Located in Location Y.

Should I look into SWRL rules or is there some way to encode this without having to go there?

Thank you guys in advance!


Solution

  • In SWRL you can achieve that straightforward:

    locationHasSiteIst(?l, ?s) ^ nodeHasSite(?n, ?s) -> nodeLocatedInLocation(?n, ?l)
    

    If you want yo make it in OWL, you need to make locationHasSiteIst and nodeHasSite as object properties, and Site as a class instead of a datatype, then you can use object property chaining and inclusion in Protege as follows:

    nodeHasSite o inverse(locationHasSiteIst) SubPropertyOf nodeLocatedInLocation
    

    The last line means that if a node n1 is located in site1, and a location l1 is located in s1 as well, then n1 is located in l1.