/** * This method is invoked when the builtin is called in a rule head. * Such a use is only valid in a forward rule. * @param args the array of argument values for the builtin, this is an array * of Nodes. * @param length the length of the argument list, may be less than the length of the args array * for some rule engines * @param context an execution context giving access to other relevant data */ @Override public void headAction(Node[] args, int length, RuleContext context) { checkArgs(length, context); List<Node> l = Util.convertList(args[0], context); for ( Node x : l ) { for ( Node y : l ) { if ( !x.sameValueAs( y ) ) { context.add( new Triple( x, OWL.differentFrom.asNode(), y ) ); } } } }
/** * This method is invoked when the builtin is called in a rule head. * Such a use is only valid in a forward rule. * @param args the array of argument values for the builtin, this is an array * of Nodes. * @param length the length of the argument list, may be less than the length of the args array * for some rule engines * @param context an execution context giving access to other relevant data */ @Override public void headAction(Node[] args, int length, RuleContext context) { checkArgs(length, context); List<Node> l = Util.convertList(args[0], context); for ( Node x : l ) { for ( Node y : l ) { if ( !x.sameValueAs( y ) ) { context.add( new Triple( x, OWL.differentFrom.asNode(), y ) ); } } } }
/** * This method is invoked when the builtin is called in a rule head. * Such a use is only valid in a forward rule. * @param args the array of argument values for the builtin, this is an array * of Nodes. * @param length the length of the argument list, may be less than the length of the args array * for some rule engines * @param context an execution context giving access to other relevant data */ @Override public void headAction(Node[] args, int length, RuleContext context) { checkArgs(length, context); Node n0 = getArg(0, args, context); Node n1 = getArg(1, args, context); Node n2 = getArg(2, args, context); List<Node> l = Util.convertList(n2, context); for ( Node x : l ) { context.add( new Triple( n0, n1, x ) ); } }
/** * This method is invoked when the builtin is called in a rule head. * Such a use is only valid in a forward rule. * @param args the array of argument values for the builtin, this is an array * of Nodes. * @param length the length of the argument list, may be less than the length of the args array * for some rule engines * @param context an execution context giving access to other relevant data */ @Override public void headAction(Node[] args, int length, RuleContext context) { checkArgs(length, context); Node n0 = getArg(0, args, context); Node n1 = getArg(1, args, context); Node n2 = getArg(2, args, context); List<Node>l = Util.convertList(n0, context); for ( Node x : l ) { context.add( new Triple( x, n1, n2 ) ); } }
/** * This method is invoked when the builtin is called in a rule head. * Such a use is only valid in a forward rule. * @param args the array of argument values for the builtin, this is an array * of Nodes. * @param length the length of the argument list, may be less than the length of the args array * for some rule engines * @param context an execution context giving access to other relevant data */ @Override public void headAction(Node[] args, int length, RuleContext context) { checkArgs(length, context); Node n0 = getArg(0, args, context); Node n1 = getArg(1, args, context); Node n2 = getArg(2, args, context); List<Node>l = Util.convertList(n0, context); for ( Node x : l ) { context.add( new Triple( x, n1, n2 ) ); } }
/** * This method is invoked when the builtin is called in a rule head. * Such a use is only valid in a forward rule. * @param args the array of argument values for the builtin, this is an array * of Nodes. * @param length the length of the argument list, may be less than the length of the args array * for some rule engines * @param context an execution context giving access to other relevant data */ @Override public void headAction(Node[] args, int length, RuleContext context) { checkArgs(length, context); Node n0 = getArg(0, args, context); Node n1 = getArg(1, args, context); Node n2 = getArg(2, args, context); List<Node> l = Util.convertList(n2, context); for ( Node x : l ) { context.add( new Triple( n0, n1, x ) ); } }