Search Mailing List Archives
[protege-owl] SWRL Temporal built-in problem
t.myers at bigpond.net.au
Tue Apr 24 22:32:45 PDT 2007
Are there any further examples for the SWRL temporal built-ins besides the Wiki
and Martin's paper on querying time-oriented data? I have been trying the latest
implementation (build 395) and am not having a great deal of success with the
rules I am using (which is purely a lack of understanding on my part).
I am trying to compare the date_time properties of an 'Environment' class to
test if there has been a duration of 3 days. The rule I used was:
Date_Time(?x, ?xDate) ∧
Date_Time(?x, ?yDate) ∧
temporal:duration(3, ?xDate, ?yDate, temporal:Days)
→ tempBoolean(?x, true) **this being an arbitrary property to test the
The values of the Date_Time property has been set as:
(assert (Date_Time Environment_1 "2007-04-25T14:29:43"))
(assert (Date_Time Environment_3 "2007-04-17T14:54:42"))
(assert (Date_Time Environment_4 "2007-04-27T14:08:59"))
(assert (Date_Time Environment_2 "2007-04-28T14:30:20"))
(assert (Date_Time Environment_5 "2007-04-29T15:03:55"))
When I run Jess, nil properties are asserted. If I take out the differentFrom
restriction I get the same outcome.
If I use the temporal:equals instead of duration (just to test e.g.
temporal:equals(?xDate, ?yDate, temporal:Days), all 'tempBoolean' properties are
asserted to be true, even though they are all different dates.
Any advice would be appreciated
More information about the protege-owl