Currently I'm developing an ontology to represent preferences that a specific user may have about something. For example, the user may have an MediaVolumeLevel
preference set to VolumeLevel_3
.
The different levels (individuals of the class MediaVolumeLevel
) are:
VolumeLevel_1, VolumeLevel_2, VolumeLevel_3 and VolumeLevel_4
.
The user and the Preference are linked by the objectProperty hasMediaVolumeLevelPreference
.
The objectProperty assertion need to be inferred from other User aspects through SWRL rules. For example, if the user has a hearing difficulty, the MediaVolumeLevel
needs to be set to VolumeLevel_4.
So:
User(?u), hasDifficulty(?u,Hearing) -> hasMediaVolumeLevelPreference(?u,VolumeLevel_4)
This is working fine. But, since I have other SWRL rules that also infer the MediaVolumeLevel
for the same users, such as:
User(?u), hasContext(?u,NoisyRoom) -> hasMediaVolumeLevelPreference(?u, VolumeLevel_3)
and SWRL supports monotonic inference only, the reasoner will assert both VolumeLevels (VolumeLevel_4
and VolumeLevel_3
).
What I need is a rule that, somehow, will only assert the preference if there's no higher level already asserted. In the given example, even if hasContext(?u,NoisyRoom)
is true, the only asserted level should be VolumeLevel_4
because other rule asserted it.
Any advices on this? Is what I want possible using SWRL? I'm using Protege 4.3 and Pellet Reasoner
Thanks, MFV.