}
public Tuple<Collection<BasicOperator>, Collection<BasicOperator>> transformOperatorGraph(
final Map<String, BasicOperator> mso,
final BasicOperator rootOperator) {
final GenerateAddEnv genAdd = (GenerateAddEnv) mso.get("genAdd");
final Union union = (Union) mso.get("union");
final LinkedList<BasicOperator> pres = (LinkedList<BasicOperator>) genAdd
.getPrecedingOperators();
final LinkedList<OperatorIDTuple> succs = (LinkedList<OperatorIDTuple>) union
.getSucceedingOperators();
final int index = genAdd.getOperatorIDTuple(union).getId();
BasicOperator pre;
for (int i = 0; i < pres.size(); i++) {
pre = pres.get(i);
pre.addSucceedingOperator(new OperatorIDTuple(union, index));
pre.removeSucceedingOperator(genAdd);
union.addPrecedingOperator(pre);
}
union.removePrecedingOperator(genAdd);
union.setSucceedingOperator(new OperatorIDTuple(genAdd, 0));
genAdd.setPrecedingOperator(union);
genAdd.setSucceedingOperators(succs);
BasicOperator succ;
for (int i = 0; i < succs.size(); i++) {
succ = succs.get(i).getOperator();
succ.addPrecedingOperator(genAdd);