Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » seperating stereotypes in profiles
seperating stereotypes in profiles [message #478652] Tue, 28 July 2009 14:46 Go to next message
robert vrooland is currently offline robert vroolandFriend
Messages: 8
Registered: July 2009
Junior Member
Hello.

I am working on a project where i have to create variations of a certain
model.
I will apply a profile to a model. The profile I create has all the
stereotypes. The problem is that the models do not use all the stereotypes
in the applied profile.

Say model A applies stereotype 1 and 2 and model B applies stereotypes 2
and 3.

Is there a way to make sure that model A can never apply stereotype 3.

The 2 choices I got for this project is to either make a seperate profile
for each variation of the needed model. Or to have one profile where the
stereotypes are grouped into the variations for the model.

Id prefer using a single profile. But if the profile contains many
stereotypes and the model only needs number 1 and 2, it becomes confusing.

tnx in advance for any help.

Robert
Re: seperating stereotypes in profiles [message #478653 is a reply to message #478652] Wed, 29 July 2009 07:27 Go to previous messageGo to next message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Robert,

I tend to find that the solution to such problems surface from examining the
underlying domain and the concepts represented. Somewhere within them will
be a natural boundary you can use. The question I would ask is why is is not
appropriate for model A to apply stereotype B. Is this just a case for this
partciular instance of model A or for all type A models?

It sounds like you have common elements to both types of model. To avoid
duplication you could define 3 profiles, 1 containing the common stereotypes
which can be used by either type of model, and then 2 model specific
profiles which extend the common profile. This will avoid duplication.

Also, there might be a way to add validation to your profiles to ensure they
follow your rules. I know there is OCL constraint support in models, does
anyone know if OCL is supported in Profiles?

Tas



"robert vrooland" <vrooland@hotmail.com> wrote in message
news:3bebecb56e6496444d76652fc0d18c40$1@www.eclipse.org...
> Hello.
> I am working on a project where i have to create variations of a certain
> model.
> I will apply a profile to a model. The profile I create has all the
> stereotypes. The problem is that the models do not use all the stereotypes
> in the applied profile.
>
> Say model A applies stereotype 1 and 2 and model B applies stereotypes 2
> and 3.
>
> Is there a way to make sure that model A can never apply stereotype 3.
>
> The 2 choices I got for this project is to either make a seperate profile
> for each variation of the needed model. Or to have one profile where the
> stereotypes are grouped into the variations for the model.
>
> Id prefer using a single profile. But if the profile contains many
> stereotypes and the model only needs number 1 and 2, it becomes confusing.
>
> tnx in advance for any help.
>
> Robert
>
>
>
>
>
Re: seperating stereotypes in profiles [message #478654 is a reply to message #478653] Wed, 29 July 2009 11:40 Go to previous messageGo to next message
robert vrooland is currently offline robert vroolandFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Tas,

Yes that would probably work Tas. But the problem with limiting the
stereotypes a model may use was the main thing.

Say I have a model for MVC (model view control) and MVP (presenter
variant). the profile(s) applied to the models would need model, view,
control and presenter stereotypes.

If I want to make a MVC model, how can I add a limit to the profile so
that the presenter stereotype is not available.

Ill have a look in the prosibilities of ocl queries. Seee what can be done.

Robert.
Re: seperating stereotypes in profiles [message #478655 is a reply to message #478654] Wed, 29 July 2009 13:11 Go to previous messageGo to next message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
How about this.

You could have two profiles. One is MVC Profile another is MVP Profile, The
MVC profile contains Model, View and Controller Stereotypes. The MVP Profile
imports the MVC Profile and adds the extra Presenter Stereotpe.

When creating an MVC model you only apply the MVC Profile. When creating an
MVP Model you apply the MVP profile.


"robert vrooland" <vrooland@hotmail.com> wrote in message
news:d4583fd181ac578fbc8c52bbe25f81e2$1@www.eclipse.org...
> Hi Tas,
>
> Yes that would probably work Tas. But the problem with limiting the
> stereotypes a model may use was the main thing.
>
> Say I have a model for MVC (model view control) and MVP (presenter
> variant). the profile(s) applied to the models would need model, view,
> control and presenter stereotypes.
>
> If I want to make a MVC model, how can I add a limit to the profile so
> that the presenter stereotype is not available.
>
> Ill have a look in the prosibilities of ocl queries. Seee what can be
> done.
>
> Robert.
>
>
Re: seperating stereotypes in profiles [message #480710 is a reply to message #478655] Tue, 18 August 2009 09:52 Go to previous messageGo to next message
robert vrooland is currently offline robert vroolandFriend
Messages: 8
Registered: July 2009
Junior Member
I think I may have found the solution in collaborations.

Is it possible in a profile to create groups of stereotypes using collaborations?


[Updated on: Tue, 18 August 2009 09:54]

Report message to a moderator

Re: seperating stereotypes in profiles [message #480734 is a reply to message #480710] Tue, 18 August 2009 10:51 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Robert,

I don't I understand your proposed solution but if you want to use a
collaboration inside your profile model then I don't believe that will work.

Tas


"robert vrooland" <vrooland@hotmail.com> wrote in message
news:h6dtkv$726$1@build.eclipse.org...
>I think I may have found the solution in collaborations.
>
> Is it possible in a profile create groups of stereotypes using
> collaborations?
>
>
>
Re: seperating stereotypes in profiles [message #627831 is a reply to message #478652] Wed, 29 July 2009 07:27 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Robert,

I tend to find that the solution to such problems surface from examining the
underlying domain and the concepts represented. Somewhere within them will
be a natural boundary you can use. The question I would ask is why is is not
appropriate for model A to apply stereotype B. Is this just a case for this
partciular instance of model A or for all type A models?

It sounds like you have common elements to both types of model. To avoid
duplication you could define 3 profiles, 1 containing the common stereotypes
which can be used by either type of model, and then 2 model specific
profiles which extend the common profile. This will avoid duplication.

Also, there might be a way to add validation to your profiles to ensure they
follow your rules. I know there is OCL constraint support in models, does
anyone know if OCL is supported in Profiles?

Tas



"robert vrooland" <vrooland@hotmail.com> wrote in message
news:3bebecb56e6496444d76652fc0d18c40$1@www.eclipse.org...
> Hello.
> I am working on a project where i have to create variations of a certain
> model.
> I will apply a profile to a model. The profile I create has all the
> stereotypes. The problem is that the models do not use all the stereotypes
> in the applied profile.
>
> Say model A applies stereotype 1 and 2 and model B applies stereotypes 2
> and 3.
>
> Is there a way to make sure that model A can never apply stereotype 3.
>
> The 2 choices I got for this project is to either make a seperate profile
> for each variation of the needed model. Or to have one profile where the
> stereotypes are grouped into the variations for the model.
>
> Id prefer using a single profile. But if the profile contains many
> stereotypes and the model only needs number 1 and 2, it becomes confusing.
>
> tnx in advance for any help.
>
> Robert
>
>
>
>
>
Re: seperating stereotypes in profiles [message #627832 is a reply to message #478653] Wed, 29 July 2009 11:40 Go to previous message
robert vrooland is currently offline robert vroolandFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Tas,

Yes that would probably work Tas. But the problem with limiting the
stereotypes a model may use was the main thing.

Say I have a model for MVC (model view control) and MVP (presenter
variant). the profile(s) applied to the models would need model, view,
control and presenter stereotypes.

If I want to make a MVC model, how can I add a limit to the profile so
that the presenter stereotype is not available.

Ill have a look in the prosibilities of ocl queries. Seee what can be done.

Robert.
Re: seperating stereotypes in profiles [message #627833 is a reply to message #478654] Wed, 29 July 2009 13:11 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
How about this.

You could have two profiles. One is MVC Profile another is MVP Profile, The
MVC profile contains Model, View and Controller Stereotypes. The MVP Profile
imports the MVC Profile and adds the extra Presenter Stereotpe.

When creating an MVC model you only apply the MVC Profile. When creating an
MVP Model you apply the MVP profile.


"robert vrooland" <vrooland@hotmail.com> wrote in message
news:d4583fd181ac578fbc8c52bbe25f81e2$1@www.eclipse.org...
> Hi Tas,
>
> Yes that would probably work Tas. But the problem with limiting the
> stereotypes a model may use was the main thing.
>
> Say I have a model for MVC (model view control) and MVP (presenter
> variant). the profile(s) applied to the models would need model, view,
> control and presenter stereotypes.
>
> If I want to make a MVC model, how can I add a limit to the profile so
> that the presenter stereotype is not available.
>
> Ill have a look in the prosibilities of ocl queries. Seee what can be
> done.
>
> Robert.
>
>
Re: seperating stereotypes in profiles [message #627880 is a reply to message #478655] Tue, 18 August 2009 09:52 Go to previous message
robert vrooland is currently offline robert vroolandFriend
Messages: 8
Registered: July 2009
Junior Member
I think I may have found the solution in collaborations.

Is it possible in a profile create groups of stereotypes using collaborations?
Re: seperating stereotypes in profiles [message #627881 is a reply to message #627880] Tue, 18 August 2009 10:51 Go to previous message
Tas Frangoullides is currently offline Tas FrangoullidesFriend
Messages: 195
Registered: July 2009
Senior Member
Hi Robert,

I don't I understand your proposed solution but if you want to use a
collaboration inside your profile model then I don't believe that will work.

Tas


"robert vrooland" <vrooland@hotmail.com> wrote in message
news:h6dtkv$726$1@build.eclipse.org...
>I think I may have found the solution in collaborations.
>
> Is it possible in a profile create groups of stereotypes using
> collaborations?
>
>
>
Previous Topic:Re: How to apply profile to activity diagram
Next Topic:IMPORTs in "Getting Started with UML2" caused errors
Goto Forum:
  


Current Time: Sat Apr 20 00:12:48 GMT 2024

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

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

Back to the top