Search in sources :

Example 1 with Difference

use of org.eclipse.rdf4j.query.algebra.Difference in project rdf4j by eclipse.

the class QueryModelBuilder method visit.

@Override
public TupleExpr visit(ASTGraphMinus node, Object data) throws VisitorException {
    TupleExpr leftArg = (TupleExpr) node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr) node.getRightArg().jjtAccept(this, null);
    return new Difference(leftArg, rightArg);
}
Also used : Difference(org.eclipse.rdf4j.query.algebra.Difference) TupleExpr(org.eclipse.rdf4j.query.algebra.TupleExpr)

Example 2 with Difference

use of org.eclipse.rdf4j.query.algebra.Difference in project rdf4j by eclipse.

the class QueryModelBuilder method visit.

@Override
public TupleExpr visit(ASTTupleMinus node, Object data) throws VisitorException {
    TupleExpr leftArg = (TupleExpr) node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr) node.getRightArg().jjtAccept(this, null);
    return new Difference(leftArg, rightArg);
}
Also used : Difference(org.eclipse.rdf4j.query.algebra.Difference) TupleExpr(org.eclipse.rdf4j.query.algebra.TupleExpr)

Example 3 with Difference

use of org.eclipse.rdf4j.query.algebra.Difference in project rdf4j by eclipse.

the class TupleExprBuilder method visit.

@Override
public Object visit(ASTMinusGraphPattern node, Object data) throws VisitorException {
    GraphPattern parentGP = graphPattern;
    TupleExpr leftArg = graphPattern.buildTupleExpr();
    graphPattern = new GraphPattern(parentGP);
    node.jjtGetChild(0).jjtAccept(this, null);
    TupleExpr rightArg = graphPattern.buildTupleExpr();
    parentGP = new GraphPattern();
    parentGP.addRequiredTE(new Difference(leftArg, rightArg));
    graphPattern = parentGP;
    return null;
}
Also used : Difference(org.eclipse.rdf4j.query.algebra.Difference) TupleExpr(org.eclipse.rdf4j.query.algebra.TupleExpr)

Aggregations

Difference (org.eclipse.rdf4j.query.algebra.Difference)3 TupleExpr (org.eclipse.rdf4j.query.algebra.TupleExpr)3