* Evaluates a function.
*/
public Value evaluate(FunctionCall node, BindingSet bindings)
throws ValueExprEvaluationException, StoreException
{
Function function = FunctionRegistry.getInstance().get(node.getURI());
if (function == null) {
throw new EvaluationException("Unknown function '" + node.getURI() + "'");
}
List<? extends ValueExpr> args = node.getArgs();
Value[] argValues = new Value[args.size()];
for (int i = 0, n = args.size(); i < n; i++) {
argValues[i] = evaluate(args.get(i), bindings);
}
return function.evaluate(tripleSource.getValueFactory(), argValues);
}