/**
   * Gets FigClassAssociationClass that is contained in this FigAssociationClass.
   *
   * @return FigClassAssociationClass that is contained in this FigAssociationClass.
   */
  public FigClassAssociationClass getAssociationClass() {
    FigEdgeAssociationClass figEdgeLink = null;
    List edges = null;

    FigEdgePort figEdgePort = this.getEdgePort();
    if (figEdgePort != null) {
      edges = figEdgePort.getFigEdges();
    }

    if (edges != null) {
      for (Iterator it = edges.iterator(); it.hasNext() && figEdgeLink == null; ) {
        Object o = it.next();
        if (o instanceof FigEdgeAssociationClass) {
          figEdgeLink = (FigEdgeAssociationClass) o;
        }
      }
    }

    FigNode figClassBox = null;
    if (figEdgeLink != null) {
      figClassBox = figEdgeLink.getDestFigNode();
      if (!(figClassBox instanceof FigClassAssociationClass)) {
        figClassBox = figEdgeLink.getSourceFigNode();
      }
    }
    return (FigClassAssociationClass) figClassBox;
  }
  /**
   * Remove entire composite Fig from Diagram. Discover the attached FigEdgeAssociationClass and the
   * FigClassAssociationClass attached to that. Remove them from the diagram before removing this.
   */
  @Override
  protected void removeFromDiagramImpl() {
    FigEdgeAssociationClass figEdgeLink = null;
    List edges = null;

    FigEdgePort figEdgePort = getEdgePort();
    if (figEdgePort != null) {
      edges = figEdgePort.getFigEdges();
    }

    if (edges != null) {
      for (Iterator it = edges.iterator(); it.hasNext() && figEdgeLink == null; ) {
        Object o = it.next();
        if (o instanceof FigEdgeAssociationClass) {
          figEdgeLink = (FigEdgeAssociationClass) o;
        }
      }
    }

    if (figEdgeLink != null) {
      FigNode figClassBox = figEdgeLink.getDestFigNode();
      if (!(figClassBox instanceof FigClassAssociationClass)) {
        figClassBox = figEdgeLink.getSourceFigNode();
      }
      figEdgeLink.removeFromDiagramImpl();
      ((FigClassAssociationClass) figClassBox).removeFromDiagramImpl();
    }

    super.removeFromDiagramImpl();
  }
  /**
   * Gets FigEdgeAssociationClass that is contained in this FigAssociationClass.
   *
   * @return FigEdgeAssociationClass that is contained in this FigAssociationClass
   */
  public FigEdgeAssociationClass getFigEdgeAssociationClass() {
    FigEdgeAssociationClass figEdgeLink = null;
    List edges = null;

    FigEdgePort figEdgePort = this.getEdgePort();
    if (figEdgePort != null) {
      edges = figEdgePort.getFigEdges();
    }

    if (edges != null) {
      for (Iterator it = edges.iterator(); it.hasNext() && figEdgeLink == null; ) {
        Object o = it.next();
        if (o instanceof FigEdgeAssociationClass) {
          figEdgeLink = (FigEdgeAssociationClass) o;
        }
      }
    }

    return figEdgeLink;
  }