Search in sources :

Example 1 with CompareOp

use of org.eclipse.rdf4j.query.algebra.Compare.CompareOp in project rdf4j by eclipse.

the class QueryModelBuilder method visit.

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

Example 2 with CompareOp

use of org.eclipse.rdf4j.query.algebra.Compare.CompareOp 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)

Example 3 with CompareOp

use of org.eclipse.rdf4j.query.algebra.Compare.CompareOp in project rdf4j by eclipse.

the class QueryModelBuilder method visit.

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

Aggregations

CompareOp (org.eclipse.rdf4j.query.algebra.Compare.CompareOp)3 ValueExpr (org.eclipse.rdf4j.query.algebra.ValueExpr)3 ASTValueExpr (org.eclipse.rdf4j.query.parser.serql.ast.ASTValueExpr)3 TupleExpr (org.eclipse.rdf4j.query.algebra.TupleExpr)2 Compare (org.eclipse.rdf4j.query.algebra.Compare)1 CompareAll (org.eclipse.rdf4j.query.algebra.CompareAll)1 CompareAny (org.eclipse.rdf4j.query.algebra.CompareAny)1 ASTCompare (org.eclipse.rdf4j.query.parser.serql.ast.ASTCompare)1 ASTCompareAll (org.eclipse.rdf4j.query.parser.serql.ast.ASTCompareAll)1 ASTCompareAny (org.eclipse.rdf4j.query.parser.serql.ast.ASTCompareAny)1