Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Owned Elements
Owned Elements [message #506159] Wed, 06 January 2010 06:53 Go to next message
Randi  is currently offline Randi
Messages: 31
Registered: November 2009
Member
Hello All,

When I ask via getOwnedElements() all owned elements from a sequencediagram , it returns not all the elements .
If I do the same with other diagrams it went fine. Can anybody give a way in how I can get all the owned elements of a sequencediagram ?

I want to print these out as eg a String

Many thanks


Re: Owned Elements [message #506297 is a reply to message #506159] Wed, 06 January 2010 15:39 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hi Randi,

what do you mean by sequencediagram? Do you mean UML::Interaction
element? If so, please have a look at the semantics of the derived union
ownedElements. It will only return the directly owned elements of an
element, since the additional operation allOwnedElements() will return
all directly and indirectly ownedElements of UML::Interaction e.g.

HTH Timothy

Randi schrieb:
> Hello All,
>
> When I ask via getOwnedElements() all owned elements from a
> sequencediagram , it returns not all the elements .
> If I do the same with other diagrams it went fine. Can anybody give a
> way in how I can get all the owned elements of a sequencediagram ?
>
> I want to print these out as eg a String
>
> Many thanks
>
>
>
Re: Owned Elements [message #506347 is a reply to message #506297] Thu, 07 January 2010 03:49 Go to previous messageGo to next message
Randi  is currently offline Randi
Messages: 31
Registered: November 2009
Member
Thank you Marc , this solved the problem. Maybe an other question related to this. When I have a component eg
LifelineImpl@13d28e3 (name: :object1, visibility: <unset>)
I want to be sure I get all the attributes of this LifeLine , but I only get a name and visibility.Are this the only 2 attributes of a LifeLine.So how can I get all the attributes within Eclipse o a component/elemnt from a Interactiondiagram?

Many thanks
Re: Owned Elements [message #506377 is a reply to message #506347] Thu, 07 January 2010 05:48 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Again, take a look in the UML2 spec, to gather the relevant information,
but:

A Lifeline is a NamedElement, hence it owns mainly these both
attributes. However, a lifeline takes part in many association
relationsships. Since lifeline doesn't provide a union like
Classifier::/feature, which list you all features of this element, you
have to collect them manually, by investigating the spec...



Randi schrieb:
> Thank you Marc , this solved the problem. Maybe an other question
> related to this. When I have a component eg mailto:LifelineImpl@13d28e3
> (name: :object1, visibility: <unset>)
> I want to be sure I get all the attributes of this LifeLine , but I only
> get a name and visibility.Are this the only 2 attributes of a
> LifeLine.So how can I get all the attributes within Eclipse o a
> component/elemnt from a Interactiondiagram?
>
> Many thanks
Re: Owned Elements [message #506390 is a reply to message #506377] Thu, 07 January 2010 06:39 Go to previous messageGo to next message
Randi  is currently offline Randi
Messages: 31
Registered: November 2009
Member
Hello ,

MAny thanks for the answer. Is it so that in Eclipse all attributes I can find in de UMLSpec also are implemented in Eclipse ? Or have they made an abstratction , and only implemented the most important ? And if they have implented only the most important , where can I find those items which they have not implemented ?

Thanks
Re: Owned Elements [message #628158 is a reply to message #506297] Thu, 07 January 2010 03:49 Go to previous messageGo to next message
Randi  is currently offline Randi
Messages: 31
Registered: November 2009
Member
Thank you Marc , this solved the problem. Maybe an other question related to this. When I have a component eg
mailto:LifelineImpl@13d28e3 (name: :object1, visibility: <unset>)
I want to be sure I get all the attributes of this LifeLine , but I only get a name and visibility.Are this the only 2 attributes of a LifeLine.So how can I get all the attributes within Eclipse o a component/elemnt from a Interactiondiagram?

Many thanks
Re: Owned Elements [message #628159 is a reply to message #506347] Thu, 07 January 2010 05:48 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Again, take a look in the UML2 spec, to gather the relevant information,
but:

A Lifeline is a NamedElement, hence it owns mainly these both
attributes. However, a lifeline takes part in many association
relationsships. Since lifeline doesn't provide a union like
Classifier::/feature, which list you all features of this element, you
have to collect them manually, by investigating the spec...



Randi schrieb:
> Thank you Marc , this solved the problem. Maybe an other question
> related to this. When I have a component eg mailto:LifelineImpl@13d28e3
> (name: :object1, visibility: <unset>)
> I want to be sure I get all the attributes of this LifeLine , but I only
> get a name and visibility.Are this the only 2 attributes of a
> LifeLine.So how can I get all the attributes within Eclipse o a
> component/elemnt from a Interactiondiagram?
>
> Many thanks
Re: Owned Elements [message #628160 is a reply to message #506377] Thu, 07 January 2010 06:39 Go to previous message
Randi  is currently offline Randi
Messages: 31
Registered: November 2009
Member
Hello ,

MAny thanks for the answer. Is it so that in Eclipse all attributes I can find in de UMLSpec also are implemented in Eclipse ? Or have they made an abstratction , and only implemented the most important ? And if they have implented only the most important , where can I find those items which they have not implemented ?

Thanks
Previous Topic:Owned Elements
Next Topic:How to convert a XSD schema file into UML class model?
Goto Forum:
  


Current Time: Wed Jul 23 22:10:32 EDT 2014

Powered by FUDForum. Page generated in 0.02496 seconds