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.util.PrintUtil; 14 import com.hp.hpl.jena.graph.*; 15 16 22 public class Print extends BaseBuiltin { 23 24 28 public String getName() { 29 return "print"; 30 } 31 32 42 public boolean bodyCall(Node[] args, int length, RuleContext context) { 43 print(args, length, context); 44 return true; 45 } 46 47 48 55 public void headAction(Node[] args, int length, RuleContext context) { 56 print(args, length, context); 57 } 58 59 62 public void print(Node[] args, int length, RuleContext context) { 63 for (int i = 0 ; i < length; i++) { 64 System.out.print( PrintUtil.print(getArg(i, args, context)) + " "); 65 } 66 System.out.println(""); 67 } 68 } 69 70 | Popular Tags |