Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » minor extensions to the UML metamodel
minor extensions to the UML metamodel [message #472544] Tue, 17 April 2007 14:45 Go to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
I need to extend the UML metamodel in a purely additive manner: I just
need to subclass a few metaclasses to provide features that UML itself
does not have. I considered the profiles and stereotypes route, but it
is just too limited for my needs (because I need to create new
associations between metaclasses, and all that stereotypes let me do is
to add properties with primitive types - is that correct?).

However, after going the heavyweight route, I realized that even if I
was able to add elements of my new metaclasses to a UML model and
persist it, I would not be able to load the model as those elements
would not be understood when loading the resource. I guess that should
have been obvious were I a bit more knowledgeable about UML.

So now I am stuck. Is there a way of doing what I want so that:

a) I don't have to re-implement UML and can basically extend the UML2
API and implementation

b) models created with my metamodel can be read by any tools that can
read UML2 UML models

Thanks,

Rafael
Re: minor extensions to the UML metamodel [message #472545 is a reply to message #472544] Tue, 17 April 2007 15:48 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Rafael,

Christian Damus (a.k.a. Mr. OCL) just mentioned to me that you can have a
look at the OCL metamodel for a concrete example of a heavyweight extension
to UML that subclasses a few metaclasses. In particular, have a look at
the OCL Expression metaclass that specializes UML OpaqueExpression.

Please have a look at that OCL metamodel and ensure that your packages are
properly registered in order to load your specialized models.

You might have problems with tools that do not understand your specialized
metaclasses. That's one of the reasons why the profile route is
preferrable. Whether a particular tool can understand your metatypes
depends on how flexible the implementation was made ... you may want to look
at extensibility options in the tool you wish to work with. RSA for example
allows users to extend pallettes, menus and tooling for such things.

Also, I'm not sure if you had a look at the draft articles describing
pros/cons of the various extension methods but you might want to look at the
bugzilla entitled "Improved Documentation".

Regards,

- James.


"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:f02mht$3vh$1@build.eclipse.org...
> I need to extend the UML metamodel in a purely additive manner: I just
> need to subclass a few metaclasses to provide features that UML itself
> does not have. I considered the profiles and stereotypes route, but it
> is just too limited for my needs (because I need to create new
> associations between metaclasses, and all that stereotypes let me do is
> to add properties with primitive types - is that correct?).
>
> However, after going the heavyweight route, I realized that even if I
> was able to add elements of my new metaclasses to a UML model and
> persist it, I would not be able to load the model as those elements
> would not be understood when loading the resource. I guess that should
> have been obvious were I a bit more knowledgeable about UML.
>
> So now I am stuck. Is there a way of doing what I want so that:
>
> a) I don't have to re-implement UML and can basically extend the UML2
> API and implementation
>
> b) models created with my metamodel can be read by any tools that can
> read UML2 UML models
>
> Thanks,
>
> Rafael
>
>
Re: minor extensions to the UML metamodel [message #472546 is a reply to message #472545] Tue, 17 April 2007 16:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

James Bruck wrote:

> Hi Rafael,
>
> Christian Damus (a.k.a. Mr. OCL) just mentioned to me that you can have a
> look at the OCL metamodel for a concrete example of a heavyweight
> extension
> to UML that subclasses a few metaclasses. In particular, have a look at
> the OCL Expression metaclass that specializes UML OpaqueExpression.
>

You'll find that in the org.eclipse.ocl.uml plug-in in the model/OCLUML.uml
model. Have a look at ocl::uml::ExpressionInOcl.

Cheers,

Christian


<snip>

>
> Regards,
>
> - James.
>

<snip>
Re: minor extensions to the UML metamodel [message #472548 is a reply to message #472545] Tue, 17 April 2007 16:54 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
> ensure that your packages are
> properly registered in order to load your specialized models

D'oh! I forgot to do that. After doing it, I can now open the model with
foreign elements in the UML editor. Thanks for suggesting the sanity check!

BTW, I created the metamodel by following the article "Extending UML2:
Creating Heavy-weight Extensions" which is quite good as it is already
(content-wise).

Rafael

James Bruck wrote:
> Hi Rafael,
>
> Christian Damus (a.k.a. Mr. OCL) just mentioned to me that you can have a
> look at the OCL metamodel for a concrete example of a heavyweight extension
> to UML that subclasses a few metaclasses. In particular, have a look at
> the OCL Expression metaclass that specializes UML OpaqueExpression.
>
> Please have a look at that OCL metamodel and ensure that your packages are
> properly registered in order to load your specialized models.
>
> You might have problems with tools that do not understand your specialized
> metaclasses. That's one of the reasons why the profile route is
> preferrable. Whether a particular tool can understand your metatypes
> depends on how flexible the implementation was made ... you may want to look
> at extensibility options in the tool you wish to work with. RSA for example
> allows users to extend pallettes, menus and tooling for such things.
>
> Also, I'm not sure if you had a look at the draft articles describing
> pros/cons of the various extension methods but you might want to look at the
> bugzilla entitled "Improved Documentation".
>
> Regards,
>
> - James.
>
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:f02mht$3vh$1@build.eclipse.org...
>> I need to extend the UML metamodel in a purely additive manner: I just
>> need to subclass a few metaclasses to provide features that UML itself
>> does not have. I considered the profiles and stereotypes route, but it
>> is just too limited for my needs (because I need to create new
>> associations between metaclasses, and all that stereotypes let me do is
>> to add properties with primitive types - is that correct?).
>>
>> However, after going the heavyweight route, I realized that even if I
>> was able to add elements of my new metaclasses to a UML model and
>> persist it, I would not be able to load the model as those elements
>> would not be understood when loading the resource. I guess that should
>> have been obvious were I a bit more knowledgeable about UML.
>>
>> So now I am stuck. Is there a way of doing what I want so that:
>>
>> a) I don't have to re-implement UML and can basically extend the UML2
>> API and implementation
>>
>> b) models created with my metamodel can be read by any tools that can
>> read UML2 UML models
>>
>> Thanks,
>>
>> Rafael
>>
>>
>
>
Re: minor extensions to the UML metamodel [message #607702 is a reply to message #472544] Tue, 17 April 2007 15:48 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Rafael,

Christian Damus (a.k.a. Mr. OCL) just mentioned to me that you can have a
look at the OCL metamodel for a concrete example of a heavyweight extension
to UML that subclasses a few metaclasses. In particular, have a look at
the OCL Expression metaclass that specializes UML OpaqueExpression.

Please have a look at that OCL metamodel and ensure that your packages are
properly registered in order to load your specialized models.

You might have problems with tools that do not understand your specialized
metaclasses. That's one of the reasons why the profile route is
preferrable. Whether a particular tool can understand your metatypes
depends on how flexible the implementation was made ... you may want to look
at extensibility options in the tool you wish to work with. RSA for example
allows users to extend pallettes, menus and tooling for such things.

Also, I'm not sure if you had a look at the draft articles describing
pros/cons of the various extension methods but you might want to look at the
bugzilla entitled "Improved Documentation".

Regards,

- James.


"Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
news:f02mht$3vh$1@build.eclipse.org...
> I need to extend the UML metamodel in a purely additive manner: I just
> need to subclass a few metaclasses to provide features that UML itself
> does not have. I considered the profiles and stereotypes route, but it
> is just too limited for my needs (because I need to create new
> associations between metaclasses, and all that stereotypes let me do is
> to add properties with primitive types - is that correct?).
>
> However, after going the heavyweight route, I realized that even if I
> was able to add elements of my new metaclasses to a UML model and
> persist it, I would not be able to load the model as those elements
> would not be understood when loading the resource. I guess that should
> have been obvious were I a bit more knowledgeable about UML.
>
> So now I am stuck. Is there a way of doing what I want so that:
>
> a) I don't have to re-implement UML and can basically extend the UML2
> API and implementation
>
> b) models created with my metamodel can be read by any tools that can
> read UML2 UML models
>
> Thanks,
>
> Rafael
>
>
Re: minor extensions to the UML metamodel [message #607704 is a reply to message #472545] Tue, 17 April 2007 16:01 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

James Bruck wrote:

> Hi Rafael,
>
> Christian Damus (a.k.a. Mr. OCL) just mentioned to me that you can have a
> look at the OCL metamodel for a concrete example of a heavyweight
> extension
> to UML that subclasses a few metaclasses. In particular, have a look at
> the OCL Expression metaclass that specializes UML OpaqueExpression.
>

You'll find that in the org.eclipse.ocl.uml plug-in in the model/OCLUML.uml
model. Have a look at ocl::uml::ExpressionInOcl.

Cheers,

Christian


<snip>

>
> Regards,
>
> - James.
>

<snip>
Re: minor extensions to the UML metamodel [message #607710 is a reply to message #472545] Tue, 17 April 2007 16:54 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
> ensure that your packages are
> properly registered in order to load your specialized models

D'oh! I forgot to do that. After doing it, I can now open the model with
foreign elements in the UML editor. Thanks for suggesting the sanity check!

BTW, I created the metamodel by following the article "Extending UML2:
Creating Heavy-weight Extensions" which is quite good as it is already
(content-wise).

Rafael

James Bruck wrote:
> Hi Rafael,
>
> Christian Damus (a.k.a. Mr. OCL) just mentioned to me that you can have a
> look at the OCL metamodel for a concrete example of a heavyweight extension
> to UML that subclasses a few metaclasses. In particular, have a look at
> the OCL Expression metaclass that specializes UML OpaqueExpression.
>
> Please have a look at that OCL metamodel and ensure that your packages are
> properly registered in order to load your specialized models.
>
> You might have problems with tools that do not understand your specialized
> metaclasses. That's one of the reasons why the profile route is
> preferrable. Whether a particular tool can understand your metatypes
> depends on how flexible the implementation was made ... you may want to look
> at extensibility options in the tool you wish to work with. RSA for example
> allows users to extend pallettes, menus and tooling for such things.
>
> Also, I'm not sure if you had a look at the draft articles describing
> pros/cons of the various extension methods but you might want to look at the
> bugzilla entitled "Improved Documentation".
>
> Regards,
>
> - James.
>
>
> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
> news:f02mht$3vh$1@build.eclipse.org...
>> I need to extend the UML metamodel in a purely additive manner: I just
>> need to subclass a few metaclasses to provide features that UML itself
>> does not have. I considered the profiles and stereotypes route, but it
>> is just too limited for my needs (because I need to create new
>> associations between metaclasses, and all that stereotypes let me do is
>> to add properties with primitive types - is that correct?).
>>
>> However, after going the heavyweight route, I realized that even if I
>> was able to add elements of my new metaclasses to a UML model and
>> persist it, I would not be able to load the model as those elements
>> would not be understood when loading the resource. I guess that should
>> have been obvious were I a bit more knowledgeable about UML.
>>
>> So now I am stuck. Is there a way of doing what I want so that:
>>
>> a) I don't have to re-implement UML and can basically extend the UML2
>> API and implementation
>>
>> b) models created with my metamodel can be read by any tools that can
>> read UML2 UML models
>>
>> Thanks,
>>
>> Rafael
>>
>>
>
>
Previous Topic:minor extensions to the UML metamodel
Next Topic:Creating Profile, applying stereotype on a Class, saving model --> trouble
Goto Forum:
  


Current Time: Fri Apr 19 11:11:36 GMT 2024

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

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

Back to the top