Extending Your Models with Profiles

All PowerDesigner resource files contain a Profile category directly beneath root. A profile is a UML extension mechanism, which is used for extending a metamodel for a particular target.

Profiles are used in PowerDesigner for adding additional metadata to objects and creating new kinds of links between them, sub-dividing object types (via stereotypes and criteria), customizing symbols, menus, and forms, and modifying generation output. For example:


You can extend the metamodel in the following ways:

You can review and edit the profile in a resource file by opening it in the Resource Editor and expanding the top-level Profile category. You can add extensions to a metaclass (a type of object, such as Class in an OOM or Table in a PDM), or to a stereotype or criterion, which has previously been defined on a metaclass:



In the example above:


Extensions are inherited, so that any extensions made to a metaclass are available to its stereotyped children, and those that are subject to criteria.



Thus, in the example above, classes that bear the MyStereotype stereotype have available the Attribute_5 extended attribute, and those that bear this stereotype AND meet AnotherCriterion have Attribute_4 and Attribute_5 available.

Note:

Since you can attach several resource files to a model (for example, a target language and one or more extended model definitions) you can create conflicts, where multiple extensions with identical names (for example, two different stereotype definitions) are defined on the same metaclass in separate resource files. In case of such conflicts, the extended model definition extension usually prevails. When two XEMs are in conflict, priority is given to the one highest in the list.