This content has been marked as final. Show 3 replies
Please clarify a bit more. Do you want to calculate the difference between two times and then use the delta in an inferred triple?
yes, that is. in SWRL it's easy to write the rule
hasStartTime(?e, ?t1) ∧
hasEndTime(?e, ?t2) ∧
temporal:duration(?d, ?t1, ?t2, temporal:Minutes)
→ hasDuration(?e, ?d)
?d is return value in a minute .
For this kind of rules that generate new URIs or literals, there is no direct support yet. However, you can do the following.
Assume you have a model named A, let's create a new empty model called B.
1) Now run OWLPrime (or RDFS etc) inference using A and B together.
2) Insert into model B with the results, (e hasDuration d), coming from a SEM_MATCH based SQL that implements your rule. Depending on your application logic, you may want to repeat 1) and 2) till a closure
You may also be able to leverage the incremental inference feature as an optimization.