Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] SWRL Temporal built-in problem

Trina t.myers at
Tue Apr 24 22:32:45 PDT 2007

Hi All,

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:
Environment(?x)  ∧
Date_Time(?x, ?xDate)  ∧
Date_Time(?x, ?yDate)  ∧
differentFrom(?xDate, ?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 mailing list