Package org.openrdf.query.algebra.evaluation.function

Examples of org.openrdf.query.algebra.evaluation.function.Function


   * 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);
  }
View Full Code Here


   * Evaluates a function.
   */
  public Value evaluate(FunctionCall node, BindingSet bindings)
    throws ValueExprEvaluationException, QueryEvaluationException
  {
    Function function = FunctionRegistry.getInstance().get(node.getURI());

    if (function == null) {
      throw new QueryEvaluationException("Unknown function '" + node.getURI() + "'");
    }

    List<ValueExpr> args = node.getArgs();

    Value[] argValues = new Value[args.size()];

    for (int i = 0; i < args.size(); i++) {
      argValues[i] = evaluate(args.get(i), bindings);
    }

    return function.evaluate(tripleSource.getValueFactory(), argValues);
  }
View Full Code Here

TOP

Related Classes of org.openrdf.query.algebra.evaluation.function.Function

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.