Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » part/port and property
part/port and property [message #476653] Wed, 21 November 2007 02:30 Go to next message
charfi asma is currently offline charfi asmaFriend
Messages: 78
Registered: July 2009
Member
hello
I saw in the uml superstructure that the aggregation propoerty of a port
must be composite.
although, when we want to define a part in an uml component, we chose
composite in agregation property
so when we call self.part we did not get only parts but olso ports
we have self.ownedPort to get ports and self.ownedAttribute to get all
attributes (parts and ports) so the question is why we have not an ownedPart
which give us only parts
to get only part I write
self.ownedAttribute.eClass().name='Property'.

is there any other method?

thank you
Re: part/port and property [message #476655 is a reply to message #476653] Wed, 21 November 2007 15:25 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Charfi,

According to the spec, the StructuredClassifier::part[0..*] is a derived
collection 'selecting those owned properties where isComposite = true'.
According to the spec, the collection is called part, and not ownedPart but
still returns '..owned properties..'.

According to the definition (mentioned above), calling getParts() should
also return Ports. [ see p. 186 ]. Port is also a specialization of
Property.

I understand that you might not expect to get ports back when calling
getParts() but I believe the implementation follows the spec.

- James.


"charfi asma" <asma@charfi.com> wrote in message
news:fhv5lp$o7o$1@build.eclipse.org...
> hello
> I saw in the uml superstructure that the aggregation propoerty of a port
> must be composite.
> although, when we want to define a part in an uml component, we chose
> composite in agregation property
> so when we call self.part we did not get only parts but olso ports
> we have self.ownedPort to get ports and self.ownedAttribute to get all
> attributes (parts and ports) so the question is why we have not an
> ownedPart which give us only parts
> to get only part I write
> self.ownedAttribute.eClass().name='Property'.
>
> is there any other method?
>
> thank you
>
>
Re: part/port and property [message #625555 is a reply to message #476653] Wed, 21 November 2007 15:25 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Charfi,

According to the spec, the StructuredClassifier::part[0..*] is a derived
collection 'selecting those owned properties where isComposite = true'.
According to the spec, the collection is called part, and not ownedPart but
still returns '..owned properties..'.

According to the definition (mentioned above), calling getParts() should
also return Ports. [ see p. 186 ]. Port is also a specialization of
Property.

I understand that you might not expect to get ports back when calling
getParts() but I believe the implementation follows the spec.

- James.


"charfi asma" <asma@charfi.com> wrote in message
news:fhv5lp$o7o$1@build.eclipse.org...
> hello
> I saw in the uml superstructure that the aggregation propoerty of a port
> must be composite.
> although, when we want to define a part in an uml component, we chose
> composite in agregation property
> so when we call self.part we did not get only parts but olso ports
> we have self.ownedPort to get ports and self.ownedAttribute to get all
> attributes (parts and ports) so the question is why we have not an
> ownedPart which give us only parts
> to get only part I write
> self.ownedAttribute.eClass().name='Property'.
>
> is there any other method?
>
> thank you
>
>
Previous Topic:part/port and property
Next Topic:Instance Specification in Composite Structure diagram
Goto Forum:
  


Current Time: Thu Apr 25 10:32:10 GMT 2024

Powered by FUDForum. Page generated in 0.04098 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top