general ocl question [message #24664] |
Fri, 25 May 2007 09:31  |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi,
I'm working on a project and will need to work with ocl extensively.
Firstly I would like to make sure that when I create models in UML2 that
they adhere to the normal uml constraints. Are they all validated in
realtime? ie when I add entities in a class diagram that I cannot connect
them in an improper way?
I'm going to be extending the uml metamodel and would like to add my own
constraints to the stereotypes that I create. Can this be easily achieved in
java code?
Have any extra constraints been used in the project ? these could have been
used to look at extra constraints within models.
thx,
Nick
|
|
|
Re: general ocl question [message #24704 is a reply to message #24664] |
Fri, 25 May 2007 09:57  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Nick,
I think these questions are for the UML2 component, which newsgroup I have
included in my reply. However, I think I can answer ...
The UML2 component's implementation of UML 2.1 includes only those
constraints that are specified in the OMG's Rose model. It is my
understanding that the Rose model does not include the majority of the
constraints that are listed in the Specification document.
UML2 implements these constraints in Java; they were "transformed" manually
from OCL. In some cases, even correcting errors in the OCL specification
of the constraint. These constraints are not evaluated on-the-fly, but
when the user selects the "Validate..." action in the UML editor.
The UML2 component does support the definition of invariant constraints and
operation bodies on Stereotypes, in the Java language as per standard EMF
code generation. Since 2.1 M7, it additionally supports OCL constraints,
generating code that uses the MDT OCL implementation. Note, however, that
both of these options only apply to statically-defined profiles, in which
you generate an EMF package implementating the profile.
The UML2 newsgroup can answer any further questions that you may have.
HTH,
Christian
Nick Kirtley wrote:
> Hi,
>
> I'm working on a project and will need to work with ocl extensively.
>
> Firstly I would like to make sure that when I create models in UML2 that
> they adhere to the normal uml constraints. Are they all validated in
> realtime? ie when I add entities in a class diagram that I cannot connect
> them in an improper way?
>
> I'm going to be extending the uml metamodel and would like to add my own
> constraints to the stereotypes that I create. Can this be easily achieved
> in java code?
>
> Have any extra constraints been used in the project ? these could have
> been used to look at extra constraints within models.
>
>
> thx,
>
> Nick
|
|
|
Powered by
FUDForum. Page generated in 0.03994 seconds