Getting Role Cardinalities from Templates

Post Reply
Pavel Selchukov
Posts: 12
Joined: Tue May 15, 2012 7:06 am

Getting Role Cardinalities from Templates

#1 Post by Pavel Selchukov »

Hello all!

We faced a problem which seems to be a common: the way to get all role properties from template is to use appropriate metatemplates, that offers properties such a RoleIndex, RoleFillerType and so on. But we cannot find a property to obtain Role Cardinality.

What could you suggest to do it properly?

We think that the proper way is to define something like HasCardinality in metatemplate p8:TemplateRoleDescription.

Posts: 189
Joined: Sun Jan 22, 2012 9:14 pm

Re: Getting Role Cardinalities from Templates

#2 Post by OnnoPaap »

Your question suggests that a role can be used many times from a single template, if assigned a cardinality.

But a template has an internal model expressed in first order logic. A template role is connected to that model. It cannot be dynamic.

If a relationship needs to be multiple, the solution is to use multiple templates.

Here is Hans Teijgeler's application model that can be found at this link
two-stage-centrifugal-pump.jpg (51.09 KiB) Viewed 2196 times
The class-level template has cardinality, in this case set fixed to 2. That means that the instance of individual has 2 templates for the composition of impellers.

Post Reply