/** * @inheritDoc */ @Override public void meet(LeftJoin theJoin) throws Exception { ctxOpen(theJoin); // try and reverse engineer the original scoping intent of the query final boolean aNeedsNewScope = theJoin.getParentNode() != null && (theJoin.getParentNode() instanceof Join || theJoin.getParentNode() instanceof LeftJoin); if (aNeedsNewScope) { mJoinBuffer.append("{\n"); } theJoin.getLeftArg().visit(this); mJoinBuffer.append(indent()).append("OPTIONAL {\n"); mIndent += 2; theJoin.getRightArg().visit(this); if (theJoin.getCondition() != null) { mJoinBuffer.append(indent()).append("filter").append( renderValueExpr(theJoin.getCondition())).append("\n"); } mIndent -= 2; mJoinBuffer.append(indent()).append("}.\n"); if (aNeedsNewScope) { mJoinBuffer.append("}.\n"); } ctxClose(theJoin); }
/** * @inheritDoc */ @Override public void meet(LeftJoin theJoin) throws Exception { ctxOpen(theJoin); // try and reverse engineer the original scoping intent of the query final boolean aNeedsNewScope = theJoin.getParentNode() != null && (theJoin.getParentNode() instanceof Join || theJoin.getParentNode() instanceof LeftJoin); if (aNeedsNewScope) { mJoinBuffer.append("{\n"); } theJoin.getLeftArg().visit(this); mJoinBuffer.append(indent()).append("OPTIONAL {\n"); mIndent += 2; theJoin.getRightArg().visit(this); if (theJoin.getCondition() != null) { mJoinBuffer.append(indent()).append("filter").append( renderValueExpr(theJoin.getCondition())).append("\n"); } mIndent -= 2; mJoinBuffer.append(indent()).append("}.\n"); if (aNeedsNewScope) { mJoinBuffer.append("}.\n"); } ctxClose(theJoin); }
/** * @inheritDoc */ @Override public void meet(LeftJoin theJoin) throws Exception { ctxOpen(theJoin); // try and reverse engineer the original scoping intent of the query final boolean aNeedsNewScope = theJoin.getParentNode() != null && (theJoin.getParentNode() instanceof Join || theJoin.getParentNode() instanceof LeftJoin); if (aNeedsNewScope) { mJoinBuffer.append("{\n"); } theJoin.getLeftArg().visit(this); mJoinBuffer.append(indent()).append("OPTIONAL {\n"); mIndent += 2; theJoin.getRightArg().visit(this); if (theJoin.getCondition() != null) { mJoinBuffer.append(indent()).append("filter").append( renderValueExpr(theJoin.getCondition())).append("\n"); } mIndent -= 2; mJoinBuffer.append(indent()).append("}.\n"); if (aNeedsNewScope) { mJoinBuffer.append("}.\n"); } ctxClose(theJoin); }