Hi All:

I have been trying to use the backward jena rule engine was not able to for
some reasons. I have already applied the forward one and works just fine.

Here is the code:

public class Ruleset {

private List<Rule> rules = null;

private GenericRuleReasoner reasoner = null;

public Ruleset (String rulesSource){

 this.rules = Rule.rulesFromURL(rulesSource);

 this.reasoner = new GenericRuleReasoner(rules);

 reasoner.setOWLTranslation(true);

 reasoner.setTransitiveClosureCaching(true);}

public InfModel applyto(Model mode){

  return ModelFactory.createInfModel(reasoner, mode);

}

 public static void main(String[] args) {

Ruleset rule = new Ruleset (rulepath);

  InfModel infmodel = rule.applyto(data.tdb);}


and here is my forward rule:

[test1: (?drug2 ddids:drug_is_metabolized_by_enzyme ddidd:C1176140)

->(?drug2 rdf:type ddids:hasInteraction)]

After running the rule above, I got result. However, when I tried to make
the same rule backward, I got nothing

[test2: (?drug2 rdf:type ddids:hasInteraction)

<-
(?drug2 ddids:drug_is_metabolized_by_enzyme ddidd:C1176140) ]

Am I doing something wrong here ?

Thanks

-- 
Adeeb Noor
Ph.D. Candidate
Dept of Computer Science
University of Colorado at Boulder
Cell: 571-484-3303
Email: [email protected]

Reply via email to