Processes the specified rule input with each rule, and processes the result of all rules, all at once, with each
result handler.

@param ruleInput Rule input to be validated.
13571
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals)
    private void processAllRulesWithEachResultHandler(RI ruleInput) {
        // For each rule
        List<Object> combinedRulesOutput = new ArrayList<Object>(rules.size());
        for (Rule<RI, RO> rule : rules) {
            // Validate the data and get the rule output
            Object data = rule.validate(ruleInput);

            // Transform the rule output
            if (ruleOutputTransformers != null) {
                for (Transformer transformer : ruleOutputTransformers) {
                    data = transformer.transform(data);
                }
            }

            // Put the transformed rule output in a list
            combinedRulesOutput.add(data);
        }

        // Transform the list of transformed rule output to result handler input
        Object ruleOutput = combinedRulesOutput;
        if (resultHandlerInputTransformers != null) {
            for (Transformer transformer : resultHandlerInputTransformers) {
                ruleOutput = transformer.transform(ruleOutput);
            }
        }
        RHI resultHandlerInput = (RHI) ruleOutput;

        // Process the result handler input with the result handlers
        processResultHandlers(resultHandlerInput);
    }
943613
private void postProcess(ProcessMethodCallback callback, TransactionContext txContext,
                           InputDatum input, ProcessMethod.ProcessResult result) {
    InputContext inputContext = input.getInputContext();
    Throwable failureCause = null;
    FailureReason.Type failureType = FailureReason.Type.IO_ERROR;
    try {
      if (result.isSuccess()) {
        // If it is a retry input, force the dequeued entries into current transaction.
        if (input.getRetry() > 0) {
          input.reclaim();
        }
        txContext.finish();
      } else {
        failureCause = result.getCause();
        failureType = FailureReason.Type.USER;
        txContext.abort();
      }
    } catch (Throwable e) {
      LOG.error("Transaction operation failed: {}", e.getMessage(), e);
      failureType = FailureReason.Type.IO_ERROR;
      if (failureCause == null) {
        failureCause = e;
      }
      try {
        if (result.isSuccess()) {
          txContext.abort();
        }
      } catch (Throwable ex) {
        LOG.error("Fail to abort transaction: {}", inputContext, ex);
      }
    }

    try {
      if (failureCause == null) {
        callback.onSuccess(result.getEvent(), inputContext);
      } else {
        callback.onFailure(result.getEvent(), inputContext,
                           new FailureReason(failureType, failureCause.getMessage(), failureCause),
                           createInputAcknowledger(input));
      }
    } catch (Throwable t) {
      LOG.error("Failed to invoke callback.", t);
    }
  }
136783
@PostConstruct
    public void process() {
        Collection<BeanDefinition<?>> filterDefinitions = beanContext.getBeanDefinitions(Qualifiers.byStereotype(Filter.class));
        for (BeanDefinition<?> beanDefinition : filterDefinitions) {
            if (HttpClientFilter.class.isAssignableFrom(beanDefinition.getBeanType())) {
                // ignore http client filters
                continue;
            }
            String[] patterns = beanDefinition.getValue(Filter.class, String[].class).orElse(null);
            if (ArrayUtils.isNotEmpty(patterns)) {
                HttpMethod[] methods = beanDefinition.getValue(Filter.class, "methods", HttpMethod[].class).orElse(null);
                String first = patterns[0];
                FilterRoute filterRoute = addFilter(first, () -> beanContext.getBean((Class<HttpFilter>) beanDefinition.getBeanType()));
                if (patterns.length > 1) {
                    for (int i = 1; i < patterns.length; i++) {
                        String pattern = patterns[i];
                        filterRoute.pattern(pattern);
                    }
                }
                if (ArrayUtils.isNotEmpty(methods)) {
                    filterRoute.methods(methods);
                }
            }
        }
    }
639310
public void process(GrayS32 input , GrayS32 output , GrowQueue_I32 regionMemberCount ) {
		// initialize data structures
		this.regionMemberCount = regionMemberCount;
		regionMemberCount.reset();

		setUpEdges(input,output);
		ImageMiscOps.fill(output,-1);

		// this is a bit of a hack here.  Normally you call the parent's init function.
		// since the number of regions is not initially known this will grow
		mergeList.reset();

		connectInner(input, output);
		connectLeftRight(input, output);
		connectBottom(input, output);

		// Merge together all the regions that are connected in the output image
		performMerge(output, regionMemberCount);
	}
300090
public function process()
    {
        $rule = $this->getComponent();
        $context = $this->getContext();

        $processor = $this->getRuleProcessorFactory()->createProcessor($rule);
        $processor->setState($context);
        $processor->process();

        $this->trace($rule->getQtiClassName());
    }
71002
public void setInput( I input ) {
		this.inputImage = input;

		// reset the state flag so that everything need sto be computed
		if( stale != null ) {
			for( int i = 0; i < stale.length; i++) {
				boolean a[] = stale[i];
				for( int j = 0; j < a.length; j++ ) {
					a[j] = true;
				}
			}
		}
	}
72973
public void setRules(java.util.Collection<Rule> rules) {
        if (rules == null) {
            this.rules = null;
            return;
        }

        this.rules = new java.util.ArrayList<Rule>(rules);
    }
820560
private AbstractRule processRule(RulesTextProvider textProvider)
    {
    	log.debug("processRule");
    	int start = textProvider.getPos();
        Rule rule = new Rule();
        LoadCommonRuleData(rule,textProvider);
        textProvider.addTOCElement(null, rule.getDescription(), start, textProvider.getPos(), TYPE_RULE);
        exactOrError("{",textProvider);
        
        if (!exact("if",textProvider))
            throw new ParserException("expected 'if' in a rule: ",textProvider);
        // Condition
        Expression condition = processCondition(textProvider);
        rule.addCondition(condition);
        exactOrError("{",textProvider);
        while (!exact("}",textProvider))
        {
            Expression action = processAction(textProvider);
            exact(";",textProvider);
            rule.addAction(action);
        }
        exact("}",textProvider);

        return rule;
    }
370656
function processRule(rule) {
    if (typeof rule !== 'function' && typeof rule !== 'string') {
        OBLIGATIONS.precondition(Array.isArray(rule) && rule[0] || rule.name, 'Validator name must be specified.');
    }
    var __result;
    main: {
        if (typeof rule === 'string') {
            __result = exports.create(rule);
            break main;
        } else if (typeof rule === 'function') {
            __result = new exports.Validator({ validate: rule });
            break main;
        } else if (Array.isArray(rule)) {
            __result = exports.create.apply(exports, rule);
            break main;
        } else {
            __result = exports.create(rule.name, rule);
            break main;
        }
    }
    OBLIGATIONS.postcondition(__result instanceof exports.Validator);
    return __result;
}
840076
@Override
    public void visit(@Nonnull SWRLRule rule) {
        for (SWRLAtom atom : rule.getBody()) {
            atom.accept(this);
        }
        for (SWRLAtom atom : rule.getHead()) {
            atom.accept(this);
        }
        processAxiomAnnotations(rule);
    }
658202
public static <T> void whenAllDone(
      List<CompletionStage<T>> inputs, Runnable callback, Executor executor) {
    allDone(inputs).thenRunAsync(callback, executor).exceptionally(UncaughtExceptions::log);
  }
53224
protected void processInput(String input) {
        String command = input.trim();
        if (!command.isEmpty()) {
            runCommand(command);
        }
    }
978805
public void validate(String path, Schema schema, Object value, List<ValidationResult> results) {
		if (_rules == null || _rules.length == 0)
			return;

		List<ValidationResult> localResults = new ArrayList<ValidationResult>();

		for (IValidationRule rule : _rules) {
			int resultsCount = localResults.size();
			rule.validate(path, schema, value, localResults);
			if (resultsCount == localResults.size())
				return;
		}

		results.addAll(localResults);
	}
960951
@Override
	public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
		try {
			count++;
			if (count == 1) {

				many2ManyProcessor.clear();
				typeProcessor.clear();
				sharedPreferencesProcessor.clear();
				dataSourceProcessor.clear();

				// generate @BindGeneratedDao
				many2ManyProcessor.process(annotations, roundEnv);

				// generate bindmap
				typeProcessor.process(annotations, roundEnv);

				sharedPreferencesProcessor.process(annotations, roundEnv);
				sharedPreferencesProcessor.generateClasses();

				dataSourceProcessor.generatedEntities = many2ManyProcessor.result.value0;
				dataSourceProcessor.generatedDaos = many2ManyProcessor.result.value1;
				// dump(1, roundEnv);
				dataSourceProcessor.analyzeRound(annotations, roundEnv);
				dataSourceProcessor.process(annotations, roundEnv);
				dataSourceProcessor.generateClasses(roundEnv);
			} else if (count == 2) {
				dataSourceProcessor.analyzeSecondRound(annotations, roundEnv);
				dataSourceProcessor.processSecondRound(annotations, roundEnv);
				dataSourceProcessor.generateClassesSecondRound(roundEnv);
			}

			return true;
		} catch (Throwable e) {
			String msg = StringUtils.nvl(e.getMessage());
			error(null, e.getClass().getCanonicalName() + ": " + msg);

			if (DEBUG_MODE) {
				if (JUNIT_TEST_MODE) {
					logger.log(Level.SEVERE, msg);
					//e.printStackTrace();
				} else {
					StackTraceElement[] stackTrace = e.getStackTrace();
					for (StackTraceElement item : stackTrace) {
						error(null, String.format("\tat %s.%s(%s:%s)", item.getClassName(), item.getMethodName(), item.getFileName(), item.getLineNumber()));
					}					
				}
			}
			return false;
		}

	}
1054579
void handlePut(
    SimpleTest test,
    Conjunction selector,
    MatchTarget object,
    InternTable subExpr)
    throws MatchingException {
      if (tc.isEntryEnabled())
        tc.entry(this,cclass, "handlePut",
          new Object[] {test,selector,object,subExpr} );
      Object value = test.getValue();
      if (value == null)
        throw new IllegalStateException();
      handleEqualityPut(value, selector, object, subExpr);
      if (tc.isEntryEnabled())
        tc.exit(this,cclass, "handlePut");        
  }
677644
@Override
	public boolean process(ContentEvent event) {
		if (event instanceof InstanceContentEvent) {
			this.processInstanceEvent((InstanceContentEvent) event);
		}
		else if (event instanceof PredicateContentEvent) {
			PredicateContentEvent pce = (PredicateContentEvent) event;
			if (pce.getRuleSplitNode() == null) {
				this.updateLearningNode(pce);
			}
			else {
				this.updateRuleSplitNode(pce);
			}
		}
		else if (event instanceof RuleContentEvent) {
			RuleContentEvent rce = (RuleContentEvent) event;
			if (rce.isRemoving()) {
				this.removeRule(rce.getRuleNumberID());
			}
			else {
				addRule(rce.getRule());
			}
		}
		return true;
	}
1018362
public final void ruleValidID() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1879:2: ( ( RULE_ID ) )
            // InternalXbase.g:1880:2: ( RULE_ID )
            {
            // InternalXbase.g:1880:2: ( RULE_ID )
            // InternalXbase.g:1881:3: RULE_ID
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getValidIDAccess().getIDTerminalRuleCall()); 
            }
            match(input,RULE_ID,FOLLOW_2); if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getValidIDAccess().getIDTerminalRuleCall()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }