Search in sources :

Example 1 with Exists

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

the class TupleExprBuilder method visit.

@Override
public Exists visit(ASTExistsFunc node, Object data) throws VisitorException {
    GraphPattern parentGP = graphPattern;
    graphPattern = new GraphPattern(parentGP);
    Exists e = new Exists();
    node.jjtGetChild(0).jjtAccept(this, e);
    TupleExpr te = graphPattern.buildTupleExpr();
    e.setSubQuery(te);
    graphPattern = parentGP;
    return e;
}
Also used : Exists(org.eclipse.rdf4j.query.algebra.Exists) TupleExpr(org.eclipse.rdf4j.query.algebra.TupleExpr)

Example 2 with Exists

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

the class TupleExprBuilder method visit.

@Override
public Not visit(ASTNotExistsFunc node, Object data) throws VisitorException {
    GraphPattern parentGP = graphPattern;
    graphPattern = new GraphPattern(parentGP);
    Exists e = new Exists();
    node.jjtGetChild(0).jjtAccept(this, e);
    TupleExpr te = graphPattern.buildTupleExpr();
    e.setSubQuery(te);
    graphPattern = parentGP;
    return new Not(e);
}
Also used : Not(org.eclipse.rdf4j.query.algebra.Not) Exists(org.eclipse.rdf4j.query.algebra.Exists) TupleExpr(org.eclipse.rdf4j.query.algebra.TupleExpr)

Aggregations

Exists (org.eclipse.rdf4j.query.algebra.Exists)2 TupleExpr (org.eclipse.rdf4j.query.algebra.TupleExpr)2 Not (org.eclipse.rdf4j.query.algebra.Not)1