Book a Demo

Author Topic: Are ports on PARTS different from ports on CLASSES?  (Read 2362 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Are ports on PARTS different from ports on CLASSES?
« on: August 05, 2020, 10:05:40 pm »
In the XMI export below, I noticed that the IDs for the ports are different. The connection is between the parts via ports which is okay, that was the intent and purpose of contextualized connections in composite structures. However, what gets me is that the two ports are truly unique (because their IDs are different). Why then have ports in the original classifier i.e. the class if they will never be referenced?

Code: [Select]
<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmi:version="2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.0" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
<uml:Model xmi:type="uml:Model" name="EA_Model">
<ownedMember xmi:type="uml:Package" xmi:id="EAPK_7F02365C_B923_4a19_AFFF_FEB1D5C9921C" name="ApplicationComposition">
<ownedMember xmi:type="uml:Package" xmi:id="EAPK_51FF1E9F_7CE8_488b_A27D_A55DA42134E3" name="Package1">
<ownedMember xmi:type="uml:Class" xmi:id="EAID_65BF0A86_600A_42fb_8111_487DEF9E0D3A" name="CompositeClass">
<ownedAttribute xmi:type="uml:Property" xmi:id="EAID_D9158193_EF6D_4b8d_BB55_42DC1A75BD60" name="Part1" aggregation="composite" isUnique="false">
<type xmi:idref="EAID_84DD4B11_DEFF_402f_AD6C_1C77AA1A7323"/>
<qualifier xmi:type="uml:Property" xmi:id="EAID_967CAC2B_24C7_42d4_980E_10DC60063DD5" name="Port2" visibility="private" associationEnd="EAID_D9158193_EF6D_4b8d_BB55_42DC1A75BD60" isUnique="false"/>
<qualifier xmi:type="uml:Port" xmi:id="EAID_967CAC2B_24C7_42d4_980E_10DC60063DD5" name="Port2" aggregation="composite" isService="false" isUnique="false"/>
</ownedAttribute>
<ownedConnector xmi:type="uml:Connector" xmi:id="EAID_E6BB220F_1C6B_40c6_9AE3_A07518E0822D">
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_SC000000_1C6B_40c6_9AE3_A07518E0822D" role="EAID_967CAC2B_24C7_42d4_980E_10DC60063DD5"/>
<end xmi:type="uml:ConnectorEnd" xmi:id="EAID_DS000000_1C6B_40c6_9AE3_A07518E0822D" role="EAID_8B27A7EA_BA17_4571_B645_F684FE9656C9"/>
</ownedConnector>
<ownedAttribute xmi:type="uml:Property" xmi:id="EAID_201C00C9_C94A_449f_9417_2858B030A3F3" name="Part2" aggregation="composite" isUnique="false">
<type xmi:idref="EAID_F56ECB8C_B1E2_4028_98CE_EBFFFB65AF5C"/>
<qualifier xmi:type="uml:Property" xmi:id="EAID_8B27A7EA_BA17_4571_B645_F684FE9656C9" name="Port1" visibility="private" associationEnd="EAID_201C00C9_C94A_449f_9417_2858B030A3F3" isUnique="false"/>
<qualifier xmi:type="uml:Port" xmi:id="EAID_8B27A7EA_BA17_4571_B645_F684FE9656C9" name="Port1" aggregation="composite" isService="false" isUnique="false"/>
</ownedAttribute>
</ownedMember>
</ownedMember>
<ownedMember xmi:type="uml:Package" xmi:id="EAPK_E24D344F_9FD9_4888_A3C6_99DF3D4DDCB4" name="Package2">
<ownedMember xmi:type="uml:Class" xmi:id="EAID_F56ECB8C_B1E2_4028_98CE_EBFFFB65AF5C" name="C1">
<ownedAttribute xmi:type="uml:Port" xmi:id="EAID_498D0762_CF5E_4055_BCD3_042F1E795F9C" name="Port1" aggregation="composite" isService="false" isUnique="false"/>
</ownedMember>
<ownedMember xmi:type="uml:Class" xmi:id="EAID_84DD4B11_DEFF_402f_AD6C_1C77AA1A7323" name="C2">
<ownedAttribute xmi:type="uml:Port" xmi:id="EAID_66A10780_7A6A_472d_A7FD_C3189C7D7977" name="Port2" aggregation="composite" isService="false" isUnique="false"/>
</ownedMember>
</ownedMember>
</ownedMember>
</uml:Model>
</xmi:XMI>

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Are ports on PARTS different from ports on CLASSES?
« Reply #1 on: August 05, 2020, 10:27:52 pm »
Yes, they are different. Ports on parts are Slots and merely doppelganger of the part's classifier's ports.

q.