|Re: Question to OCL-expression used in EMF Query [message #642304 is a reply to message #642075]
||Tue, 30 November 2010 17:56
| Ed Willink
Registered: July 2009
Your example has quite a few trivial typos, and the main logic looks
In principle if you write your algorithm in simple English, you can then
transcribe it to OCL.
Your problem is very similar to those that occur for UML itself, so you
might care to look at the UML specification for many relevant OCL
examples (you may need to correct minor typos).
On 29/11/2010 18:20, calimeah wrote:
> I am currently using BooleanOCLConditions in EMF Query.
> Simple OCL-expressions work fine but I am confronted with some rather
> complicated ones that wont work correctly.
> The used ecore-model is a meta-model for UML-class-diagramms.
> The model instance xmi-file contains some packages, some classes,
> operations with parameters... etc.
> A simple and working OCL contraint is e.g.:
> This tells me wether the model instance xmi file contains an operation
> with the id '123'.
> Now comes the tricky constraint, which should tell me if an operation
> with the same name already exists in the model instance and
> furthermore if thats the case, I want to know if that operation also
> consists of the same parameter count and the same parameter types in
> the same order.
> My idea of the according OCL-expression was something like this:
> >select(name='theOperationName').parameters <>
> Do you know a better and working way?
Powered by FUDForum
. Page generated in 0.01678 seconds