1 10 package com.hp.hpl.jena.reasoner.rulesys.builtins; 11 12 import com.hp.hpl.jena.reasoner.rulesys.*; 13 import com.hp.hpl.jena.graph.*; 14 15 21 public class MakeTemp extends BaseBuiltin { 22 23 27 public String getName() { 28 return "makeTemp"; 29 } 30 31 41 public boolean bodyCall(Node[] args, int length, RuleContext context) { 42 for (int i = 0; i < length; i++) { 43 if (!context.getEnv().bind(args[i], Node.createAnon())) return false; 44 } 45 return true; 46 } 47 48 49 58 public void headAction(Node[] args, RuleContext context) { 59 throw new BuiltinException(this, context, "can't do " + getName() + " in rule heads"); 61 } 62 } 63 64 | Popular Tags |