[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: OCL query to find classes

Hi, Timothy,

I think you intended a select iterator:

    model.allOwnedElements->select(e:Element|e.oclIsTypeOf(Class))

Cheers,

Christian


On Thu, 2009-09-10 at 12:02 +0200, Timothy Marc wrote:
What about

model.allOwnedElements->collect(e:Element|e.oclIsTypeOf(Class))

Please, let me know, if this helps you...

pkojo schrieb:
> Hi,
> 
> I am new to OCL, I am using OCL interpreter to find classes in a model 
> (EMF XMI model) at M2 layer, using following query.
>> Class.allInstances() 
> 
> when I execute this query I found Classes like Statemachine, Usecase, 
> Node and so on. basically I want to find only classes in a model without 
> classes like statemachine, usease or any other modeling element. Can any 
> body help me in this regard?
> 
> Thanks,
> pkojo
>