Shivika P
Shivika P

Reputation: 125

How does OWL2-RL handle date comparisons?

Is it possible to do "greater than date" that gets inferred by OWL2-RL in GraphDB? For ex: "Alice on date after 2024-02-10".

So for example:

:AliceTravelAfterToday a rdfs:Class ;
    rdfs:subClassOf :Person ;
    owl:equivalentClass [
        a owl:Class ;
        owl:intersectionOf (
            [ a owl:Class ;
              owl:oneOf ( :Alice ) ]
            [ a owl:Restriction ;
              owl:onProperty :canTravel ;
              owl:someValuesFrom [
                  owl:onDatatype xsd:date ;
                  owl:withRestrictions ( [ xsd:minExclusive "2024-02-10"^^xsd:date ] )
              ]
            ]
        )
    ] .

I have had no success with xsd:minExlusive or minInclusive with OWL2-RL on GraphDB.

Clarification: I'm fine with not using "today" as the date - that was more of a placeholder in my previous example (now edited to a date). I'm more interested in learning if

  1. OWL2-RL can infer minInclusive/maxInclusive (has anyone had success with implementing it)
  2. It can handle dates (like before or after)
  3. It can compare dates using minInclusive (ex: any date after "X" date)

Upvotes: 1

Views: 62

Answers (1)

Sissa
Sissa

Reputation: 31

OWL2 RL reasoning in GraphDB cannot dynamically compare against today's date because it does not support procedural logic or built-in functions like NOW(). The best approach is to handle this logic at the application level by precomputing the date or using SPARQL filtering to dynamically evaluate date conditions.

GraphDB 10.8 documentation

Upvotes: 1

Related Questions