Profiling with explicit profile settings rule enabled

The default behavior for profiling can be altered by including the rule rule-trf-profiling-processing-explicitProfileSettings in the configuration of the Profiler. The following sections describe the behavior of the profiler under this rule.

Profile Identifier

Same as described here.

Model Requirements

Profile information for a model element is given via the tagged value “profiles”. The value is a comma-separated list of profile identifiers. If the tagged value is missing or empty, then the model element will be removed by the Profiler. This will be explained via examples later on.

How Profiling Works

Containment of Profile Identifiers

Same as described here.

Profiling of Model Elements

The following subsections describe how the Profiler handles different model elements when the rule rule-trf-profiling-processing-explicitProfileSettings is enabled: generalization relationships, attributes, associations, and association classes. For a better understanding, the profile identifiers in these examples do not contain version indicators. Version indicators are handled  the same way as in the default profiling behavior (further details: here – last subsection titled ‘Taking Into Account Version Indicators’).

Inheritance

The following figure shows how the Profiler handles a generalization relationship between two model classes.

profiler inheritance ESP

The following diagram shows an invalid profile configuration. It is invalid because the profile set of ClassA does not contain the profile set of ClassB.

profiler inheritance invalid ESP

WARNING: if a class without profile information is part of an inheritance hierarchy, profiling under the specific behavior documented on this page will cause the inheritance tree to be interrupted – unless rule-profiling-processing-classRemovalIncludesAllSubtypes is enabled! ShapeChange will log an error if it detects such an interruption during pre-processing, more specifically while executing rule-trf-profiling-preprocessing-modelConsistencyCheck. Instead of an error message ShapeChange will log an info message, if the interruption will be prevented because rule-profiling-processing-classRemovalIncludesAllSubtypes is enabled.

Attributes

The following two figures show how the Profiler handles attributes.

profiler attributes ESP

profiler attributes2 ESP

 

The next diagram shows an invalid profile configuration. It is invalid because the profile set of ClassA does not contain the (complete) profile set of attribute3.

profiler attributes invalid ESP

When ShapeChange encounters such an invalid profile configuration, it logs a warning.

Associations

The following two figures show how the Profiler handles associations.

profiler associations ESP

profiler associations ESP 2

The next diagram shows an invalid profile configuration. It is invalid because the profile set of ClassA does not contain the (complete) profile set of propCA.

profiler associations invalid

When ShapeChange encounters such an invalid profile configuration, it logs a warning.

Association Classes

The following two figures show how the Profiler handles association classes.

profiler association class ESP

profiler association class ESP 2

Note: if an association is removed, the association class is removed as well – and vice versa.

Additional Behavior

Same as described here.