objList = Collections.<ValueExpr> singletonList(sp.getObjectVar()); union.setLeftArg(stmts);
objList = Collections.<ValueExpr> singletonList(sp.getObjectVar()); union.setLeftArg(stmts);
Var subjVar = sp.getSubjectVar(); Union union = new InferUnion(); union.setLeftArg(sp); union.setRightArg(new StatementPattern(objVar, predVar, subjVar, cntxtVar)); node.replaceWith(union);
Var subjVar = sp.getSubjectVar(); Union union = new InferUnion(); union.setLeftArg(sp); union.setRightArg(new StatementPattern(objVar, new Var(predVar.getName(), invPropIri), subjVar, cntxtVar)); node.replaceWith(union);
@Override public void meet(Union union) { super.meet(union); TupleExpr leftArg = union.getLeftArg(); TupleExpr rightArg = union.getRightArg(); if (leftArg instanceof Join && rightArg instanceof Join) { Join leftJoinArg = (Join)leftArg; Join rightJoin = (Join)rightArg; if (leftJoinArg.getLeftArg().equals(rightJoin.getLeftArg())) { // factor out the left-most join argument Join newJoin = new Join(); union.replaceWith(newJoin); newJoin.setLeftArg(leftJoinArg.getLeftArg()); newJoin.setRightArg(union); union.setLeftArg(leftJoinArg.getRightArg()); union.setRightArg(rightJoin.getRightArg()); union.visit(this); } } } }
@Override public void meet(Union union) { super.meet(union); TupleExpr leftArg = union.getLeftArg(); TupleExpr rightArg = union.getRightArg(); if (leftArg instanceof Join && rightArg instanceof Join) { Join leftJoinArg = (Join)leftArg; Join rightJoin = (Join)rightArg; if (leftJoinArg.getLeftArg().equals(rightJoin.getLeftArg())) { // factor out the left-most join argument Join newJoin = new Join(); union.replaceWith(newJoin); newJoin.setLeftArg(leftJoinArg.getLeftArg()); newJoin.setRightArg(union); union.setLeftArg(leftJoinArg.getRightArg()); union.setRightArg(rightJoin.getRightArg()); union.visit(this); } } } }
pathAltNode.jjtGetChild(i).jjtAccept(this, data); TupleExpr arg = graphPattern.buildTupleExpr(); currentUnion.setLeftArg(arg); if (i == altCount - 2) { // second-to-last item graphPattern = new GraphPattern(parentGP);
pathAltNode.jjtGetChild(i).jjtAccept(this, data); TupleExpr arg = graphPattern.buildTupleExpr(); currentUnion.setLeftArg(arg); if (i == altCount - 2) { // second-to-last item graphPattern = new GraphPattern(parentGP);
currentUnion.setLeftArg(path); if (length == upperBound - 1) { path = createPath(scope, subjVar, te, endVar, contextVar, length + 1);
currentUnion.setLeftArg(path); if (length == upperBound - 1) { path = createPath(scope, subjVar, te, endVar, contextVar, length + 1);
pathAltNode.jjtGetChild(i).jjtAccept(this, data); TupleExpr arg = graphPattern.buildTupleExpr(); currentUnion.setLeftArg(arg); if (i == altCount - 2) { // second-to-last item graphPattern = new GraphPattern(parentGP);
currentUnion.setLeftArg(path); if (length == upperBound - 1) { path = createPath(scope, subjVar, te, endVar, contextVar, length + 1);