Search in sources :

Example 1 with ASTRegex

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

the class QueryModelBuilder method visit.

@Override
public Regex visit(ASTRegex node, Object data) throws VisitorException {
    ValueExpr text = (ValueExpr) node.getText().jjtAccept(this, null);
    ValueExpr pattern = (ValueExpr) node.getPattern().jjtAccept(this, null);
    ValueExpr flags = null;
    if (node.hasFlags()) {
        flags = (ValueExpr) node.getFlags().jjtAccept(this, null);
    }
    return new Regex(text, pattern, flags);
}
Also used : ValueExpr(org.eclipse.rdf4j.query.algebra.ValueExpr) ASTValueExpr(org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr) ASTRegex(org.eclipse.rdf4j.query.parser.serql.ast.ASTRegex) Regex(org.eclipse.rdf4j.query.algebra.Regex)

Aggregations

Regex (org.eclipse.rdf4j.query.algebra.Regex)1 ValueExpr (org.eclipse.rdf4j.query.algebra.ValueExpr)1 ASTRegex (org.eclipse.rdf4j.query.parser.serql.ast.ASTRegex)1 ASTValueExpr (org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr)1