1 10 package com.hp.hpl.jena.reasoner.rulesys.builtins; 11 12 import com.hp.hpl.jena.reasoner.*; 13 import com.hp.hpl.jena.reasoner.rulesys.*; 14 import com.hp.hpl.jena.graph.*; 15 16 22 public class Table extends BaseBuiltin { 23 24 28 public String getName() { 29 return "table"; 30 } 31 32 40 public void headAction(Node[] args, int length, RuleContext context) { 41 InfGraph infgraph = context.getGraph(); 42 if (infgraph instanceof FBRuleInfGraph) { 43 for (int i = 0; i < length; i++) { 44 ((FBRuleInfGraph)infgraph).setTabled(args[i]); 45 } 46 } else if (infgraph instanceof LPBackwardRuleInfGraph) { 47 for (int i = 0; i < length; i++) { 48 ((LPBackwardRuleInfGraph)infgraph).setTabled(args[i]); 49 } 50 } else { 51 } 56 } 57 58 } 59 60 | Popular Tags |