protected void changeShapeSize(
      GraphicsType annType,
      NodeType node,
      BigDecimal newHeight,
      BigDecimal newWidth,
      Map<String, AnnotationData> annotations) {
    super.changeShapeSize(annType, node, newHeight, newWidth, annotations);

    BigDecimal oldH = annType.getSize().getHeight();
    BigDecimal oldW = annType.getSize().getWidth();
    BigDecimal oldX = annType.getPosition().get(0).getX();
    BigDecimal oldY = annType.getPosition().get(0).getY();

    BigDecimal newX = oldW.subtract(newWidth).divide(divisor).add(oldX);
    BigDecimal newY = oldH.subtract(newHeight).divide(divisor).add(oldY);

    SizeType size = new SizeType();
    size.setHeight(newHeight);
    size.setWidth(newWidth);
    PositionType position = new PositionType();
    position.setX(newX);
    position.setY(newY);

    annType.setSize(size);
    annType.getPosition().remove(0);
    annType.getPosition().add(position);

    annotations.put(
        node.getId(), new AnnotationData(oldX, oldY, newX, newY, oldH, oldW, newHeight, newWidth));
  }
  /* Changes the size of the Gateway Node. */
  private void manipulateSplit(
      CanonicalProcessType cpf,
      AnnotationsType anf,
      GraphicsType splitGraphicsType,
      NodeType splitNode) {
    int index;
    BigDecimal newX, newY;
    PositionType position;
    GraphicsType targetAnn, targetEdgeAnn;
    SplitType split = (SplitType) splitNode;

    BigDecimal oldH = splitGraphicsType.getSize().getHeight();
    BigDecimal oldW = splitGraphicsType.getSize().getWidth();
    BigDecimal oldX = splitGraphicsType.getPosition().get(0).getX();
    BigDecimal oldY = splitGraphicsType.getPosition().get(0).getY();

    Map<EdgeType, NodeType> targets = findSplitNodeTargets(cpf, split.getId());
    for (Map.Entry<EdgeType, NodeType> target : targets.entrySet()) {
      targetAnn = findGraphicsType(anf, target.getValue().getId());
      targetEdgeAnn = findGraphicsType(anf, target.getKey().getId());

      if (targetAnn != null) {
        newX =
            targetAnn
                .getSize()
                .getWidth()
                .divide(divisor)
                .add(targetAnn.getPosition().get(0).getX());
        newY = targetAnn.getPosition().get(0).getY();

        index = 0;
        for (PositionType targetEdgePos : targetEdgeAnn.getPosition()) {
          if (!((targetEdgePos.getX().compareTo(oldX) > 0)
              && (targetEdgePos.getX().compareTo(oldX.add(oldW)) < 0)
              && (targetEdgePos.getY().compareTo(oldY) > 0)
              && (targetEdgePos.getY().compareTo(oldY.add(oldH)) < 0))) {
            position = new PositionType();
            position.setX(newX);
            position.setY(newY);

            targetEdgeAnn.getPosition().set(index, position);
          }
          index++;
        }
      }
    }
  }