public void visitAccumulateDescr(final AccumulateDescr descr) { String tmpstr = new String(); tmpstr += this.template + " <from> <accumulate> "; if ( descr.isSinglePattern() ) { visitPatternDescr( descr.getInputPattern() ); } else { this.patternContext = false; visit( descr.getInput() ); } tmpstr += this.template; if ( descr.isExternalFunction() ) { AccumulateFunctionCallDescr func = descr.getFunctions().get( 0 ); tmpstr += "<external-function evaluator=\"" + func.getFunction() + "\" expression=\"" + func.getParams()[0] + "\"/>"; } else tmpstr += "<init>" + descr.getInitCode() + "</init><action>" + descr.getActionCode() + "</action><result>" + descr.getResultCode() + "</result>"; this.template = tmpstr + " </accumulate> </from> "; }
for ( AccumulateFunctionCallDescr fc : funcCalls ) { AccumulateFunction function = context.getConfiguration().getAccumulateFunction( fc.getFunction() ); if ( function == null ) { context.addError( new DescrBuildError( accumDescr, context.getRuleDescr(), null, "Unknown accumulate function: '" + fc.getFunction() + "' on rule '" + context.getRuleDescr().getName() + "'. All accumulate functions must be registered before building a resource." ) ); return null;
for ( AccumulateFunctionCallDescr func : functions ) { AccumulateFunction function = context.getConfiguration().getAccumulateFunction( func.getFunction() ); if ( function == null ) { context.addError( new DescrBuildError( accumDescr, context.getRuleDescr(), null, "Unknown accumulate function: '" + func.getFunction() + "' on rule '" + context.getRuleDescr().getName() + "'. All accumulate functions must be registered before building a resource." ) ); return null;