Is it possible to fire Java methods from Jena SWRL Rules
I am working on a Performance analysis on Ontology based Context Management and Process based Context Management. However, in order to create a similar scenario with the PCM case study, I am required to fire Java methods directly from Jena SWRL Rules during reasoning. I have made a lot of research to no avail but my professor claims i开发者_如何学运维t is possible with Jena. For Example,
Forward(vpnAccess)<--hasChain(vpnAccess,Forward)^
hasExternalInterface(vpnAccess,eth1)^
hasSrcIP(vpnAccess,ip4.3.2.1)^
hasDstIP(vpnAccess,ip1.2.3.4)^
hasProtocol(vpnAccess,tcp)^
hasDstPort(vpnAccess,portVPN)^
hasTarget(vpnAccess,acceept)
Where Forward is a java class method:
public static void Forward(String eth1,String Chain,Ip SrcIpAddr,Ip DestIpAddr,.. )
{......
.......}
There is a brief tutorial on using "Pellet + OWLAPI + SWRL Rules" you can read it.
精彩评论