Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: ocl query
Re: ocl query [message #624753] Thu, 13 September 2007 14:51
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Nick,

Thanks for the additional diagnostic information. I'm including the UML2
newsgroup in my reply because it looks like a problem either in the
structure of your model or in the computation of required interfaces.

Your OCL expression evidently is successfully invoking getRequireds() on
each owned port of your component, then aggregating the results into some
collection that depends on the combination of the collection kinds of
ownedPort and getRequireds() (which are both multi-valued features).

So, you can expect the same result from computing the requireds in Java
code.

Your original post indicates that each of your components' ports has a
required interface. How did you express that in your model? AFAIK, this
requires that the port's type have some kind of usage or like dependency on
the interface. But I only know as recently as UML 2.0; it's possible that
this is refined/changed in UML 2.1 (the newsgroup can help, there, I'm
sure). Possibly the diagramming tool that you are using isn't configuring
your model correctly?

I think the UML2 API is OK because, when I use Rational Software Modeler to
create a component with a port having a required interface, executing

self.ownedPort.getRequireds()

in the OCL Console example gives me the expected required interface.

Cheers,

Christian


Nick Kirtley wrote:

> Hi Christian,
>
> I hadn't read your reply in my second post.
> Sorry about not being very clear regarding problem1.
>
> Query1:
> Evaluating:
> self.ownedPort.getProvideds()
>
> Results:
> Interface update
>
> Query2:
> Evaluating:
> self.ownedPort.getRequireds()
>
> Results:
>
> I should get an Interface just as I did in query1.
> One other thing I noticed was that in the component diagram, when you
> create a provided interface from a port, that it has a line between the
> two.
> When I do the same for required there's no line.
>
> Could this have something to do with uml2 rather than ocl?
>
> Are you able to retrieve a required interface?
>
> thx again,
> nick
Previous Topic:problem with the persistence of the applied stereo type.
Next Topic:EMF validation constraint target for Stereotype changes
Goto Forum:
  


Current Time: Fri Mar 29 08:18:32 GMT 2024

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

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

Back to the top