how to find the children of a given classifier



how to find the children of a given classifier

From: Gonzalo Génova <ggenovaf_at_gmail.com>
Date: Wed, 22 Apr 2009 12:25:48 +0200
Message-ID: <fc1379060904220325i6cc55124h6d30181d98e4639b@mail.gmail.com>
 Dear all,

In UML 2.1.1 it is easy to find the parent(s) of a given classifier. See in
figure 7.9 the meta-associations between Classifier and Generalization and
in pp. 54-56 (metaclass Classifier) the first Constraint and the second
Additional Operation. All this results in self.parents( ) =
self.generalization.general.

On the contrary, there is no direct way to find a classifier's children,
since one of the above mentioned meta-associations is one-way. Therefore, it
seems to me one needs to query all classes in the model, somewhat like this:

given a parent class p
for all classes c in the model
find those classes for which c.parents( ) includes p

My question is, how is this operation expressed in OCL?

Thank you very much,
Gonzalo

==========================================================================
Gonzalo Génova ggenova@inf.uc3m.es
Associate Professor
*http://www.kr.inf.uc3m.es/ggenova/*<http://www.kr.inf.uc3m.es/ggenova/>
Department of Computer Science
*http://www.inf.uc3m.es/*<http://www.inf.uc3m.es/>
Carlos III University of Madrid *http://www.uc3m.es/* <http://www.uc3m.es/>

Escuela Politécnica Superior
Avda. de la Universidad, 30
28911 Leganés - Madrid - Spain
Tel. (34) 91 624 91 07
Fax (34) 91 624 91 29
Received on Wed 22 Apr 2009 - 11:25:55 BST