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 of the attributes of the elements returned by the queries can be used.

Graphical user ID (GUID)

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

_image

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

stringRepresentation

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

The query element

Every schema element has a special child element named a query. Unlike the other elements in the schema, a query has no underlying Rational Tau query and type assigned to it. Using the query element as it 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 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.

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 this scenario, a valid query is GetAllEntities().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