|
Re: Using UML2 Profile to change Property MetaClass default [message #513531 is a reply to message #513505] |
Wed, 10 February 2010 13:59 |
|
--=-cdc/ElwVu97TbmUvCI+D
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Ronan,
No, a stereotype cannot change the default values of the attributes of
the elements that they extend.
However, your stereotype can define a well-formedness constraint (an
"invariant") that requires the isReadOnly attribute of the extended
property to be true. The model checker/validator in your tool should be
able to evaluate that constraint (I'm fairly certain that the Eclipse
UML2 sample UML editor can do it). Additionally, your application can
set the isReadOnly attribute of any new property on which this
stereotype is applied.
HTH,
Christian
On Wed, 2010-02-10 at 07:33 -0500, Ronan wrote:
> Hi,
> I have a UML Profile with a Stereotype. The Stereotype has a property base_Property whose type is <<metaclass>> <Class> Property. I would like to be able to change the default value for the isReadOnly property on <<metaclass>> <Class> Property by using my Stereotype. The use-case for this is that every UML Property in my model that has this Stereotype applied should have the isReadOnly value set to true by default. Is this possible to define in UML2?
> Thanks,
> Ronan
--=-cdc/ElwVu97TbmUvCI+D
Content-Type: text/html; charset="utf-8"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Ronan,<BR>
<BR>
No, a stereotype cannot change the default values of the attributes of the elements that they extend.<BR>
<BR>
However, your stereotype can define a well-formedness constraint (an "invariant") that requires the isReadOnly attribute of the extended property to be true. The model checker/validator in your tool should be able to evaluate that constraint (I'm fairly certain that the Eclipse UML2 sample UML editor can do it). Additionally, your application can set the isReadOnly attribute of any new property on which this stereotype is applied.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Wed, 2010-02-10 at 07:33 -0500, Ronan wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi,
I have a UML Profile with a Stereotype. The Stereotype has a property base_Property whose type is <<metaclass>> <Class> Property. I would like to be able to change the default value for the isReadOnly property on <<metaclass>> <Class> Property by using my Stereotype. The use-case for this is that every UML Property in my model that has this Stereotype applied should have the isReadOnly value set to true by default. Is this possible to define in UML2?
Thanks,
Ronan
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-cdc/ElwVu97TbmUvCI+D--
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03426 seconds