Search in sources :

Example 1 with ASTTupleUnion

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

the class QueryModelBuilder method visit.

@Override
public TupleExpr visit(ASTTupleUnion node, Object data) throws VisitorException {
    TupleExpr leftArg = (TupleExpr) node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr) node.getRightArg().jjtAccept(this, null);
    TupleExpr result = new Union(leftArg, rightArg);
    if (node.isDistinct()) {
        result = new Distinct(result);
    }
    return result;
}
Also used : Distinct(org.eclipse.rdf4j.query.algebra.Distinct) TupleExpr(org.eclipse.rdf4j.query.algebra.TupleExpr) ASTGraphUnion(org.eclipse.rdf4j.query.parser.serql.ast.ASTGraphUnion) Union(org.eclipse.rdf4j.query.algebra.Union) ASTPathExprUnion(org.eclipse.rdf4j.query.parser.serql.ast.ASTPathExprUnion) ASTTupleUnion(org.eclipse.rdf4j.query.parser.serql.ast.ASTTupleUnion)

Aggregations

Distinct (org.eclipse.rdf4j.query.algebra.Distinct)1 TupleExpr (org.eclipse.rdf4j.query.algebra.TupleExpr)1 Union (org.eclipse.rdf4j.query.algebra.Union)1 ASTGraphUnion (org.eclipse.rdf4j.query.parser.serql.ast.ASTGraphUnion)1 ASTPathExprUnion (org.eclipse.rdf4j.query.parser.serql.ast.ASTPathExprUnion)1 ASTTupleUnion (org.eclipse.rdf4j.query.parser.serql.ast.ASTTupleUnion)1