use of org.apache.jena.sparql.expr.ExprTransformCopy in project jena by apache.
the class Transformer method transformSkipService.
/** Transform an algebra expression except skip (leave alone) any OpService nodes */
public static Op transformSkipService(Transform opTransform, ExprTransform exprTransform, Op op, OpVisitor beforeVisitor, OpVisitor afterVisitor) {
if (true) {
// XXX XXX Better work with Walker.
if (opTransform == null)
opTransform = new TransformCopy();
if (exprTransform == null)
exprTransform = new ExprTransformCopy();
Transform transform2 = new TransformSkipService(opTransform);
transform2 = opTransform;
ApplyTransformVisitor atv = new ApplyTransformVisitor(transform2, exprTransform, false, beforeVisitor, afterVisitor);
return Walker.transformSkipService(op, atv, beforeVisitor, afterVisitor);
}
Transform transform = new TransformSkipService(opTransform);
return Transformer.transform(transform, exprTransform, op, beforeVisitor, afterVisitor);
// // OLD
// // Simplest way but still walks the OpService subtree (and throws away the
// // transformation).
// Transform transform = new TransformSkipService(opTransform) ;
// return Transformer.transform(transform, exprTransform, op, beforeVisitor, afterVisitor) ;
}
Aggregations