Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » problem with the persistence of the applied stereo type.
problem with the persistence of the applied stereo type. [message #475861] Thu, 13 September 2007 14:02 Go to next message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

Hi,
I am trying to apply UML stereo type on UML property .it's getting applied
properly and i can get the applied stereo type and values back too.
but when i see the XMI file , i don't see the stereo type attached---
can any body help me out --what may be the problem--
Re: problem with the persistence of the applied stereo type. [message #475863 is a reply to message #475861] Thu, 13 September 2007 19:05 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Raju,

Stereotype applications appear at the bottom of the serialized model and
have references back to the elements they are applied to. If you can
programatically set stereotype values and retrieve them, then the
information is being serialized. The information is hiding there somewhere
;)

- James.


"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcbfto$qr4$1@build.eclipse.org...
> Hi,
> I am trying to apply UML stereo type on UML property .it's getting applied
> properly and i can get the applied stereo type and values back too.
> but when i see the XMI file , i don't see the stereo type attached---
> can any body help me out --what may be the problem--
>
>
Re: problem with the persistence of the applied stereo type. [message #475864 is a reply to message #475863] Fri, 14 September 2007 06:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

i am not able to figure out where it is hiding -----
what should i do to make sure that serialization is happenning properly.
one case i observed ,if i apply stereo type just after creating the uml
property in the folowing way,
Property prop = createAttribute(dataObject.getUmlClass(),
attribute.getName(), type,
attribute.getLowerBound(),attribute.getUpperBound());
Stereotype eAttributeStrType =
profileLoader.getStereoType(model,"Attribute");

if(eAttributeStrType != null){

EObject eobject = prop.applyStereotype(eAttributeStrType);

}

it doesn't get serialized.

but if i create model first and then iterate thrugh the uml properties and
apply stereo type ,then it gets serialized properly.

List<Property> attributeList = clazzElement.getOwnedAttributes();

for (Property propertyElement : attributeList) {

propertyElement.applyStereotype(st);


}


i will be highly thankful for any kind of help.let me know if i am doing any
thing wrong with the first case.






"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fcc1mj$bps$2@build.eclipse.org...
> Hi Raju,
>
> Stereotype applications appear at the bottom of the serialized model and
> have references back to the elements they are applied to. If you can
> programatically set stereotype values and retrieve them, then the
> information is being serialized. The information is hiding there
> somewhere
> ;)
>
> - James.
>
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcbfto$qr4$1@build.eclipse.org...
>> Hi,
>> I am trying to apply UML stereo type on UML property .it's getting
>> applied
>> properly and i can get the applied stereo type and values back too.
>> but when i see the XMI file , i don't see the stereo type attached---
>> can any body help me out --what may be the problem--
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #475895 is a reply to message #475864] Fri, 14 September 2007 13:53 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Some comments below ...


"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcd9g8$kf8$1@build.eclipse.org...
> i am not able to figure out where it is hiding -----

Did you look at the bottom of the serialized model as previously suggested?
What do you see at the bottom of the model?

> what should i do to make sure that serialization is happenning properly.
> one case i observed ,if i apply stereo type just after creating the uml
> property in the folowing way,
> Property prop = createAttribute(dataObject.getUmlClass(),
> attribute.getName(), type,
> attribute.getLowerBound(),attribute.getUpperBound());
> Stereotype eAttributeStrType =
> profileLoader.getStereoType(model,"Attribute");
>
> if(eAttributeStrType != null){
>
> EObject eobject = prop.applyStereotype(eAttributeStrType);
>
> }
>
> it doesn't get serialized.

.... Do you mean you just can't see the values in the serialized model or
that if you try to obtain the stereotype programmatically that they are not
correctly returned?


>
> but if i create model first and then iterate thrugh the uml properties and
> apply stereo type ,then it gets serialized properly.

When you say it gets serialized properly, you mean that you can see it in
the xmi?


>
> List<Property> attributeList = clazzElement.getOwnedAttributes();
>
> for (Property propertyElement : attributeList) {
>
> propertyElement.applyStereotype(st);
>
>
> }
>
>
> i will be highly thankful for any kind of help.let me know if i am doing
any
> thing wrong with the first case.


In your original posting you said that you could programatically apply
stereotypes, set values and get them back but that you could not see them in
the xmi file. If you post your model, I can point out where the
stereotypes are.


>
>
>
>
>
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fcc1mj$bps$2@build.eclipse.org...
> > Hi Raju,
> >
> > Stereotype applications appear at the bottom of the serialized model and
> > have references back to the elements they are applied to. If you can
> > programatically set stereotype values and retrieve them, then the
> > information is being serialized. The information is hiding there
> > somewhere
> > ;)
> >
> > - James.
> >
> >
> > "Raju Mishra" <rmishra@tibco.com> wrote in message
> > news:fcbfto$qr4$1@build.eclipse.org...
> >> Hi,
> >> I am trying to apply UML stereo type on UML property .it's getting
> >> applied
> >> properly and i can get the applied stereo type and values back too.
> >> but when i see the XMI file , i don't see the stereo type attached---
> >> can any body help me out --what may be the problem--
> >>
> >>
> >
> >
>
>
Re: problem with the persistence of the applied stereo type. [message #475896 is a reply to message #475864] Fri, 14 September 2007 13:53 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Raju,

Have the model elements been added to a resource before applying the
stereotypes, or are you adding all of the elements to a resource just before
saving. If the latter, you'll need to explicitly add all the stereotype
applications to the resource before saving the resource...

Kenn

"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcd9g8$kf8$1@build.eclipse.org...
>i am not able to figure out where it is hiding -----
> what should i do to make sure that serialization is happenning properly.
> one case i observed ,if i apply stereo type just after creating the uml
> property in the folowing way,
> Property prop = createAttribute(dataObject.getUmlClass(),
> attribute.getName(), type,
> attribute.getLowerBound(),attribute.getUpperBound());
> Stereotype eAttributeStrType =
> profileLoader.getStereoType(model,"Attribute");
>
> if(eAttributeStrType != null){
>
> EObject eobject = prop.applyStereotype(eAttributeStrType);
>
> }
>
> it doesn't get serialized.
>
> but if i create model first and then iterate thrugh the uml properties and
> apply stereo type ,then it gets serialized properly.
>
> List<Property> attributeList = clazzElement.getOwnedAttributes();
>
> for (Property propertyElement : attributeList) {
>
> propertyElement.applyStereotype(st);
>
>
> }
>
>
> i will be highly thankful for any kind of help.let me know if i am doing
> any thing wrong with the first case.
>
>
>
>
>
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fcc1mj$bps$2@build.eclipse.org...
>> Hi Raju,
>>
>> Stereotype applications appear at the bottom of the serialized model and
>> have references back to the elements they are applied to. If you can
>> programatically set stereotype values and retrieve them, then the
>> information is being serialized. The information is hiding there
>> somewhere
>> ;)
>>
>> - James.
>>
>>
>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>> news:fcbfto$qr4$1@build.eclipse.org...
>>> Hi,
>>> I am trying to apply UML stereo type on UML property .it's getting
>>> applied
>>> properly and i can get the applied stereo type and values back too.
>>> but when i see the XMI file , i don't see the stereo type attached---
>>> can any body help me out --what may be the problem--
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #475915 is a reply to message #475896] Tue, 18 September 2007 06:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

thanks a lot--
i was adding all the elements including stereo types to the model and then
adding it to the resource.This way i need to apply stereo types explicitly
to make it serialized.
if i add model to the resource and then add all the elements including
stereo types to the model ,every thing gets serialized properly.

once again thanks alot---But one thing i m wondering ,even in the first case
it should work fine.Is it a bug-----

"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fce3oa$cpi$1@build.eclipse.org...
> Raju,
>
> Have the model elements been added to a resource before applying the
> stereotypes, or are you adding all of the elements to a resource just
> before saving. If the latter, you'll need to explicitly add all the
> stereotype applications to the resource before saving the resource...
>
> Kenn
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcd9g8$kf8$1@build.eclipse.org...
>>i am not able to figure out where it is hiding -----
>> what should i do to make sure that serialization is happenning properly.
>> one case i observed ,if i apply stereo type just after creating the uml
>> property in the folowing way,
>> Property prop = createAttribute(dataObject.getUmlClass(),
>> attribute.getName(), type,
>> attribute.getLowerBound(),attribute.getUpperBound());
>> Stereotype eAttributeStrType =
>> profileLoader.getStereoType(model,"Attribute");
>>
>> if(eAttributeStrType != null){
>>
>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>
>> }
>>
>> it doesn't get serialized.
>>
>> but if i create model first and then iterate thrugh the uml properties
>> and apply stereo type ,then it gets serialized properly.
>>
>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>
>> for (Property propertyElement : attributeList) {
>>
>> propertyElement.applyStereotype(st);
>>
>>
>> }
>>
>>
>> i will be highly thankful for any kind of help.let me know if i am doing
>> any thing wrong with the first case.
>>
>>
>>
>>
>>
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:fcc1mj$bps$2@build.eclipse.org...
>>> Hi Raju,
>>>
>>> Stereotype applications appear at the bottom of the serialized model and
>>> have references back to the elements they are applied to. If you can
>>> programatically set stereotype values and retrieve them, then the
>>> information is being serialized. The information is hiding there
>>> somewhere
>>> ;)
>>>
>>> - James.
>>>
>>>
>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>> news:fcbfto$qr4$1@build.eclipse.org...
>>>> Hi,
>>>> I am trying to apply UML stereo type on UML property .it's getting
>>>> applied
>>>> properly and i can get the applied stereo type and values back too.
>>>> but when i see the XMI file , i don't see the stereo type attached---
>>>> can any body help me out --what may be the problem--
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #475916 is a reply to message #475895] Tue, 18 September 2007 06:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

Hi James,
i was adding all the elements including stereo types to the model and then
adding it to the resource.This way i need to apply stereo types explicitly
to make it serialized.
if i add model to the resource and then add all the elements including
stereo types to the model ,every thing gets serialized properly.
It should work with the first approach also--i don't know why it doesn't
work.

Thanks for your help---

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fce3nv$cod$2@build.eclipse.org...
> Some comments below ...
>
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcd9g8$kf8$1@build.eclipse.org...
>> i am not able to figure out where it is hiding -----
>
> Did you look at the bottom of the serialized model as previously
> suggested?
> What do you see at the bottom of the model?
>
>> what should i do to make sure that serialization is happenning properly.
>> one case i observed ,if i apply stereo type just after creating the uml
>> property in the folowing way,
>> Property prop = createAttribute(dataObject.getUmlClass(),
>> attribute.getName(), type,
>> attribute.getLowerBound(),attribute.getUpperBound());
>> Stereotype eAttributeStrType =
>> profileLoader.getStereoType(model,"Attribute");
>>
>> if(eAttributeStrType != null){
>>
>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>
>> }
>>
>> it doesn't get serialized.
>
> ... Do you mean you just can't see the values in the serialized model or
> that if you try to obtain the stereotype programmatically that they are
> not
> correctly returned?
>
>
>>
>> but if i create model first and then iterate thrugh the uml properties
>> and
>> apply stereo type ,then it gets serialized properly.
>
> When you say it gets serialized properly, you mean that you can see it in
> the xmi?
>
>
>>
>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>
>> for (Property propertyElement : attributeList) {
>>
>> propertyElement.applyStereotype(st);
>>
>>
>> }
>>
>>
>> i will be highly thankful for any kind of help.let me know if i am doing
> any
>> thing wrong with the first case.
>
>
> In your original posting you said that you could programatically apply
> stereotypes, set values and get them back but that you could not see them
> in
> the xmi file. If you post your model, I can point out where the
> stereotypes are.
>
>
>>
>>
>>
>>
>>
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:fcc1mj$bps$2@build.eclipse.org...
>> > Hi Raju,
>> >
>> > Stereotype applications appear at the bottom of the serialized model
>> > and
>> > have references back to the elements they are applied to. If you can
>> > programatically set stereotype values and retrieve them, then the
>> > information is being serialized. The information is hiding there
>> > somewhere
>> > ;)
>> >
>> > - James.
>> >
>> >
>> > "Raju Mishra" <rmishra@tibco.com> wrote in message
>> > news:fcbfto$qr4$1@build.eclipse.org...
>> >> Hi,
>> >> I am trying to apply UML stereo type on UML property .it's getting
>> >> applied
>> >> properly and i can get the applied stereo type and values back too.
>> >> but when i see the XMI file , i don't see the stereo type attached---
>> >> can any body help me out --what may be the problem--
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #475919 is a reply to message #475915] Tue, 18 September 2007 16:02 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Raju,

This works as designed. Stereotype applications are separate objects that
typically live at the root of the resource containing the elements they are
applied to (although they could in fact live in a separate resource),
because they are not contained within the hierarchy of UML elements (as per
the specification). Without the context of a resource to attach the object
to, when a stereotype is applied, the stereotype application isn't contained
anywhere - that's why, if you wait until later to add your model elements to
a resource, they need to be explicitly attached to the same (or different)
resource in order to be serialized.

Kenn

"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcnrh7$iph$1@build.eclipse.org...
> thanks a lot--
> i was adding all the elements including stereo types to the model and then
> adding it to the resource.This way i need to apply stereo types explicitly
> to make it serialized.
> if i add model to the resource and then add all the elements including
> stereo types to the model ,every thing gets serialized properly.
>
> once again thanks alot---But one thing i m wondering ,even in the first
> case it should work fine.Is it a bug-----
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
> news:fce3oa$cpi$1@build.eclipse.org...
>> Raju,
>>
>> Have the model elements been added to a resource before applying the
>> stereotypes, or are you adding all of the elements to a resource just
>> before saving. If the latter, you'll need to explicitly add all the
>> stereotype applications to the resource before saving the resource...
>>
>> Kenn
>>
>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>> news:fcd9g8$kf8$1@build.eclipse.org...
>>>i am not able to figure out where it is hiding -----
>>> what should i do to make sure that serialization is happenning properly.
>>> one case i observed ,if i apply stereo type just after creating the uml
>>> property in the folowing way,
>>> Property prop = createAttribute(dataObject.getUmlClass(),
>>> attribute.getName(), type,
>>> attribute.getLowerBound(),attribute.getUpperBound());
>>> Stereotype eAttributeStrType =
>>> profileLoader.getStereoType(model,"Attribute");
>>>
>>> if(eAttributeStrType != null){
>>>
>>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>>
>>> }
>>>
>>> it doesn't get serialized.
>>>
>>> but if i create model first and then iterate thrugh the uml properties
>>> and apply stereo type ,then it gets serialized properly.
>>>
>>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>>
>>> for (Property propertyElement : attributeList) {
>>>
>>> propertyElement.applyStereotype(st);
>>>
>>>
>>> }
>>>
>>>
>>> i will be highly thankful for any kind of help.let me know if i am doing
>>> any thing wrong with the first case.
>>>
>>>
>>>
>>>
>>>
>>>
>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>> news:fcc1mj$bps$2@build.eclipse.org...
>>>> Hi Raju,
>>>>
>>>> Stereotype applications appear at the bottom of the serialized model
>>>> and
>>>> have references back to the elements they are applied to. If you can
>>>> programatically set stereotype values and retrieve them, then the
>>>> information is being serialized. The information is hiding there
>>>> somewhere
>>>> ;)
>>>>
>>>> - James.
>>>>
>>>>
>>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>>> news:fcbfto$qr4$1@build.eclipse.org...
>>>>> Hi,
>>>>> I am trying to apply UML stereo type on UML property .it's getting
>>>>> applied
>>>>> properly and i can get the applied stereo type and values back too.
>>>>> but when i see the XMI file , i don't see the stereo type attached---
>>>>> can any body help me out --what may be the problem--
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #475920 is a reply to message #475916] Tue, 18 September 2007 16:02 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Raju,

See my reply to your other posting.

Kenn

"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcnrls$l3d$1@build.eclipse.org...
> Hi James,
> i was adding all the elements including stereo types to the model and then
> adding it to the resource.This way i need to apply stereo types explicitly
> to make it serialized.
> if i add model to the resource and then add all the elements including
> stereo types to the model ,every thing gets serialized properly.
> It should work with the first approach also--i don't know why it doesn't
> work.
>
> Thanks for your help---
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fce3nv$cod$2@build.eclipse.org...
>> Some comments below ...
>>
>>
>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>> news:fcd9g8$kf8$1@build.eclipse.org...
>>> i am not able to figure out where it is hiding -----
>>
>> Did you look at the bottom of the serialized model as previously
>> suggested?
>> What do you see at the bottom of the model?
>>
>>> what should i do to make sure that serialization is happenning properly.
>>> one case i observed ,if i apply stereo type just after creating the uml
>>> property in the folowing way,
>>> Property prop = createAttribute(dataObject.getUmlClass(),
>>> attribute.getName(), type,
>>> attribute.getLowerBound(),attribute.getUpperBound());
>>> Stereotype eAttributeStrType =
>>> profileLoader.getStereoType(model,"Attribute");
>>>
>>> if(eAttributeStrType != null){
>>>
>>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>>
>>> }
>>>
>>> it doesn't get serialized.
>>
>> ... Do you mean you just can't see the values in the serialized model or
>> that if you try to obtain the stereotype programmatically that they are
>> not
>> correctly returned?
>>
>>
>>>
>>> but if i create model first and then iterate thrugh the uml properties
>>> and
>>> apply stereo type ,then it gets serialized properly.
>>
>> When you say it gets serialized properly, you mean that you can see it in
>> the xmi?
>>
>>
>>>
>>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>>
>>> for (Property propertyElement : attributeList) {
>>>
>>> propertyElement.applyStereotype(st);
>>>
>>>
>>> }
>>>
>>>
>>> i will be highly thankful for any kind of help.let me know if i am doing
>> any
>>> thing wrong with the first case.
>>
>>
>> In your original posting you said that you could programatically apply
>> stereotypes, set values and get them back but that you could not see them
>> in
>> the xmi file. If you post your model, I can point out where the
>> stereotypes are.
>>
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>> news:fcc1mj$bps$2@build.eclipse.org...
>>> > Hi Raju,
>>> >
>>> > Stereotype applications appear at the bottom of the serialized model
>>> > and
>>> > have references back to the elements they are applied to. If you can
>>> > programatically set stereotype values and retrieve them, then the
>>> > information is being serialized. The information is hiding there
>>> > somewhere
>>> > ;)
>>> >
>>> > - James.
>>> >
>>> >
>>> > "Raju Mishra" <rmishra@tibco.com> wrote in message
>>> > news:fcbfto$qr4$1@build.eclipse.org...
>>> >> Hi,
>>> >> I am trying to apply UML stereo type on UML property .it's getting
>>> >> applied
>>> >> properly and i can get the applied stereo type and values back too.
>>> >> but when i see the XMI file , i don't see the stereo type attached---
>>> >> can any body help me out --what may be the problem--
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #476007 is a reply to message #475919] Wed, 19 September 2007 06:43 Go to previous message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

Thanks kenn , i got your point---
"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fcosq5$6fh$1@build.eclipse.org...
> Raju,
>
> This works as designed. Stereotype applications are separate objects that
> typically live at the root of the resource containing the elements they
> are applied to (although they could in fact live in a separate resource),
> because they are not contained within the hierarchy of UML elements (as
> per the specification). Without the context of a resource to attach the
> object to, when a stereotype is applied, the stereotype application isn't
> contained anywhere - that's why, if you wait until later to add your model
> elements to a resource, they need to be explicitly attached to the same
> (or different) resource in order to be serialized.
>
> Kenn
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcnrh7$iph$1@build.eclipse.org...
>> thanks a lot--
>> i was adding all the elements including stereo types to the model and
>> then adding it to the resource.This way i need to apply stereo types
>> explicitly to make it serialized.
>> if i add model to the resource and then add all the elements including
>> stereo types to the model ,every thing gets serialized properly.
>>
>> once again thanks alot---But one thing i m wondering ,even in the first
>> case it should work fine.Is it a bug-----
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
>> news:fce3oa$cpi$1@build.eclipse.org...
>>> Raju,
>>>
>>> Have the model elements been added to a resource before applying the
>>> stereotypes, or are you adding all of the elements to a resource just
>>> before saving. If the latter, you'll need to explicitly add all the
>>> stereotype applications to the resource before saving the resource...
>>>
>>> Kenn
>>>
>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>> news:fcd9g8$kf8$1@build.eclipse.org...
>>>>i am not able to figure out where it is hiding -----
>>>> what should i do to make sure that serialization is happenning
>>>> properly.
>>>> one case i observed ,if i apply stereo type just after creating the
>>>> uml property in the folowing way,
>>>> Property prop = createAttribute(dataObject.getUmlClass(),
>>>> attribute.getName(), type,
>>>> attribute.getLowerBound(),attribute.getUpperBound());
>>>> Stereotype eAttributeStrType =
>>>> profileLoader.getStereoType(model,"Attribute");
>>>>
>>>> if(eAttributeStrType != null){
>>>>
>>>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>>>
>>>> }
>>>>
>>>> it doesn't get serialized.
>>>>
>>>> but if i create model first and then iterate thrugh the uml properties
>>>> and apply stereo type ,then it gets serialized properly.
>>>>
>>>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>>>
>>>> for (Property propertyElement : attributeList) {
>>>>
>>>> propertyElement.applyStereotype(st);
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>> i will be highly thankful for any kind of help.let me know if i am
>>>> doing any thing wrong with the first case.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>>> news:fcc1mj$bps$2@build.eclipse.org...
>>>>> Hi Raju,
>>>>>
>>>>> Stereotype applications appear at the bottom of the serialized model
>>>>> and
>>>>> have references back to the elements they are applied to. If you can
>>>>> programatically set stereotype values and retrieve them, then the
>>>>> information is being serialized. The information is hiding there
>>>>> somewhere
>>>>> ;)
>>>>>
>>>>> - James.
>>>>>
>>>>>
>>>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>>>> news:fcbfto$qr4$1@build.eclipse.org...
>>>>>> Hi,
>>>>>> I am trying to apply UML stereo type on UML property .it's getting
>>>>>> applied
>>>>>> properly and i can get the applied stereo type and values back too.
>>>>>> but when i see the XMI file , i don't see the stereo type attached---
>>>>>> can any body help me out --what may be the problem--
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624754 is a reply to message #475861] Thu, 13 September 2007 19:05 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Raju,

Stereotype applications appear at the bottom of the serialized model and
have references back to the elements they are applied to. If you can
programatically set stereotype values and retrieve them, then the
information is being serialized. The information is hiding there somewhere
;)

- James.


"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcbfto$qr4$1@build.eclipse.org...
> Hi,
> I am trying to apply UML stereo type on UML property .it's getting applied
> properly and i can get the applied stereo type and values back too.
> but when i see the XMI file , i don't see the stereo type attached---
> can any body help me out --what may be the problem--
>
>
Re: problem with the persistence of the applied stereo type. [message #624755 is a reply to message #475863] Fri, 14 September 2007 06:25 Go to previous message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

i am not able to figure out where it is hiding -----
what should i do to make sure that serialization is happenning properly.
one case i observed ,if i apply stereo type just after creating the uml
property in the folowing way,
Property prop = createAttribute(dataObject.getUmlClass(),
attribute.getName(), type,
attribute.getLowerBound(),attribute.getUpperBound());
Stereotype eAttributeStrType =
profileLoader.getStereoType(model,"Attribute");

if(eAttributeStrType != null){

EObject eobject = prop.applyStereotype(eAttributeStrType);

}

it doesn't get serialized.

but if i create model first and then iterate thrugh the uml properties and
apply stereo type ,then it gets serialized properly.

List<Property> attributeList = clazzElement.getOwnedAttributes();

for (Property propertyElement : attributeList) {

propertyElement.applyStereotype(st);


}


i will be highly thankful for any kind of help.let me know if i am doing any
thing wrong with the first case.






"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fcc1mj$bps$2@build.eclipse.org...
> Hi Raju,
>
> Stereotype applications appear at the bottom of the serialized model and
> have references back to the elements they are applied to. If you can
> programatically set stereotype values and retrieve them, then the
> information is being serialized. The information is hiding there
> somewhere
> ;)
>
> - James.
>
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcbfto$qr4$1@build.eclipse.org...
>> Hi,
>> I am trying to apply UML stereo type on UML property .it's getting
>> applied
>> properly and i can get the applied stereo type and values back too.
>> but when i see the XMI file , i don't see the stereo type attached---
>> can any body help me out --what may be the problem--
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624787 is a reply to message #475864] Fri, 14 September 2007 13:53 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Some comments below ...


"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcd9g8$kf8$1@build.eclipse.org...
> i am not able to figure out where it is hiding -----

Did you look at the bottom of the serialized model as previously suggested?
What do you see at the bottom of the model?

> what should i do to make sure that serialization is happenning properly.
> one case i observed ,if i apply stereo type just after creating the uml
> property in the folowing way,
> Property prop = createAttribute(dataObject.getUmlClass(),
> attribute.getName(), type,
> attribute.getLowerBound(),attribute.getUpperBound());
> Stereotype eAttributeStrType =
> profileLoader.getStereoType(model,"Attribute");
>
> if(eAttributeStrType != null){
>
> EObject eobject = prop.applyStereotype(eAttributeStrType);
>
> }
>
> it doesn't get serialized.

.... Do you mean you just can't see the values in the serialized model or
that if you try to obtain the stereotype programmatically that they are not
correctly returned?


>
> but if i create model first and then iterate thrugh the uml properties and
> apply stereo type ,then it gets serialized properly.

When you say it gets serialized properly, you mean that you can see it in
the xmi?


>
> List<Property> attributeList = clazzElement.getOwnedAttributes();
>
> for (Property propertyElement : attributeList) {
>
> propertyElement.applyStereotype(st);
>
>
> }
>
>
> i will be highly thankful for any kind of help.let me know if i am doing
any
> thing wrong with the first case.


In your original posting you said that you could programatically apply
stereotypes, set values and get them back but that you could not see them in
the xmi file. If you post your model, I can point out where the
stereotypes are.


>
>
>
>
>
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fcc1mj$bps$2@build.eclipse.org...
> > Hi Raju,
> >
> > Stereotype applications appear at the bottom of the serialized model and
> > have references back to the elements they are applied to. If you can
> > programatically set stereotype values and retrieve them, then the
> > information is being serialized. The information is hiding there
> > somewhere
> > ;)
> >
> > - James.
> >
> >
> > "Raju Mishra" <rmishra@tibco.com> wrote in message
> > news:fcbfto$qr4$1@build.eclipse.org...
> >> Hi,
> >> I am trying to apply UML stereo type on UML property .it's getting
> >> applied
> >> properly and i can get the applied stereo type and values back too.
> >> but when i see the XMI file , i don't see the stereo type attached---
> >> can any body help me out --what may be the problem--
> >>
> >>
> >
> >
>
>
Re: problem with the persistence of the applied stereo type. [message #624788 is a reply to message #475864] Fri, 14 September 2007 13:53 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Raju,

Have the model elements been added to a resource before applying the
stereotypes, or are you adding all of the elements to a resource just before
saving. If the latter, you'll need to explicitly add all the stereotype
applications to the resource before saving the resource...

Kenn

"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcd9g8$kf8$1@build.eclipse.org...
>i am not able to figure out where it is hiding -----
> what should i do to make sure that serialization is happenning properly.
> one case i observed ,if i apply stereo type just after creating the uml
> property in the folowing way,
> Property prop = createAttribute(dataObject.getUmlClass(),
> attribute.getName(), type,
> attribute.getLowerBound(),attribute.getUpperBound());
> Stereotype eAttributeStrType =
> profileLoader.getStereoType(model,"Attribute");
>
> if(eAttributeStrType != null){
>
> EObject eobject = prop.applyStereotype(eAttributeStrType);
>
> }
>
> it doesn't get serialized.
>
> but if i create model first and then iterate thrugh the uml properties and
> apply stereo type ,then it gets serialized properly.
>
> List<Property> attributeList = clazzElement.getOwnedAttributes();
>
> for (Property propertyElement : attributeList) {
>
> propertyElement.applyStereotype(st);
>
>
> }
>
>
> i will be highly thankful for any kind of help.let me know if i am doing
> any thing wrong with the first case.
>
>
>
>
>
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fcc1mj$bps$2@build.eclipse.org...
>> Hi Raju,
>>
>> Stereotype applications appear at the bottom of the serialized model and
>> have references back to the elements they are applied to. If you can
>> programatically set stereotype values and retrieve them, then the
>> information is being serialized. The information is hiding there
>> somewhere
>> ;)
>>
>> - James.
>>
>>
>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>> news:fcbfto$qr4$1@build.eclipse.org...
>>> Hi,
>>> I am trying to apply UML stereo type on UML property .it's getting
>>> applied
>>> properly and i can get the applied stereo type and values back too.
>>> but when i see the XMI file , i don't see the stereo type attached---
>>> can any body help me out --what may be the problem--
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624808 is a reply to message #475896] Tue, 18 September 2007 06:34 Go to previous message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

thanks a lot--
i was adding all the elements including stereo types to the model and then
adding it to the resource.This way i need to apply stereo types explicitly
to make it serialized.
if i add model to the resource and then add all the elements including
stereo types to the model ,every thing gets serialized properly.

once again thanks alot---But one thing i m wondering ,even in the first case
it should work fine.Is it a bug-----

"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fce3oa$cpi$1@build.eclipse.org...
> Raju,
>
> Have the model elements been added to a resource before applying the
> stereotypes, or are you adding all of the elements to a resource just
> before saving. If the latter, you'll need to explicitly add all the
> stereotype applications to the resource before saving the resource...
>
> Kenn
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcd9g8$kf8$1@build.eclipse.org...
>>i am not able to figure out where it is hiding -----
>> what should i do to make sure that serialization is happenning properly.
>> one case i observed ,if i apply stereo type just after creating the uml
>> property in the folowing way,
>> Property prop = createAttribute(dataObject.getUmlClass(),
>> attribute.getName(), type,
>> attribute.getLowerBound(),attribute.getUpperBound());
>> Stereotype eAttributeStrType =
>> profileLoader.getStereoType(model,"Attribute");
>>
>> if(eAttributeStrType != null){
>>
>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>
>> }
>>
>> it doesn't get serialized.
>>
>> but if i create model first and then iterate thrugh the uml properties
>> and apply stereo type ,then it gets serialized properly.
>>
>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>
>> for (Property propertyElement : attributeList) {
>>
>> propertyElement.applyStereotype(st);
>>
>>
>> }
>>
>>
>> i will be highly thankful for any kind of help.let me know if i am doing
>> any thing wrong with the first case.
>>
>>
>>
>>
>>
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:fcc1mj$bps$2@build.eclipse.org...
>>> Hi Raju,
>>>
>>> Stereotype applications appear at the bottom of the serialized model and
>>> have references back to the elements they are applied to. If you can
>>> programatically set stereotype values and retrieve them, then the
>>> information is being serialized. The information is hiding there
>>> somewhere
>>> ;)
>>>
>>> - James.
>>>
>>>
>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>> news:fcbfto$qr4$1@build.eclipse.org...
>>>> Hi,
>>>> I am trying to apply UML stereo type on UML property .it's getting
>>>> applied
>>>> properly and i can get the applied stereo type and values back too.
>>>> but when i see the XMI file , i don't see the stereo type attached---
>>>> can any body help me out --what may be the problem--
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624809 is a reply to message #475895] Tue, 18 September 2007 06:36 Go to previous message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

Hi James,
i was adding all the elements including stereo types to the model and then
adding it to the resource.This way i need to apply stereo types explicitly
to make it serialized.
if i add model to the resource and then add all the elements including
stereo types to the model ,every thing gets serialized properly.
It should work with the first approach also--i don't know why it doesn't
work.

Thanks for your help---

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:fce3nv$cod$2@build.eclipse.org...
> Some comments below ...
>
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcd9g8$kf8$1@build.eclipse.org...
>> i am not able to figure out where it is hiding -----
>
> Did you look at the bottom of the serialized model as previously
> suggested?
> What do you see at the bottom of the model?
>
>> what should i do to make sure that serialization is happenning properly.
>> one case i observed ,if i apply stereo type just after creating the uml
>> property in the folowing way,
>> Property prop = createAttribute(dataObject.getUmlClass(),
>> attribute.getName(), type,
>> attribute.getLowerBound(),attribute.getUpperBound());
>> Stereotype eAttributeStrType =
>> profileLoader.getStereoType(model,"Attribute");
>>
>> if(eAttributeStrType != null){
>>
>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>
>> }
>>
>> it doesn't get serialized.
>
> ... Do you mean you just can't see the values in the serialized model or
> that if you try to obtain the stereotype programmatically that they are
> not
> correctly returned?
>
>
>>
>> but if i create model first and then iterate thrugh the uml properties
>> and
>> apply stereo type ,then it gets serialized properly.
>
> When you say it gets serialized properly, you mean that you can see it in
> the xmi?
>
>
>>
>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>
>> for (Property propertyElement : attributeList) {
>>
>> propertyElement.applyStereotype(st);
>>
>>
>> }
>>
>>
>> i will be highly thankful for any kind of help.let me know if i am doing
> any
>> thing wrong with the first case.
>
>
> In your original posting you said that you could programatically apply
> stereotypes, set values and get them back but that you could not see them
> in
> the xmi file. If you post your model, I can point out where the
> stereotypes are.
>
>
>>
>>
>>
>>
>>
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:fcc1mj$bps$2@build.eclipse.org...
>> > Hi Raju,
>> >
>> > Stereotype applications appear at the bottom of the serialized model
>> > and
>> > have references back to the elements they are applied to. If you can
>> > programatically set stereotype values and retrieve them, then the
>> > information is being serialized. The information is hiding there
>> > somewhere
>> > ;)
>> >
>> > - James.
>> >
>> >
>> > "Raju Mishra" <rmishra@tibco.com> wrote in message
>> > news:fcbfto$qr4$1@build.eclipse.org...
>> >> Hi,
>> >> I am trying to apply UML stereo type on UML property .it's getting
>> >> applied
>> >> properly and i can get the applied stereo type and values back too.
>> >> but when i see the XMI file , i don't see the stereo type attached---
>> >> can any body help me out --what may be the problem--
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624812 is a reply to message #475915] Tue, 18 September 2007 16:02 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Raju,

This works as designed. Stereotype applications are separate objects that
typically live at the root of the resource containing the elements they are
applied to (although they could in fact live in a separate resource),
because they are not contained within the hierarchy of UML elements (as per
the specification). Without the context of a resource to attach the object
to, when a stereotype is applied, the stereotype application isn't contained
anywhere - that's why, if you wait until later to add your model elements to
a resource, they need to be explicitly attached to the same (or different)
resource in order to be serialized.

Kenn

"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcnrh7$iph$1@build.eclipse.org...
> thanks a lot--
> i was adding all the elements including stereo types to the model and then
> adding it to the resource.This way i need to apply stereo types explicitly
> to make it serialized.
> if i add model to the resource and then add all the elements including
> stereo types to the model ,every thing gets serialized properly.
>
> once again thanks alot---But one thing i m wondering ,even in the first
> case it should work fine.Is it a bug-----
>
> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
> news:fce3oa$cpi$1@build.eclipse.org...
>> Raju,
>>
>> Have the model elements been added to a resource before applying the
>> stereotypes, or are you adding all of the elements to a resource just
>> before saving. If the latter, you'll need to explicitly add all the
>> stereotype applications to the resource before saving the resource...
>>
>> Kenn
>>
>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>> news:fcd9g8$kf8$1@build.eclipse.org...
>>>i am not able to figure out where it is hiding -----
>>> what should i do to make sure that serialization is happenning properly.
>>> one case i observed ,if i apply stereo type just after creating the uml
>>> property in the folowing way,
>>> Property prop = createAttribute(dataObject.getUmlClass(),
>>> attribute.getName(), type,
>>> attribute.getLowerBound(),attribute.getUpperBound());
>>> Stereotype eAttributeStrType =
>>> profileLoader.getStereoType(model,"Attribute");
>>>
>>> if(eAttributeStrType != null){
>>>
>>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>>
>>> }
>>>
>>> it doesn't get serialized.
>>>
>>> but if i create model first and then iterate thrugh the uml properties
>>> and apply stereo type ,then it gets serialized properly.
>>>
>>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>>
>>> for (Property propertyElement : attributeList) {
>>>
>>> propertyElement.applyStereotype(st);
>>>
>>>
>>> }
>>>
>>>
>>> i will be highly thankful for any kind of help.let me know if i am doing
>>> any thing wrong with the first case.
>>>
>>>
>>>
>>>
>>>
>>>
>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>> news:fcc1mj$bps$2@build.eclipse.org...
>>>> Hi Raju,
>>>>
>>>> Stereotype applications appear at the bottom of the serialized model
>>>> and
>>>> have references back to the elements they are applied to. If you can
>>>> programatically set stereotype values and retrieve them, then the
>>>> information is being serialized. The information is hiding there
>>>> somewhere
>>>> ;)
>>>>
>>>> - James.
>>>>
>>>>
>>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>>> news:fcbfto$qr4$1@build.eclipse.org...
>>>>> Hi,
>>>>> I am trying to apply UML stereo type on UML property .it's getting
>>>>> applied
>>>>> properly and i can get the applied stereo type and values back too.
>>>>> but when i see the XMI file , i don't see the stereo type attached---
>>>>> can any body help me out --what may be the problem--
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624813 is a reply to message #475916] Tue, 18 September 2007 16:02 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Raju,

See my reply to your other posting.

Kenn

"Raju Mishra" <rmishra@tibco.com> wrote in message
news:fcnrls$l3d$1@build.eclipse.org...
> Hi James,
> i was adding all the elements including stereo types to the model and then
> adding it to the resource.This way i need to apply stereo types explicitly
> to make it serialized.
> if i add model to the resource and then add all the elements including
> stereo types to the model ,every thing gets serialized properly.
> It should work with the first approach also--i don't know why it doesn't
> work.
>
> Thanks for your help---
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:fce3nv$cod$2@build.eclipse.org...
>> Some comments below ...
>>
>>
>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>> news:fcd9g8$kf8$1@build.eclipse.org...
>>> i am not able to figure out where it is hiding -----
>>
>> Did you look at the bottom of the serialized model as previously
>> suggested?
>> What do you see at the bottom of the model?
>>
>>> what should i do to make sure that serialization is happenning properly.
>>> one case i observed ,if i apply stereo type just after creating the uml
>>> property in the folowing way,
>>> Property prop = createAttribute(dataObject.getUmlClass(),
>>> attribute.getName(), type,
>>> attribute.getLowerBound(),attribute.getUpperBound());
>>> Stereotype eAttributeStrType =
>>> profileLoader.getStereoType(model,"Attribute");
>>>
>>> if(eAttributeStrType != null){
>>>
>>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>>
>>> }
>>>
>>> it doesn't get serialized.
>>
>> ... Do you mean you just can't see the values in the serialized model or
>> that if you try to obtain the stereotype programmatically that they are
>> not
>> correctly returned?
>>
>>
>>>
>>> but if i create model first and then iterate thrugh the uml properties
>>> and
>>> apply stereo type ,then it gets serialized properly.
>>
>> When you say it gets serialized properly, you mean that you can see it in
>> the xmi?
>>
>>
>>>
>>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>>
>>> for (Property propertyElement : attributeList) {
>>>
>>> propertyElement.applyStereotype(st);
>>>
>>>
>>> }
>>>
>>>
>>> i will be highly thankful for any kind of help.let me know if i am doing
>> any
>>> thing wrong with the first case.
>>
>>
>> In your original posting you said that you could programatically apply
>> stereotypes, set values and get them back but that you could not see them
>> in
>> the xmi file. If you post your model, I can point out where the
>> stereotypes are.
>>
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>> news:fcc1mj$bps$2@build.eclipse.org...
>>> > Hi Raju,
>>> >
>>> > Stereotype applications appear at the bottom of the serialized model
>>> > and
>>> > have references back to the elements they are applied to. If you can
>>> > programatically set stereotype values and retrieve them, then the
>>> > information is being serialized. The information is hiding there
>>> > somewhere
>>> > ;)
>>> >
>>> > - James.
>>> >
>>> >
>>> > "Raju Mishra" <rmishra@tibco.com> wrote in message
>>> > news:fcbfto$qr4$1@build.eclipse.org...
>>> >> Hi,
>>> >> I am trying to apply UML stereo type on UML property .it's getting
>>> >> applied
>>> >> properly and i can get the applied stereo type and values back too.
>>> >> but when i see the XMI file , i don't see the stereo type attached---
>>> >> can any body help me out --what may be the problem--
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
Re: problem with the persistence of the applied stereo type. [message #624820 is a reply to message #475919] Wed, 19 September 2007 06:43 Go to previous message
Eclipse UserFriend
Originally posted by: rmishra.tibco.com

Thanks kenn , i got your point---
"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fcosq5$6fh$1@build.eclipse.org...
> Raju,
>
> This works as designed. Stereotype applications are separate objects that
> typically live at the root of the resource containing the elements they
> are applied to (although they could in fact live in a separate resource),
> because they are not contained within the hierarchy of UML elements (as
> per the specification). Without the context of a resource to attach the
> object to, when a stereotype is applied, the stereotype application isn't
> contained anywhere - that's why, if you wait until later to add your model
> elements to a resource, they need to be explicitly attached to the same
> (or different) resource in order to be serialized.
>
> Kenn
>
> "Raju Mishra" <rmishra@tibco.com> wrote in message
> news:fcnrh7$iph$1@build.eclipse.org...
>> thanks a lot--
>> i was adding all the elements including stereo types to the model and
>> then adding it to the resource.This way i need to apply stereo types
>> explicitly to make it serialized.
>> if i add model to the resource and then add all the elements including
>> stereo types to the model ,every thing gets serialized properly.
>>
>> once again thanks alot---But one thing i m wondering ,even in the first
>> case it should work fine.Is it a bug-----
>>
>> "Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
>> news:fce3oa$cpi$1@build.eclipse.org...
>>> Raju,
>>>
>>> Have the model elements been added to a resource before applying the
>>> stereotypes, or are you adding all of the elements to a resource just
>>> before saving. If the latter, you'll need to explicitly add all the
>>> stereotype applications to the resource before saving the resource...
>>>
>>> Kenn
>>>
>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>> news:fcd9g8$kf8$1@build.eclipse.org...
>>>>i am not able to figure out where it is hiding -----
>>>> what should i do to make sure that serialization is happenning
>>>> properly.
>>>> one case i observed ,if i apply stereo type just after creating the
>>>> uml property in the folowing way,
>>>> Property prop = createAttribute(dataObject.getUmlClass(),
>>>> attribute.getName(), type,
>>>> attribute.getLowerBound(),attribute.getUpperBound());
>>>> Stereotype eAttributeStrType =
>>>> profileLoader.getStereoType(model,"Attribute");
>>>>
>>>> if(eAttributeStrType != null){
>>>>
>>>> EObject eobject = prop.applyStereotype(eAttributeStrType);
>>>>
>>>> }
>>>>
>>>> it doesn't get serialized.
>>>>
>>>> but if i create model first and then iterate thrugh the uml properties
>>>> and apply stereo type ,then it gets serialized properly.
>>>>
>>>> List<Property> attributeList = clazzElement.getOwnedAttributes();
>>>>
>>>> for (Property propertyElement : attributeList) {
>>>>
>>>> propertyElement.applyStereotype(st);
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>> i will be highly thankful for any kind of help.let me know if i am
>>>> doing any thing wrong with the first case.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>>>> news:fcc1mj$bps$2@build.eclipse.org...
>>>>> Hi Raju,
>>>>>
>>>>> Stereotype applications appear at the bottom of the serialized model
>>>>> and
>>>>> have references back to the elements they are applied to. If you can
>>>>> programatically set stereotype values and retrieve them, then the
>>>>> information is being serialized. The information is hiding there
>>>>> somewhere
>>>>> ;)
>>>>>
>>>>> - James.
>>>>>
>>>>>
>>>>> "Raju Mishra" <rmishra@tibco.com> wrote in message
>>>>> news:fcbfto$qr4$1@build.eclipse.org...
>>>>>> Hi,
>>>>>> I am trying to apply UML stereo type on UML property .it's getting
>>>>>> applied
>>>>>> properly and i can get the applied stereo type and values back too.
>>>>>> but when i see the XMI file , i don't see the stereo type attached---
>>>>>> can any body help me out --what may be the problem--
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Previous Topic:Handle stereotypes as inheritance?
Next Topic:Why are some features not changeable ?
Goto Forum:
  


Current Time: Fri Apr 19 18:41:48 GMT 2024

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

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

Back to the top