Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Extending the Standard profile
Extending the Standard profile [message #628289] Wed, 03 March 2010 06:15 Go to next message
Steven Stallion is currently offline Steven StallionFriend
Messages: 21
Registered: March 2010
Junior Member
All,

I am currently working on a custom profile using the MDT and UML2. So far I have been able to successfully define a metamodel and reference the metamodel and associated metaclasses from the profile.

One area where I am a bit confused, is if I create a Stereotype in the profile and an extension to one of the custom metaclasses, I am unable to apply the Stereotype to a Class once the profile is defined and then applied to a Class diagram.

Is it possible to define an inheritance hierarchy between metaclasses (i.e. custom metaclass A inherits from uml::Class)?

That said, I may be headed down the wrong path - what I truly need is a way to apply a metamodel construct to a Stereotype which extends uml::Class - if there is another way to do this, any pointers would be helpful!

TIA
Re: Extending the Standard profile [message #628290 is a reply to message #628289] Wed, 03 March 2010 13:06 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
I did a live demo which shows how to add icons, stereotypes using the project profile extension.
The way it work is the same for every tool but I would recommend to use Eclipse Omondo because of better profile graphical and model integration.

- Flash demo : http://www.download-omondo.com/dsl_modeling_with_uml.swf
- .exe file for windows : http://www.download-omondo.com/dsl_modeling_with_uml.exe
- .hqx file for Mac: http://www.download-omondo.com/dsl_modeling_with_uml.hqx

I have just launched the push on the server therefore the demo should be available online in about 10 mn.
Cheers,

Vlad,
Re: Extending the Standard profile [message #628291 is a reply to message #628290] Wed, 03 March 2010 15:14 Go to previous messageGo to next message
Steven Stallion is currently offline Steven StallionFriend
Messages: 21
Registered: March 2010
Junior Member
Hello Vlad,

I appreciate the pointer to a demo, however this does not quite cover my use case.

I have a metamodel which defines a number of metaclasses. In my profile, I need to apply these metamodel constructs while extending the uml::Class metaclass for a given Stereotype.

Regards,

Steve
Re: Extending the Standard profile [message #628292 is a reply to message #628291] Wed, 03 March 2010 16:39 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Steve,

The profile is an extension to the model and not in the model itself.
See my reference to the UML metamodel : http://www.download-omondo.com/profile_mechanism.png
Once it has been created then the model query this extension and update the model element property.

I have open the profile in which you can see how is saved the information. I don't know the internal profile mechanism which is really very complex.

btw, it is certainly not difficult to recreate your profile manually with the Omondo UML Profile Editor. I have few weeks ago created an entire DSL with 100 stereotypes / metaclasses and added icons in less than 2 days, so for just £1000 of consulting our customer has received a complete DSL built on the top of a standard UML 2.2 model. I don't use model transformation because prefer to work directly on the UML metamodel and not with EMF.
Re: Extending the Standard profile [message #628294 is a reply to message #628289] Wed, 03 March 2010 17:46 Go to previous messageGo to next message
Erhard Weinell is currently offline Erhard WeinellFriend
Messages: 39
Registered: January 2010
Location: Kassel, Germany
Member
Am 03.03.2010 07:15, schrieb Steven Stallion:

> One area where I am a bit confused, is if I create a Stereotype in the
> profile and an extension to one of the custom metaclasses, I am unable
> to apply the Stereotype to a Class once the profile is defined and then
> applied to a Class diagram.

I do not quite get your scenario. So first you provide your own
metamodel - understood. Now you want to define a profile for these
metaclasses? Wouldn't it be a lot easier to define this metamodel
according to your needs from the beginning?

In general, do you not use the UML2 metamodel at all, or is there
another reason why you cannot simply stick to profiles?

> Is it possible to define an inheritance hierarchy between metaclasses
> (i.e. custom metaclass A inherits from uml::Class)?

Not in a profile. Stereotypes are the way to go here.

You can of course define your own metamodel library and reference UML
metaclasses therein - but in contrast to profiles, tool-support will be
quite close to non-existent when it comes to instantiate this metamodel.
UML tools are just not meant to be used completely without UML :)

> That said, I may be headed down the wrong path - what I truly need is a
> way to apply a metamodel construct to a Stereotype which extends
> uml::Class - if there is another way to do this, any pointers would be
> helpful!

What do you mean by "apply a metamodel construct"? Examples?

Best regards,
Erhard
Re: Extending the Standard profile [message #628296 is a reply to message #628294] Wed, 03 March 2010 20:58 Go to previous messageGo to next message
Steven Stallion is currently offline Steven StallionFriend
Messages: 21
Registered: March 2010
Junior Member
> I do not quite get your scenario. So first you provide your own
> metamodel - understood. Now you want to define a profile for these
> metaclasses? Wouldn't it be a lot easier to define this metamodel
> according to your needs from the beginning?
>
> In general, do you not use the UML2 metamodel at all, or is there
> another reason why you cannot simply stick to profiles?

I'm implementing an OMG specification in process. The spec calls for a metamodel and a profile. Unfortunately the spec is a little scant on details, particularly with how the metamodel is "glued" to the profile so I'm left to my own devices at the moment.

> Not in a profile. Stereotypes are the way to go here.

Right. In this case, I have a Stereotype which extends the uml::Class metaclass. In the documentation it states that a secondary "metaclass construct" should be applied to the Stereotype. I'm taking this to mean that the Stereo type should extend the secondary metaclass which in turn extends the uml::Class metaclass.

> You can of course define your own metamodel library and reference UML
> metaclasses therein - but in contrast to profiles, tool-support will be
> quite close to non-existent when it comes to instantiate this metamodel.
> UML tools are just not meant to be used completely without UML :)

Right. The end goal here is to produce a compliant profile which can then be used with the graphical tools ;)

> What do you mean by "apply a metamodel construct"? Examples?

See above; this is the exact wording in the specification (which is not public yet) - the term confused me a bit, I was hoping someone could shed some light on it.

Cheers,

Steve
Re: Extending the Standard profile [message #628297 is a reply to message #628294] Wed, 03 March 2010 21:13 Go to previous message
Steven Stallion is currently offline Steven StallionFriend
Messages: 21
Registered: March 2010
Junior Member
(Reposting as the original seems to have gotten lost...)

> I do not quite get your scenario. So first you provide your own
> metamodel - understood. Now you want to define a profile for these
> metaclasses? Wouldn't it be a lot easier to define this metamodel
> according to your needs from the beginning?
>
> In general, do you not use the UML2 metamodel at all, or is there
> another reason why you cannot simply stick to profiles?

I'm implementing an OMG specification in process. The spec calls for a metamodel and a profile. Unfortunately the spec is a little scant on details, particularly with how the metamodel is "glued" to the profile so I'm left to my own devices at the moment.

> Not in a profile. Stereotypes are the way to go here.

Right. In this case, I have a Stereotype which extends the uml::Class metaclass. In the documentation it states that a secondary "metaclass construct" should be applied to the Stereotype. I'm taking this to mean that the Stereo type should extend the secondary metaclass which in turn extends the uml::Class metaclass.

> You can of course define your own metamodel library and reference UML
> metaclasses therein - but in contrast to profiles, tool-support will be
> quite close to non-existent when it comes to instantiate this metamodel.
> UML tools are just not meant to be used completely without UML Smile

Right. The end goal here is to produce a compliant profile which can then be used with the graphical tools Wink

> What do you mean by "apply a metamodel construct"? Examples?

See above; this is the exact wording in the specification (which is not public yet) - the term confused me a bit, I was hoping someone could shed some light on it.

Cheers,

Steve
Previous Topic:Semantics of Association and Aggregation/Composition
Next Topic:Using a reference model in uml2
Goto Forum:
  


Current Time: Thu Mar 28 17:38:31 GMT 2024

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

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

Back to the top