Search in sources :

Example 1 with ASTCompare

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

the class QueryModelBuilder method visit.

@Override
public Compare visit(ASTCompare node, Object data) throws VisitorException {
    ValueExpr leftArg = (ValueExpr) node.getLeftOperand().jjtAccept(this, null);
    ValueExpr rightArg = (ValueExpr) node.getRightOperand().jjtAccept(this, null);
    CompareOp operator = node.getOperator().getValue();
    return new Compare(leftArg, rightArg, operator);
}
Also used : ValueExpr(org.eclipse.rdf4j.query.algebra.ValueExpr) ASTValueExpr(org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr) ASTCompare(org.eclipse.rdf4j.query.parser.serql.ast.ASTCompare) Compare(org.eclipse.rdf4j.query.algebra.Compare) CompareOp(org.eclipse.rdf4j.query.algebra.Compare.CompareOp)

Aggregations

Compare (org.eclipse.rdf4j.query.algebra.Compare)1 CompareOp (org.eclipse.rdf4j.query.algebra.Compare.CompareOp)1 ValueExpr (org.eclipse.rdf4j.query.algebra.ValueExpr)1 ASTCompare (org.eclipse.rdf4j.query.parser.serql.ast.ASTCompare)1 ASTValueExpr (org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr)1