UML-to-CORBA transformation profile

The Common Object Request Broker Architecture (CORBA) transformation profile contains stereotypes that you can use to model and generate most CORBA elements.

You can use the stereotypes of the profile to model specific CORBA types such as struct, valuetype, typedef, sequence, array, and exception. However, you can model the following CORBA types without using a profile: modules, interfaces with attributes, operations, parameters, inheritance between interfaces, native types, and enumerations.

The profile also contains information about the constraints that are applied to the stereotypes.

You can also use the profile to specify the UML components that are transformed into CORBA Interface Definition Language (IDL) elements by setting the generateCode property to true or false. During code generation, the transformation ignores components that have the generateCode property set to false.

Model validation

You can use the model validation feature to evaluate a source model that has the profile applied to it for potential transformation problems and naming conflicts such as circular relationships that can cause compilation errors in the generated IDL file. The following table lists rules that you can use to prepare the source model for transformation and to avoid transformation problems.
UML stereotype Usage rule
«CORBAOperation» Apply this stereotype to a UML operation.

The context property of this stereotype specifies a set of unique string literals. These literals map to the identifiers that are an implicit part of the operation call.

«CORBATruncatable» Apply this stereotype to a generalization relationship to indicate a truncatable value type inheritance.
Note: To represent a value type in UML, apply the «CORBAValue» stereotype to a UML class.

The transformation generates code for a truncatable value type inheritance.

«CORBAUnion» Apply to a UML class to generate a CORBA union.

The switchType property of the stereotype specifies the classifier type of the generated switch construct. The classifier type can be integer, character, Boolean, enum, or any other scoped name.

«CORBAValue»

Apply this stereotype to a UML class.

The value type has these characteristics:
  • No nested classifiers other than typedef, struct, exception, or enumeration
  • Members with unique names
  • Unique inherited attributes
  • Unique inherited operations
  • Supports only one non-abstract interface
  • With state members, can only inherit from a single value type with state members
The abstract value type cannot have these characteristics:
  • Inherit from the same class more than once
  • Have state members and cannot be a boxed value type
The boxed value type has these characteristics:
  • Cannot take part in inheritance
  • Has one association or attribute
«CORBAConstants» A class has these characteristics:
  • Does not have operations
  • Does not have nested classifiers
  • Members have unique names
«CORBAException» The class does not have nested classifiers.
«CORBAStruct» A struct should not have these characteristics:
  • Own generalization or implementation relationships
  • Have nested classifiers
  • Have operations
«CORBATypedef» Apply this stereotype to a UML class.

A typedef should not have these characteristics:

  • Generalization relationships
  • One substitution relationship
  • Associations, attributes, or operations
  • Nested classifiers

The specification property in this stereotype indicates whether the type definition is an array, a sequence, or a fixed-point type (in which case a substitution relationship is not mandatory).
When you model fixed-point types, the point property of the stereotype indicates the digit and scale. For example, specify 10,2 to indicate a value that is ten digits long and has a decimal point after the second digit from the right.

«CORBAState» A state member attribute should have a value type class as its owner.
«CORBAOneway» A one way operation has these characteristics:
  • Does not have parameters with in or inout as the type
  • Has a return type of void
  • Has an interface as its owner
  • Does not raise any exceptions
Enumerations Enumerations should have enumeration literals with unique names.
Components Components do not contain a nested component

Packages in the component should have unique names.

Interfaces
  • Should have members with unique names
  • Should have unique inherited operations
  • Should have unique inherited attributes

Should not contain a nested interface, package, value type, or component.
An abstract interface can only inherit from other abstract interfaces.

Models
  • Do not have elements name with CORBA keywords
  • Do not have classes or interfaces with circular generalization or implementation relationships
  • Duplicate element names
  • Do not have a badly formed hierarchy such as one that contains a nested component
«switch» Apply this stereotype to the attributes of a CORBA union. To model a CORBA union, see the «CORBAUnion» row in this table.

The case property of the stereotype is a string literal that represents the case type.
When set to true, the isDefault property indicates that the attribute contains the default block for the generated switch statement.


Feedback