Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » attribute query
attribute query [message #39257] Thu, 27 September 2007 10:05 Go to next message
Eclipse UserFriend
Originally posted by: nickkirtley.gmail.com

hi,

I have a query:

self.attribute->collect(a : Property | a.aggregation).oclAsType(Property)

this returns:

composite
none
none
shared

in the case of the model that I'm querying.


I want to pick shared, (an aggregation between two components), I don't
want to pick it based on name or anything specific to this case, I want to
pick it based on that the attribute kind is shared.

How can I do this?

NICK
Re: attribute query [message #39320 is a reply to message #39257] Thu, 27 September 2007 13:54 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Nick,

What do you mean by "pick"?

Do you mean:

self.attribute->select(a | a.aggregation = AggregationKind::shared)

This results in a collection of Propertys that are shared.

Cheers,

Christian

nick kirtley wrote:

> hi,
>
> I have a query:
>
> self.attribute->collect(a : Property | a.aggregation).oclAsType(Property)
>
> this returns:
>
> composite
> none
> none
> shared
>
> in the case of the model that I'm querying.
>
>
> I want to pick shared, (an aggregation between two components), I don't
> want to pick it based on name or anything specific to this case, I want to
> pick it based on that the attribute kind is shared.
>
> How can I do this?
>
> NICK
Previous Topic:Is it possible to change sum() behavior?
Next Topic:interface query
Goto Forum:
  


Current Time: Sun Sep 08 06:54:01 GMT 2024

Powered by FUDForum. Page generated in 0.03512 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top