Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » storing stereotype/profile applications in arbitrary models
storing stereotype/profile applications in arbitrary models [message #471346] Fri, 02 March 2007 15:21 Go to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
I want to be able to apply stereotypes to a model but store the
ProfileApplication and StereotypeApplication elements elsewhere. Think
of a model that enriches another (read-only) model by applying
stereotypes to its elements. Would that be feasible, at least from the
point of view of the spec?

From what I understand, StereotypeApplications and ProfileApplications
are model elements themselves, so theoretically it should be possible to
store them in a different model from the one they are applied to.

One caveat seems that Element#applyStereotype and Package#applyProfile
will add the corresponding StereotypeApplication and ProfileApplication
objects to the target element/package namespace. I could adapt the
implementation of those two methods to take a package where to store
the application objects. Besides that, do you foresee any technical blocks?

Thanks,

Rafael
Re: storing stereotype/profile applications in arbitrary models [message #471348 is a reply to message #471346] Sat, 03 March 2007 13:41 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Rafael,

By definition, profile applications must be owned by (and generally in the
same resource as) the package that has the profile applied to it - this is a
shortcoming in the specification, IMHO. Stereotype applications, on the
other hand, can certainly be placed in a different resource - just add the
result of Element#applyStereotype(Stereotype) to the contents of the other
resource, e.g.
otherResource.getContents().add(element.applyStereotype(ster eotype)).

Kenn

"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:es9fcd$mpl$1@utils.eclipse.org...
>I want to be able to apply stereotypes to a model but store the
>ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>model that enriches another (read-only) model by applying stereotypes to
>its elements. Would that be feasible, at least from the point of view of
>the spec?
>
> From what I understand, StereotypeApplications and ProfileApplications are
> model elements themselves, so theoretically it should be possible to store
> them in a different model from the one they are applied to.
>
> One caveat seems that Element#applyStereotype and Package#applyProfile
> will add the corresponding StereotypeApplication and ProfileApplication
> objects to the target element/package namespace. I could adapt the
> implementation of those two methods to take a package where to store the
> application objects. Besides that, do you foresee any technical blocks?
>
> Thanks,
>
> Rafael
Re: storing stereotype/profile applications in arbitrary models [message #471349 is a reply to message #471348] Sat, 03 March 2007 15:52 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
Thanks, Kenn.

Unfortunately, that means that my goal of allowing a package to
contribute stereotypes to 3rd-party packages is not feasible (because
before you can apply stereotypes to an element, you must apply the
profile defining the stereotypes to the package containing the target
elements).

Rafael

Kenn Hussey wrote:
> Rafael,
>
> By definition, profile applications must be owned by (and generally in the
> same resource as) the package that has the profile applied to it - this is a
> shortcoming in the specification, IMHO. Stereotype applications, on the
> other hand, can certainly be placed in a different resource - just add the
> result of Element#applyStereotype(Stereotype) to the contents of the other
> resource, e.g.
> otherResource.getContents().add(element.applyStereotype(ster eotype)).
>
> Kenn
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:es9fcd$mpl$1@utils.eclipse.org...
>> I want to be able to apply stereotypes to a model but store the
>> ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>> model that enriches another (read-only) model by applying stereotypes to
>> its elements. Would that be feasible, at least from the point of view of
>> the spec?
>>
>> From what I understand, StereotypeApplications and ProfileApplications are
>> model elements themselves, so theoretically it should be possible to store
>> them in a different model from the one they are applied to.
>>
>> One caveat seems that Element#applyStereotype and Package#applyProfile
>> will add the corresponding StereotypeApplication and ProfileApplication
>> objects to the target element/package namespace. I could adapt the
>> implementation of those two methods to take a package where to store the
>> application objects. Besides that, do you foresee any technical blocks?
>>
>> Thanks,
>>
>> Rafael
>
>
Re: storing stereotype/profile applications in arbitrary models [message #598240 is a reply to message #471346] Sat, 03 March 2007 13:41 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Rafael,

By definition, profile applications must be owned by (and generally in the
same resource as) the package that has the profile applied to it - this is a
shortcoming in the specification, IMHO. Stereotype applications, on the
other hand, can certainly be placed in a different resource - just add the
result of Element#applyStereotype(Stereotype) to the contents of the other
resource, e.g.
otherResource.getContents().add(element.applyStereotype(ster eotype)).

Kenn

"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:es9fcd$mpl$1@utils.eclipse.org...
>I want to be able to apply stereotypes to a model but store the
>ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>model that enriches another (read-only) model by applying stereotypes to
>its elements. Would that be feasible, at least from the point of view of
>the spec?
>
> From what I understand, StereotypeApplications and ProfileApplications are
> model elements themselves, so theoretically it should be possible to store
> them in a different model from the one they are applied to.
>
> One caveat seems that Element#applyStereotype and Package#applyProfile
> will add the corresponding StereotypeApplication and ProfileApplication
> objects to the target element/package namespace. I could adapt the
> implementation of those two methods to take a package where to store the
> application objects. Besides that, do you foresee any technical blocks?
>
> Thanks,
>
> Rafael
Re: storing stereotype/profile applications in arbitrary models [message #598249 is a reply to message #471348] Sat, 03 March 2007 15:52 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
Thanks, Kenn.

Unfortunately, that means that my goal of allowing a package to
contribute stereotypes to 3rd-party packages is not feasible (because
before you can apply stereotypes to an element, you must apply the
profile defining the stereotypes to the package containing the target
elements).

Rafael

Kenn Hussey wrote:
> Rafael,
>
> By definition, profile applications must be owned by (and generally in the
> same resource as) the package that has the profile applied to it - this is a
> shortcoming in the specification, IMHO. Stereotype applications, on the
> other hand, can certainly be placed in a different resource - just add the
> result of Element#applyStereotype(Stereotype) to the contents of the other
> resource, e.g.
> otherResource.getContents().add(element.applyStereotype(ster eotype)).
>
> Kenn
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:es9fcd$mpl$1@utils.eclipse.org...
>> I want to be able to apply stereotypes to a model but store the
>> ProfileApplication and StereotypeApplication elements elsewhere. Think of a
>> model that enriches another (read-only) model by applying stereotypes to
>> its elements. Would that be feasible, at least from the point of view of
>> the spec?
>>
>> From what I understand, StereotypeApplications and ProfileApplications are
>> model elements themselves, so theoretically it should be possible to store
>> them in a different model from the one they are applied to.
>>
>> One caveat seems that Element#applyStereotype and Package#applyProfile
>> will add the corresponding StereotypeApplication and ProfileApplication
>> objects to the target element/package namespace. I could adapt the
>> implementation of those two methods to take a package where to store the
>> application objects. Besides that, do you foresee any technical blocks?
>>
>> Thanks,
>>
>> Rafael
>
>
Previous Topic:storing stereotype/profile applications in arbitrary models
Next Topic:UML Profile for extended metadata
Goto Forum:
  


Current Time: Fri Mar 29 08:51:22 GMT 2024

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

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

Back to the top