Protege not inferring subclasses of a class as domain - owl

I am getting a confusion with Protege. May be it is a setting that I should configure somewhere that I am not doing.
Suppose I have an object property hasFriend. The domain and range of this object property is both Person. Now Person has two subclasses: Man and Woman.
The problem is when I launches the reasoner, HermiT (default reasoner in Protege), I was expecting to see that it adds Man and Woman as domain and ranges for hasFriend since they are subclasses of Person.
Is there a particular why I am not seeing these inferences ?

Related

Inferring the existence of individuals using Protege

I am trying to infer the existence of individuals in Protege, and can use some help.
Consider the following ontology as the example scenario: Persons may be siblings. If they are siblings then they have at least one mutual/common parent.
I defined a class called "Person" with a subclass of "CommonParent". I define the "sibling" object property from one "Person" (Domain) to another "Person" (Ranges), and marked it as "Symmetric".
I created three individuals (Mike, Jerry, Suzie) and added two assertions about one being sibling to another. The reasoner (HermiT) correctly classified the individuals as persons and added missing sibling relations.
Now, what I want to do is to have the reasoner infer the existence of another (unnamed) entity being the "CommonParent" of each sibling pair (without me specifically asserting that there is such individual). Is this possible? How do I approach this?
Protege screenshot

OWL, adding a property to all instances of a class

I'm looking for a way to add an Object Property to all instances of a given class.
Example Problem:
Let's say I'd define three classes.
Religious_Person
Supreme_Being
Christian a subclass of Religious_Person.
Now I'd like to have an Object property "devotes" which has a domain of Religous_Person and a range of Supreme_Being.
I have three instances of Christian: Marck, Bob and Cathy.
I have one instance of Supreme_Being: God.
Now I'd like to state Marck devotes God, Bob devotes God, and Cathy devotes God. It seems tedious to do this for every instance, so I'd like to express that each instance of the class Christian devotes God by default. Now ofcourse this might be somewhat confusing as from this example it might seem that I'd want each and every Religious_Person to devote to only one Supreme_Being, which is not the case.
Example:
Let's say JackAndJillian is a Religious_Person that devotes both Jack and Jill. So I'd like each instance of JackAndJillian to devote both Jack and Jill (whom would both be instances of Supreme_Being).
It feels to me like "devotes" should be a object property of the class Christian, however this is not possible due to classes not having properties.
I'm using protege to help myself in building an ontology so if there'd be a way I can express this in protege that would be great.
You can use owl:hasValue in a SubClassOf axiom (in Manchester OWL syntax):
Class: Christian
SubClassOf: Religious_Person and devotes value God
There is no concept of default value in OWL. Inference in OWL is monotonic, thus, you cannot remove any statement by adding other statements.

Protege ontologies (OWL) : When to use object properties and when to use data properties

I'm having difficulties understanding when to use object properties and when to use data properties. I've read the definitions, but yet I'm having issues using them in a practical setting.
It would be of much help if anyone could correct the following example.
Let's say I'm making a Wine ontology, with some subclasses redWine, whiteWin, sparklingWine and so on. How will I then manage the properties for example goesWithFoodType, fromCountry and hasGrapeType? All in which have subproperties down the hierachy. Will all of these be data properties with the domain Wine and ranges xsd:string datatype?
If the things stated above is correct, would I have any use from object properties in my ontology?
Thanks.

OWL existential restrictions and Necessary conditions

I'm creating an ontology using protege05 and I have a question in regard to property restrictions. What I've understood from the protege tutorial is that when we assign a property to a class using restrictions, it means that this property is necessary for defining that class.
for example, suppose i have classes "Orthodox Church" and "Sanctuary" and a property "hasPart and i want to say that "an Orthodox Church hasPart Sanctuary".
If I use existential restriction apparently it will mean that "having Sanctuary" is necessary for a building to be an Orthodox Church or if a building is an Orthodox Church it must ALWAYS have a Sanctuary.(but it's not always correct).
so my question is that how should insert this property without it being necessary for defining my class? in other words, how can i say that this property is SOMETIMES correct for my class but not ALWAYS?
Thanks
You want to use Orthodox Church as domain for your property - so, when used, you will infer the building is a church. It won't stop you from creating churches without sanctuaries.
Without changing the domain, you could create a class with 'some hasPart Sanctuary' as a subclass of 'Orthodox Church' - a sufficient but not necessary condition.

Get TBox Axioms with OWL API

I'm working with a OWL API 3 / Pellet / SPARQL-DL stack and want to read the asserted TBox axioms of a certain class from an ontology.
I can easily access the axioms with OWL API. However, the OWLClassAxiom just provides function to access the signature without the connections. I.e. I want to know to which Class a ObjectProperty is assigned to. All I can retrieve is a set of all elements in the signature, without their connection.
It seems that OWL API does not really support working with given axioms on a class level well (Reading, not adding.) Or am I missing something? Any other ideas how to achieve that? (With whatever tools.)
Concrete Example: Pizza hasBase some PizzaTopping. I want to retrieve the value "PizzaTopping" by specifying Pizza and hasBase.
If Pizza is a class, then
Pizza hasBase some PizzaTopping
isn't a legal axiom. What you probably actually have is
Pizza subClassof hasBase some PizzaTopping
That means that every instance of Pizza is related to some instance of PizzaTopping by the hasBase property. The axiom is a subclass axiom, so you'd want to retrieve an instance of OWLSubClassOfAxiom, (which is a subclass of OWLClassAxiom).
In this case, if you have a reference to the OWLClass for Pizza, then you could use OWLClass#getSuperclasses() to get a list of superclass expressions. One of them would be an OWLObjectSomeValuesFrom expression for (hasBase some PizzaTopping). You'd have to look for the ones of that type, and then examine the property that it is a restriction on.
That said, your stated goal
to know to which Class a ObjectProperty is assigned to
doesn't quite match up with the OWL model. Object properties (and data properties) don't "belong" to classes in OWL. You can use subclass axioms and property restrictions, like above, to say that members of a class must have a value for a particular property,

Resources