Ejemplo n.º 1
0
  public boolean hasChildren() {
    PartnerLink partnerLink = (PartnerLink) modelObject;

    if (partnerLink == null) {
      return false;
    }

    Role role = partnerLink.getMyRole();
    if (role != null && !role.eIsProxy()) {
      return true;
    }
    role = partnerLink.getPartnerRole();
    if (role != null && !role.eIsProxy()) {
      return true;
    }
    return false;
  }
Ejemplo n.º 2
0
  public Object[] getChildren() {

    PartnerLink partnerLink = (PartnerLink) modelObject;

    if (partnerLink == null) {
      return EMPTY_ARRAY;
    }

    List<PortTypeTreeNode> list = new ArrayList<PortTypeTreeNode>(2);

    Role role = partnerLink.getMyRole();
    PortTypeTreeNode node = null;
    PortType portType = null;

    if (role != null && !role.eIsProxy()) {
      portType = (PortType) role.getPortType();
      if (portType != null) {
        node = new PortTypeTreeNode((PortType) role.getPortType(), isCondensed);
        node.setDerivedFromMyRole(true);
        list.add(node);
      }
    }

    role = partnerLink.getPartnerRole();

    if (role != null && !role.eIsProxy()) {
      portType = (PortType) role.getPortType();
      if (portType != null) {
        node = new PortTypeTreeNode((PortType) role.getPortType(), isCondensed);
        node.setDerivedFromPartnerRole(true);
        list.add(node);
      }
    }

    return list.toArray();
  }