1. Home
  2. Docs
  3. Chapter 23. Document Production
  4. 5. Writing Doc. Composer element templates
  5. Working with other DCTL Constructs

Working with other DCTL Constructs

Download PDF

<OwnerDiagram>

Retrieve the diagram in which a diagram element or the master view of a model element reside. For example, class diagram “Domain Diagram” and “Security” both contain class “Login” (same model element), while the master view is placed inside “Login”, by applying <OwnerDiagram> on the “Login” class, diagram “Domain Diagram” will be returned.

If you want to retrieve all the diagrams that own a model element, use <ForEachOwnerDiagram> instead.

<ParentModel>

<ParentModel> serves two purposes. First, to retrieve the immediate parent element of a model element or diagram. Second, to look for a specific type of parent element along the hierarchy.

Here is an example of how <ParentModel> can help you find the immediate parent element. For example, class “Circle” is in package “Shape”, by applying <ParentModel> on the “Circle” class, the package “Shape” will be returned.

Name Description/Usage Required?
modelType : string Used in finding a specific type of parent along the hierarchy. For example, if class “Shape” is in package “Shape” and “Shape” is in model “Main”, by applying <ParentModel modelType=”Model”> on “Circle”, the model “Main” will be returned. Optional

<ParentShape>

<ParentShape> serves two purposes. First, to retrieve the immediate parent shape of a shape. Second, to look for a specific type of parent shape along the hierarchy.

Here is an example of how <ParentDiagram> can help you find the immediate parent element. For example, class “Circle” is drawn in package “Shape”, by applying <ParentParent> on the “Circle” class, the package “Shape” will be returned.

Name Description/Usage Required?
shapeType : string Used in finding a specific type of parent along the hierarchy. For example, if class “Shape” is drawn in package “Shape” and “Shape” is drawn in model “Main”, by applying <ParentShape modelType=”Model”> on “Circle”, the model “Main” will be returned. Optional