Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Epsilon] Using OCL in Meta-Model level
[Epsilon] Using OCL in Meta-Model level [message #596990] Wed, 16 May 2007 18:34
Eclipse UserFriend
Originally posted by:

Hi everybody,

I have a problem understanding how to use OCL (especially in MetaModel
level), if you have time to guide me, that would be appreciated.

So far I've worked with some tools such as ArgoUML (adding some critics to
it), OCLE (checking OCLs in model level and metamodel level), and recently
Epsilon (Adding some more functionalities on its ArgoUML version).

My problem is that I don't know from where can I find all the OPERATIONS and
FUNCTIONS that I can apply on a model (Meta-Model). Let me make it clear by
an example:

1) In Epsilon, I've written the following operation to check whether or not
a class own an attribute. But I knew nothing about the FEATURE property that
could be applied on a class. I just found it by reviewing existing similar

operation Class hasAttribute (name : String) : Boolean {
return self.feature.exists (a:Attribute | = name);

2) In ArgoUML, I had to write the following method to check the above
condition. However, since it was in Eclipse, I could see which methods are
available by Model's Facade class (thanks to Eclipse assistance).

public static boolean classHasAtt (Object cls) {
boolean found = false;
Collection atts = Model.getFacade().getAttributes(cls);
if ( atts.size() > 0 ) {
found = true ;
return found;

Again my question is: "let say the context is a class, how can I access to
all its attributes? its operations? its stereotypes?" The same question
applies for every ModelElement.

Previous Topic:[epsilon] error using EXEED
Next Topic:[Epsilon] Using OCL in Meta-Model level
Goto Forum:

Current Time: Mon Jan 23 10:57:34 GMT 2017

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

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