@Override public Expr transform(ExprFunction3 func, Expr expr1, Expr expr2, Expr expr3) { return xform(func, expr1, expr2, expr3) ; }
@Override public Expr transform(ExprVar exprVar) { //If variable matches replace with the chosen expression if (this.replacements.containsKey(exprVar.getVarName())) return this.replacements.get(exprVar.getVarName()); //Otherwise leave as is return super.transform(exprVar); }
private Expr xform(ExprFunctionN func, ExprList args) { if ( ! alwaysCopy && equals1(func.getArgs(), args.getList()) ) return func ; return func.copy(args) ; }
@Override public Expr transform(ExprFunction2 func, Expr expr1, Expr expr2) { if (expr1 == null) { return new E_Null(); } if (expr2 == null) { return new E_Null(); } if (expr1 instanceof E_Null) { return expr2; } if (expr2 instanceof E_Null) { return expr1; } // can happen if filter condition contains mathematical operators // like (?x < (?y + 300) && ?x > (?y - 300)): // Jena would return (?x && ?x) // so this filter condition isn't added to the atomic query if (expr1.equals(expr2)) { return new E_Null(); } return super.transform(func, expr1, expr2); }
private Expr xform(ExprFunctionN func, ExprList args) { if ( ! alwaysCopy && equals1(func.getArgs(), args.getList()) ) return func ; return func.copy(args) ; }
@Override public Expr transform(ExprAggregator eAgg) { return xform(eAgg) ; }
@Override public Expr transform(ExprFunctionOp funcOp, ExprList args, Op opArg) { Op opArg2 = Transformer.transform(transform, opArg, beforeVisitor, afterVisitor) ; if ( opArg2 == opArg ) return super.transform(funcOp, args, opArg) ; if ( funcOp instanceof E_Exists ) return new E_Exists(opArg2) ; if ( funcOp instanceof E_NotExists ) return new E_NotExists(opArg2) ; throw new ARQInternalErrorException("Unrecognized ExprFunctionOp: \n"+funcOp) ; } }
private Expr xform(ExprFunctionOp funcOp, ExprList args, Op opArg) { if ( ! alwaysCopy && equals1(funcOp.getArgs(), args.getList()) && funcOp.getGraphPattern() == opArg ) return funcOp ; return funcOp.copy(args, opArg) ; }
@Override public Expr transform(ExprFunction2 func, Expr expr1, Expr expr2) { return xform(func, expr1, expr2) ; }
@Override public Expr transform(ExprFunctionOp funcOp, ExprList args, Op opArg) { Op opArg2 = Transformer.transform(transform, opArg) ; if ( opArg2 == opArg ) return super.transform(funcOp, args, opArg) ; if ( funcOp instanceof E_Exists ) return new E_Exists(opArg2) ; if ( funcOp instanceof E_NotExists ) return new E_NotExists(opArg2) ; throw new ARQInternalErrorException("Unrecognized ExprFunctionOp: \n"+funcOp) ; } }
private Expr xform(ExprFunctionOp funcOp, ExprList args, Op opArg) { if ( ! alwaysCopy && equals1(funcOp.getArgs(), args.getList()) && funcOp.getGraphPattern() == opArg ) return funcOp ; return funcOp.copy(args, opArg) ; }
public Expr transform(ExprFunctionOp funcOp, ExprList args, Op opArg) { return xform(funcOp, args, opArg) ; }
return uFunc.getActualExpr(); } else { return super.transform(func, args);
public Expr transform(ExprVar exprVar) { return xform(exprVar) ; }
@Override public Expr transform(ExprFunction1 func, Expr expr1) { return xform(func, expr1) ; }
@Override public Expr transform(NodeValue nv) { return xform(nv) ; }
@Override public Expr transform(ExprFunction0 func) { return xform(func) ; }
@Override public Expr transform(ExprFunctionN func, ExprList args) { return xform(func, args) ; }
@Override public Expr transform(ExprFunctionOp funcOp, ExprList args, Op opArg) { return xform(funcOp, args, opArg) ; }
@Override public Expr transform(ExprVar exprVar) { return xform(exprVar) ; }