1 10 package com.hp.hpl.jena.reasoner.rulesys.builtins; 11 12 13 import com.hp.hpl.jena.reasoner.rulesys.*; 14 import com.hp.hpl.jena.graph.*; 15 import java.util.*; 16 17 26 public class ListMapAsObject extends BaseBuiltin { 27 28 32 public String getName() { 33 return "listMapAsObject"; 34 } 35 36 39 public int getArgLength() { 40 return 3; 41 } 42 43 52 public void headAction(Node[] args, int length, RuleContext context) { 53 checkArgs(length, context); 54 Node n0 = getArg(0, args, context); 55 Node n1 = getArg(1, args, context); 56 Node n2 = getArg(2, args, context); 57 List l = Util.convertList(n2, context); 58 for (Iterator i = l.iterator(); i.hasNext(); ) { 59 Node x = (Node)i.next(); 60 context.add( new Triple(n0, n1, x)); 61 } 62 } 63 64 } 65 66 67 | Popular Tags |