Hello!
I'm still learning things. So far, so good - I've created a working POC in Protege and started to like how all this work.
Sadly I've hit a problem that I can't understand.
Here is a rough simplification of a part of my ontology:
classes:
1. PositiveVote, NegativeVote - both subclasses of Vote
2. PositiveVoteResult, NegativeVoteResult - both subclasses of VoteResult
VoteResult has object property "hasVote" which connects it to 0..many of Vote individuals(!!!)
What I want to accomplish is to make reasoner to set type (PositiveVoteResult, NegativeVoteResult) for an individual - according to types of all connected through hasVote individuals of class Vote
So, the individual's type should be:
1. type PositiveVoteResult if all its connected through hasVote are of type PositiveVote
2. type NegativeVoteResult if there is at least one NegativeVote connected through hasVote
So I added these cardinality restrictions to the "equivalent classes":
1. In NegativeVoteResult:
hasVote min 1 NegativeVote
this works flawlessly - after running reasoner individual's type is set to NegativeVoteResult if there is at least one NegativeVote
2. PositiveVoteResult - I cannot make this work...
I've tried
- hasVote max 0 NegativeVote
- disjunction
- other things in desperation mode...
All my tries leads at best to classify individual as Vote (the superclass) if there is no NegativeVote properties...
How can I make it to have PositiveVoteResult set properly?
Best regards,
Przemek