Question & Answer
Question
How can you retrieve the attributes of a UML DataType using BIRT in IBM Rational Software Architect?
Cause
The attributes of a UML DataType are not of type Property (like the attributes of a UML Class). The attributes of a UML DataType are of type ExtensionEnd
Answer
The following steps describe how you can show the ExtensionEnds of UML data types in a BIRT report:
1. Create a new BIRT Report.
2. Create a new Data Source of type UML Model.
3. Create a new Data Set called ExtensionEnds using the Row Mapping:
Row Query Expression:
//ExtensionEnd
Row Query type:
uml:ExtensionEnd
4. Specify the Column Mapping as:
Name | Query | Type |
name | @name | String |
ownerUri | getURI(./owner) | String |
5. Create a new data set called DataTypes using the Row Mapping:
Row Query Expression:
//DataType
Row Query Type:
uml:DataType
6. Specify the Column Mapping as:
Name | Query | Type |
name | @name | String |
uri | getURI(.) | String |
7. Create a new Joint Data Set called DataTypesWithExtensionEnds
8. Reference the two data sets previously created: DataTypes and ExtensionEnds
9. Select: Inner Join
10. Select DataTypes::uri and ExtensionEnds::ownerUri as join columns:
11. Add a new Table on the report surface
12. Bind the table to the data set DataTypesWithExtensionEnds
13. Add the columns DataTypes::name and ExtensionEnds::name to the table:
14. Preview the report. It will show something like this:
A sample model with the above report created in Rational Software Architect 8.0.4.1 is attached to this document.
Was this topic helpful?
Document Information
Modified date:
10 September 2020
UID
swg21617025