use of org.apache.jena.sparql.algebra.op.OpExtend in project jena by apache.
the class TransformExtendCombine method transform.
@Override
public Op transform(OpExtend opExtend, Op subOp) {
if (subOp instanceof OpExtend) {
// The case of (extend (?x e1) (extend (?x e2) ...op...))
// is actually illegal in SPARQL. ?x must be a fresh variable.
OpExtend x = (OpExtend) subOp;
VarExprList outerVarExprList = opExtend.getVarExprList();
// Copy
VarExprList innerVarExprList = new VarExprList(x.getVarExprList());
Op r = OpExtend.extend(x.getSubOp(), innerVarExprList);
// This contains an "if already (extend)" test.
r = OpExtend.extend(r, outerVarExprList);
return r;
}
return super.transform(opExtend, subOp);
}
Aggregations