@Override public void visit(ExprFunctionOp funcOp) { funcOp.getGraphPattern().visit(visitor) ; } }
@Override public void visit(ExprFunctionOp funcOp) { Set<Var> vars = OpVars.allVars(funcOp.getGraphPattern()) ; for ( Var v : vars ) action.var(acc, v) ; }
@Override public void visit(ExprFunctionOp funcOp) { Collection<Var> vars = OpVars.visibleVars(funcOp.getGraphPattern()) ; for ( Var v : vars ) action.var(acc, v) ; }
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) ; }
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 void visit(ExprFunctionOp funcOp) { ExprList x = null ; if ( funcOp.getArgs() != null ) x = process(funcOp.getArgs()) ; Op op = funcOp.getGraphPattern() ; if ( transform instanceof ExprTransformOp ) { ExprTransformOp t = (ExprTransformOp)transform ; op = Transformer.transform(t.getTransform(), op) ; } Expr e = funcOp.apply(transform, x, op) ; push(stack, e) ; }
public void visit(ExprFunctionOp funcOp) { FormatterElement fmtElt = new FormatterElement(out, context) ; out.print(funcOp.getFunctionName(context)) ; out.print(" ") ; Element el = funcOp.getElement() ; if ( el == null ) el = OpAsQuery.asQuery(funcOp.getGraphPattern()).getQueryPattern() ; el.visit(fmtElt) ; }
@Override public void visit(ExprFunctionOp funcOp) { ExprList x = null ; if ( funcOp.getArgs() != null ) x = process(funcOp.getArgs()) ; Op op = funcOp.getGraphPattern() ; // Caution: the expression can have a pattern inside it. // See also: ExprTransformApplyTransform which does much the same in a different way. if ( transform instanceof ExprTransformOp ) { ExprTransformOp t = (ExprTransformOp)transform ; op = Transformer.transform(t.getTransform(), op) ; } Expr e = funcOp.apply(transform, x, op) ; push(stack, e) ; }
public void visit(ExprFunctionOp funcOp) { out.print("(") ; // How far we are from current indent to current location // (beginning of operator name) int x = out.getCurrentOffset() ; // Indent to "(" out.incIndent(x) ; out.print(funcOp.getFunctionName(context)) ; out.incIndent() ; Op op = funcOp.getGraphPattern() ; if ( oneLine(op) ) out.print(" ") ; else out.ensureStartOfLine() ; //Ensures we are unit indent under the (operator ...) //Without trappings. WriterOp.outputNoPrologue(out, funcOp.getGraphPattern(), context) ; out.decIndent() ; out.decIndent(x) ; out.print(")") ; return ; }
@Override public void visit(ExprFunctionOp funcOp) { out.print("(") ; // How far we are from current indent to current location // (beginning of operator name) int x = out.getCurrentOffset() ; // Indent to "(" out.incIndent(x) ; out.print(funcOp.getFunctionName(context)) ; out.incIndent() ; Op op = funcOp.getGraphPattern() ; if ( oneLine(op) ) out.print(" ") ; else out.ensureStartOfLine() ; //Ensures we are unit indent under the (operator ...) //Without trappings. WriterOp.outputNoPrologue(out, funcOp.getGraphPattern(), context) ; out.decIndent() ; out.decIndent(x) ; out.print(")") ; return ; }
@Override public void visit(ExprFunctionOp funcOp) { String fn = funcOp.getFunctionPrintName(context) ; if ( funcOp instanceof E_NotExists ) fn = "NOT EXISTS" ; else if ( funcOp instanceof E_Exists ) fn = "EXISTS" ; else throw new ARQInternalErrorException("Unrecognized ExprFunctionOp: "+fn) ; FormatterElement fmtElt = new FormatterElement(out, context) ; out.print(fn) ; out.print(" ") ; Element el = funcOp.getElement() ; if ( el == null ) el = OpAsQuery.asQuery(funcOp.getGraphPattern()).getQueryPattern() ; el.visit(fmtElt) ; }