Examples of EvaluationException


Examples of org.jpmml.evaluator.EvaluationException

        requests = aggregateRequests(groupField, requests);
      } else

      if(groupFields.size() > 1){
        throw new EvaluationException();
      }

      for(EvaluationRequest request : requests){
        EvaluationResponse response = evaluate(evaluator, request);
View Full Code Here

Examples of org.jsurveylib.model.script.interpreter.EvaluationException

    public static void invoke(Interpreter env) {
        for (String command : commandNames) {
            InputStream input = LoadAllCommands.class.getResourceAsStream("/org/jsurveylib/model/script/interpreter/commands/" + command + ".bsh");
            if (input == null) {
                throw new EvaluationException("Could not load this command: " + command + ".bsh");
            }
            try {
                env.eval(new InputStreamReader(input, "UTF8"));
            } catch (EvalError e) {
                throw new EvaluationException(e);
            } catch (UnsupportedEncodingException e) {
                throw new EvaluationException(e);
            }
        }
    }
View Full Code Here

Examples of org.objectweb.medor.api.EvaluationException

     * @throws org.objectweb.medor.api.MedorException
     */
    public Object execute(Object[] a, POManagerItf  pm, QueryDefinition userqd)
            throws SpeedoException, MedorException, ExpressionException {
        if (status != COMPILED)
            throw new EvaluationException(
                    "Impossible to execute a query if it has not been defined and compiled before");
        ParameterOperand[] pos = null;
        if (a != null) {
            pos = new ParameterOperand[a.length + pncParams.size()];
            for(Iterator it = hparams.values().iterator(); it.hasNext();) {
View Full Code Here

Examples of org.ofbiz.workflow.EvaluationException

     */
    public Boolean evaluateCondition(Map<String, Object> context, Map<String, String> attrs, String expression, DispatchContext dctx) throws EvaluationException {
        // get the service to call
        String serviceName = attrs.get("serviceName");
        if (UtilValidate.isEmpty(serviceName))
            throw new EvaluationException("Invalid serviceName; be sure to set the serviceName ExtendedAttribute");

        // get the dispatcher
        LocalDispatcher dispatcher = dctx.getDispatcher();
        if (dispatcher == null)
            throw new EvaluationException("Bad LocalDispatcher found in the DispatchContext");

        // create a map of all context and extended attributes, attributes will overwrite context values
        Map<String, Object> newContext = new HashMap<String, Object>(context);
        newContext.putAll(attrs);

        // build the context for the service
        Map<String, Object> serviceContext = null;
        ModelService model = null;
        try {
            model = dctx.getModelService(serviceName);
            serviceContext = model.makeValid(newContext, ModelService.IN_PARAM);
        } catch (GenericServiceException e) {
            throw new EvaluationException("Cannot get ModelService object for service named: " + serviceName, e);
        }

        // invoke the service
        Map<String, Object> serviceResult = null;
        try {
            serviceResult = dispatcher.runSync(serviceName, serviceContext);
        } catch (GenericServiceException e) {
            throw new EvaluationException("Cannot invoke the service named: " + serviceName, e);
        }

        // get the evaluationResult object from the result
        Boolean evaluationResult = null;
        try {
            evaluationResult = (Boolean) serviceResult.get("evaluationResult");
        } catch (ClassCastException e) {
            throw new EvaluationException("Service did not return a valid evaluationResult object");
        }

        return evaluationResult;
    }
View Full Code Here

Examples of org.openrdf.query.EvaluationException

  {
    try {
      return nativeStore.createStatementCursor(subj, pred, obj, includeInferred, readTransaction, contexts);
    }
    catch (IOException e) {
      throw new EvaluationException("Unable to get statements", e);
    }
  }
View Full Code Here

Examples of org.openrdf.query.EvaluationException

    }
    else if (expr == null) {
      throw new IllegalArgumentException("expr must not be null");
    }
    else {
      throw new EvaluationException("Unsupported tuple expr type: " + expr.getClass());
    }
  }
View Full Code Here

Examples of org.openrdf.query.EvaluationException

    }
    else if (expr == null) {
      throw new IllegalArgumentException("expr must not be null");
    }
    else {
      throw new EvaluationException("Unknown unary tuple operator type: " + expr.getClass());
    }
  }
View Full Code Here

Examples of org.openrdf.query.EvaluationException

    }
    else if (expr == null) {
      throw new IllegalArgumentException("expr must not be null");
    }
    else {
      throw new EvaluationException("Unsupported n-ary tuple operator type: " + expr.getClass());
    }
  }
View Full Code Here

Examples of org.openrdf.query.EvaluationException

    }
    else if (expr == null) {
      throw new IllegalArgumentException("expr must not be null");
    }
    else {
      throw new EvaluationException("Unsupported binary tuple operator type: " + expr.getClass());
    }
  }
View Full Code Here

Examples of org.openrdf.query.EvaluationException

    }
    else if (expr == null) {
      throw new IllegalArgumentException("expr must not be null");
    }
    else {
      throw new EvaluationException("Unsupported value expr type: " + expr.getClass());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.