Templates

MetaCroc logo

Templates #

Together with metadata, templates are the heart of MetaCroc. They ensure metadata transformation to scripts, documentation, and other kinds of output.

Templating in MetaCroc is based on Apache Freemarker(TM), and templates based on this engine are stored here.

Template identification #

When MetaCroc selects an appropriate template to transform metadata into output, it uses these four attributes:

  • System technology
  • Element type
  • Element stereotype
  • Object type assigned to the element

Template

This information is part of a template definition. Additionally, there are other attributes:

Attribute Description
File extension An extension of the generated file
Output format This information enables proper preview of the output
Description A free text field explaining the template purpose
Comment A free text field commenting on the template

Template language #

The detailed description and manual of the template language are available on the Apache Freemarker(TM) page.

If you want to explore the latest structure of JSON processed by templates, go to any element of the appropriate type, open Preview, and select RAW. You can see the JSON structure.