public void buildFunction(Context cxt) { try { bindFunction(cxt) ; } catch (ExprException ex) { if ( WarnOnUnknownFunction ) ARQ.getExecLogger().warn("URI <"+functionIRI+"> has no registered function factory") ; } }
public void buildFunction(Context cxt) { try { bindFunction(cxt) ; } catch (ExprException ex) { if ( WarnOnUnknownFunction ) ARQ.getExecLogger().warn("URI <"+functionIRI+"> has no registered function factory") ; } }
@Override protected void accumulate(NodeValue nv, Binding binding, FunctionEnv functionEnv) { if ( nv.isNumber() ) { if ( total == null ) total = nv ; else total = XSDFuncOp.add(nv, total) ; } else ARQ.getExecLogger().warn("Evaluation error: sum() on "+nv) ; }
/** Set execution logging - logging is to logger "com.hp.hpl.jena.arq.exec" at level INFO. * An appropriate logging configuration is also required. */ public static void setExecutionLogging(Explain.InfoLevel infoLevel) { if ( InfoLevel.NONE.equals(infoLevel) ) { ARQ.getContext().unset(ARQ.symLogExec) ; return ; } ARQ.getContext().set(ARQ.symLogExec, infoLevel) ; if ( ! getExecLogger().isInfoEnabled() ) getExecLogger().warn("Attempt to enable execution logging but the logger '"+logExecName+"' is not logging at level INFO") ; }
@Override protected void accumulate(NodeValue nv, Binding binding, FunctionEnv functionEnv) { if ( DEBUG ) System.out.println("avg: "+nv) ; if ( nv.isNumber() ) { count++ ; if ( total == noValuesToAvg ) total = nv ; else total = XSDFuncOp.add(nv, total) ; } else { ARQ.getExecLogger().warn("Evaluation error: avg() on "+nv) ; throw new ExprEvalException("avg: not a number") ; } if ( DEBUG ) System.out.println("avg: ("+total+","+count+")") ; }