[gme-users] OCL Constraint Question in GME

Matthew J. Emerson mjemerson at isis.vanderbilt.edu
Mon Oct 30 09:56:52 CST 2006


You need to use the gme::FCO::getConnectedFCOs OCL methods to retrieve
the other ends of those connections. The methods are documented in the
GME User Manual.

 

--Matt

 

  _____  

From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Joe H.
Sent: Thursday, October 26, 2006 7:52 PM
To: gme-users
Subject: [gme-users] OCL Constraint Question in GME

 

Hello.

 

I have a question regarding OCL constraints. I'm trying to set up
constraints between connected entities. For example, I have a Topic
model that can be connected to 0 or more DataReader models or 0 or more
DataWriter models. The name of the connection in the metamodel for the
DataReaders is "readers" and "writers" for DataWriters. I'm trying to
add a constraint that the number of DataReaders connected to a Topic
must equal the number of DataWriters connected to a topic. The
constraint definition I created is:

 

self.readers.size() = 

self.writers.size()

 

but GME is not happy with this saying:

 

Attribute [meta::Topic::readers] does not exist

Association [meta::Topic::readers] does not exist

Attribute [meta::Topic::writers] does not exist

Association [meta::Topic::writers] does not exist

 

 

Here's the ClassDiagram where I have the relevant connections defined:

 

 

 

Any idea what I need to type in OCL? How do I reference the DataReader
and DataWriter objects/models that are associated with a Topic?

 

Thanks.

 

-Joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20061030/1bb520ef/attachment.htm


More information about the gme-users mailing list