/**
*
*/
package com.hp.jena.rules.functions.jena2;
import java.util.List;
import com.hp.jena.graph.Node;
import com.hp.jena.rules.functions.ApplyableBase;
import com.hp.jena.rules.retelike.impl.Bindings;
import com.hp.jena.rules.retelike.impl.ExecContext;
public class NoValue extends ApplyableBase
{
protected final List<Node> nargs;
public NoValue( List<Node> nargs )
{ this.nargs = nargs; }
@Override public boolean evalBool( ExecContext c, Bindings<Node, Node> item )
{
Node S = eval( item, nargs.get(0) );
Node P = nargs.size() < 2 ? Node.ANY : eval( item, nargs.get(1) );
Node O = nargs.size() < 3 ? Node.ANY : eval( item, nargs.get(2) );
return !c.contains( S, P, O );
}
}