Most of inference engine support SWRL which allows user to add their own inference rules. However, In my context those users rules can require inferencing a blank nodes in the consequence side of the rule.
Jena provides makeTemp
a builtin method to do the work see details here.
Here is an example :
[r1: (?e1 st:runningTask st:gic_eth0), makeTemp(?p)
->
(?p rdf:type st:dataFromEthernet2IP) ]
My question is:
Does SWRL supports blank nodes inferencing in the consequence side of a rules ? The SWRL w3c says nothing about this particular situation.
The variables in SWRL rules take on values that are OWL individuals and RDF literals. A blank node cannot be an RDF literal, although a blank node could be an unnamed OWL individual. (I'm not sure whether SWRL will work with unnamed but declared individuals; it won't work with individuals that aren't declared (e.g., individuals whose existence can be inferred, but which don't actually have a declared representation.) In any case, SWRL variables won't be bound to just any arbitrary blank nodes.
The important insight here is that Jena rules work on RDF, which has a concept of URI node, blank nodes, and literals. SWRL rules work on OWL constructions. You don't actually need RDF in order to do OWL reasoning, and you can do SWRL reasoning without any underlying RDF representation. So if you're using SWRL, you shouldn't have to think about whether something is a blank node or not; OWL doesn't have blank nodes; blank nodes are an RDF construction.