Rational Tau attributes

An attribute can be used to define the content of a template element for Rational® Tau data sources or in expressions that calculate the content of a template element or formatting capabilities of a template element. After queries are assigned to template elements, all the attributes of the elements returned by the queries can be used.

Graphical User ID (GUID)

Every schema element has a special attribute named guid. This attribute is filled by default with the unique GUID of the current model element.

_image

Every schema element representing a Tau diagram has a special attribute named _image. Use this attribute to generate an image file for the current diagram and optionally include the image in the output.

stringRepresentation

This attribute which is available for all expressions, actions, and definitions, holds the representation of the element which is not parsed.

The query element

Every schema element has a special child element named query. Unlike the other elements in the schema, a query has no underlyingRational Tau query and type assigned to it. Using the query element as is returns no result.

The query element offers another level of customization for the document generation. If the existing elements are not sufficient or optimal for a given task, you can define the type and the query with the query element. The type is defined by adding a type cast to the query element and the query is defined as a native filter.

Example

The first image shows the cast query (Any Type) added to a query element. The second image shows the query element with the cast model.query(Diagram) used in the template.

A cast added to a query element.

The query element with cast is used in the template.

For the above scenario, a valid query isGetAllEntities().select( IsKindOf("Diagram")).

A query result is filtered based on the type cast used in the query. If the query is syntactically correct, the result contains only elements that match the specified type cast.


Feedback