When publishing a model report, you can customize the elements
that are reported on by using Object Constraint Language (OCL) in the report
manifest file.
To customize the data elements used in a model report, you can add
OCL to an existing report or create a new report by editing the report manifest
file,
com.ibm.xtools.publish.uml2\resources\reports\reports.manifest.
To
create a new report with customized data elements:
- Open the report manifest file for editing. This file
is located at com.ibm.xtools.publish.uml2\resources\reports\reports.manifest.
- Create a new report by defining the following fields:
<reportManifest name="Report Name"
description="Text description of the report"
author="Your name"
xsltFile="resources/reports/MetricsReport.xsl"
oclSelfType="Class"
oclQuery="self.oclIsKindOf(Class)"
outFileExt="pdf"
USING_ICONS="false"
EXTRACTING_DIAGRAMS="false"
DIAGRAM_FORMAT="JPG"
DETAIL_LEVEL="FULL">
</reportManifest>
The oclSelfType and the oclQuery attributes,
formatted in bold, define the data selection attributes. The oclSelfType attribute
is the UML data type of the elements to select and the oclQuery attribute
is the OCL query for refining the selection.
- Save the report manifest file.
- Run the product.
- Select a model to report on.
- Click .
- View your customized report.