[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.mdt.ocl] Query for not all elements of a model
|
Hello,
my meta model defines a composition model which can contain normal
components containing events. Besides normal components it can contain
composite components which also can contain events. Now I have another
model element (ReferenceEventElement) which has to reference events. But
it mustn't reference those events which are contained in a composite
component. Is this query correct?
context ReferenceEventElement:
inv: self.event ->forAll(ev|
not MyMetaModel::CompositeComponent.allInstances()->forAll(comp|
comp.eContents()->select(tempEv|
tempEv.oclIsTypeOf(MyMetaModel::Event))-> includes(ev)
)
)
Or is there a better solution?