I am currently messing around with Jena trying to create rules to add to my generic reasoner. I created the following simple rule:
[rule1: (?x ?rdf:type ?y),(?y rdfs:subClassOf ?z)-> (?x rdfs:type ?z)]
This works fine, and fires correctly, giving me everything I expect. After I did this I wanted to assign a timestamp to ?x
, so that I'd know when the conclusion was come to, I wanted to used the Now
builtin as follows.
[rule1: (?x ?rdf:type ?y),(?y rdfs:subClassOf ?z),now(?x)-> (?x rdfs:type ?z)]
This unfortunately does not work, it does nor throw an error, it just does not seem to bind any time value to ?x
and also it seems to prevent the rule from being fired correctly as in the first case. The ontology I am using is below. Any ideas?
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class rdf:about="livingthing"></owl:Class>
<owl:Class rdf:about="Human">
<rdfs:subClassOf rdf:resource="livingthing"/>
</owl:Class>
<rdf:Description rdf:about="john">
<rdf:type rdf:resource="Human"/>
</rdf:Description>
</rdf:RDF>