Search in sources :

Example 1 with ASTFunctionCall

use of org.eclipse.rdf4j.query.parser.serql.ast.ASTFunctionCall in project rdf4j by eclipse.

the class QueryModelBuilder method visit.

@Override
public FunctionCall visit(ASTFunctionCall node, Object data) throws VisitorException {
    ValueConstant vc = (ValueConstant) node.getURI().jjtAccept(this, null);
    assert vc.getValue() instanceof IRI;
    FunctionCall functionCall = new FunctionCall(vc.getValue().toString());
    for (ASTValueExpr argExpr : node.getArgList().getElements()) {
        functionCall.addArg((ValueExpr) argExpr.jjtAccept(this, null));
    }
    return functionCall;
}
Also used : IRI(org.eclipse.rdf4j.model.IRI) ASTValueExpr(org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr) ValueConstant(org.eclipse.rdf4j.query.algebra.ValueConstant) ASTFunctionCall(org.eclipse.rdf4j.query.parser.serql.ast.ASTFunctionCall) FunctionCall(org.eclipse.rdf4j.query.algebra.FunctionCall)

Aggregations

IRI (org.eclipse.rdf4j.model.IRI)1 FunctionCall (org.eclipse.rdf4j.query.algebra.FunctionCall)1 ValueConstant (org.eclipse.rdf4j.query.algebra.ValueConstant)1 ASTFunctionCall (org.eclipse.rdf4j.query.parser.serql.ast.ASTFunctionCall)1 ASTValueExpr (org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr)1