use of com.google.refine.expr.Evaluable in project OpenRefine by OpenRefine.
the class OperatorCallExpr method toString.
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
for (Evaluable ev : _args) {
if (sb.length() > 0) {
sb.append(' ');
sb.append(_op);
sb.append(' ');
}
sb.append(ev.toString());
}
return sb.toString();
}
use of com.google.refine.expr.Evaluable in project OpenRefine by OpenRefine.
the class ColumnAdditionByFetchingURLsOperation method createProcess.
@Override
public Process createProcess(Project project, Properties options) throws Exception {
Engine engine = createEngine(project);
engine.initializeFromJSON(_engineConfig);
Evaluable eval = MetaParser.parse(_urlExpression);
return new ColumnAdditionByFetchingURLsProcess(project, engine, eval, getBriefDescription(null), _cacheResponses);
}
use of com.google.refine.expr.Evaluable in project OpenRefine by OpenRefine.
the class GrelTests method parseEval.
private void parseEval(Properties bindings, String[] test) throws ParsingException {
Evaluable eval = MetaParser.parse("grel:" + test[0]);
Object result = eval.evaluate(bindings);
Assert.assertEquals(result.toString(), test[1], "Wrong result for expression: " + test[0]);
}
Aggregations