use of org.apache.jena.sparql.expr.Expr in project jena by apache.
the class ApplyElementTransformVisitor method visit.
@Override
public void visit(ElementFilter el) {
Expr expr = el.getExpr();
Expr expr2 = transformExpr(expr, exprTransform);
Element el2 = transform.transform(el, expr2);
push(el2);
}
use of org.apache.jena.sparql.expr.Expr in project jena by apache.
the class TestSSE_Builder method testExprForms.
private static void testExprForms(String str1, String str2) {
Expr e1 = SSE.parseExpr(str1);
Expr e2 = SSE.parseExpr(str2);
assertEquals(str1 + " " + str2, e1, e2);
}
use of org.apache.jena.sparql.expr.Expr in project jena by apache.
the class TestSSE_Builder method testBuildExpr_02.
@Test
public void testBuildExpr_02() {
Expr e = SSE.parseExpr("(isNumeric ?x)");
assertTrue(e instanceof E_IsNumeric);
}
use of org.apache.jena.sparql.expr.Expr in project jena by apache.
the class FunctionBase method exec.
@Override
public NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env) {
if (args == null)
// The contract on the function interface is that this should not happen.
throw new ARQInternalErrorException("FunctionBase: Null args list");
List<NodeValue> evalArgs = new ArrayList<>();
for (Expr e : args) {
NodeValue x = e.eval(binding, env);
evalArgs.add(x);
}
NodeValue nv = exec(evalArgs);
return nv;
}
use of org.apache.jena.sparql.expr.Expr in project jena by apache.
the class AggregatorBase method toPrefixString.
@Override
public String toPrefixString() {
IndentedLineBuffer x = new IndentedLineBuffer();
x.append("(");
x.append(getName().toLowerCase(Locale.ROOT));
x.incIndent();
if (isDistinct)
x.append(" distinct");
for (Expr e : getExprList()) {
x.append(" ");
WriterExpr.output(x, e, null);
}
x.decIndent();
x.append(")");
return x.asString();
}
Aggregations