Search in sources :

Example 1 with EvaluateException

use of jp.ossc.nimbus.service.interpreter.EvaluateException in project nimbus by nimbus-org.

the class DistributedSharedContextService method executeInterpretQuery.

public Object executeInterpretQuery(String query, String mergeQuery, Map variables, long timeout) throws EvaluateException, SharedContextSendException, SharedContextTimeoutException {
    if (interpreter == null) {
        throw new EvaluateException("Interpreter is null.");
    }
    List results = (List) executeInterpretQuery(query, variables, timeout);
    if (mergeQuery == null || mergeQuery.length() == 0) {
        return results;
    }
    if (variables == null) {
        variables = new HashMap();
    }
    variables.put("results", results);
    return interpreter.evaluate(mergeQuery, variables);
}
Also used : EvaluateException(jp.ossc.nimbus.service.interpreter.EvaluateException) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 EvaluateException (jp.ossc.nimbus.service.interpreter.EvaluateException)1