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] Duration of Years Months Days Hours (or time)

Martin O'Connor martin.oconnor at stanford.edu
Fri Jan 25 11:47:35 PST 2008


There was a similar question recently:

http://www.nabble.com/Calculating-duration-using-SWRL-built-in-swrlb:subtractDates-td14842371.html

As mentioned there, the core SWRL date built-ins will not be available 
until February.

However, if you want to access the current time the core built-ins do 
not provide access to it. The SWRLTab temporal library [1] will shortly 
support it. For example, you will be able to write:

Person(?x) ^ hasBirthDate(?x, ?y) ^ swrlb:duration(?age, ?y, 'now', 
temporal:Years) → sqwrl:select(?x, ?age)

Martin

[1] http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTemporalBuiltIns

Matsokis Aristeidis wrote:

> Dear All,
>
> I am new in the protégé society…
>
> I have been working on an ontology describing a product and its 
> components.
>
> For each component I am interested into knowing up to the hour time of 
> its working hours to track several values. I have given them a 
> datatype property birthDateTime and another one currentYearDateTime 
> with xsd: date time as range.
>
> I have tried this:
>
> name(?x, ?n) ∧ birthDateTime(?x, ?y) ∧ currentDateTime(?x, ?z) ∧ 
> swrlb:subtractDatetimesYieldingDayTimeDuration(?age, ?z, ?y) → 
> sqwrl:select(?x, ?n, ?y, ?z, ?age)
>
> My aim is to:
>
> 1. Exact duration in the form Years Months Days Time
>
> 2. Renew currentDateTime automatically (optional)
>
> Could anyone help me?
>
> Any suggestion is welcome, thanks a lot in advance!
>
> Aristeidis
>
> *Aristeidis MATSOKIS*
> PhD Student- Research Assistant
> EPFL STI-IPR-LICP
> ME A1 380 (Bâtiment ME)
> Station 9
> CH-1015 Lausanne
> Switzerland
> TEL: +41 21 693 4359
> FAX: +41 21 693 3553
> Mob: +41 76 232 0873
>
>------------------------------------------------------------------------
>
>_______________________________________________
>protege-owl mailing list
>protege-owl at lists.stanford.edu
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  
>




More information about the protege-owl mailing list