Beispiel #1
0
  private NestedApplCond shiftNestedApplCondAlongEmbMorphism(
      final NestedApplCond cond, final OrdinaryMorphism embedding, final AttrContext ac) {

    if (cond.getSource() == embedding.getSource()) {
      final OrdinaryMorphism condIso = cond.getTarget().isomorphicCopy();
      if (condIso == null) return null;

      final NestedApplCond shiftCond =
          new NestedApplCond(embedding.getTarget(), condIso.getTarget(), ac);
      if (this.propagateMapping(cond, shiftCond, embedding, condIso)) {

        for (int i = 0; i < cond.getNestedACs().size(); i++) {
          NestedApplCond nc = cond.getNestedACAt(i);
          final NestedApplCond shiftnc =
              shiftNestedApplCondAlongEmbMorphism(nc, condIso, cond.getAttrContext());
          if (shiftnc != null) {
            shiftnc.setName(nc.getName());
            shiftnc.setEnabled(nc.isEnabled());
            shiftCond.addNestedAC(shiftnc);
          } else return null;
        }

        return shiftCond;
      }

      shiftCond.dispose();
      condIso.dispose();
    }
    return null;
  }