.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : CIX_JCIE_Package.rst * Created by : Marnix Bochove (original text) * Last update : 18-03-2021 * Updated by : Niels de Nies * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /inline-images.txt Package ======= This element marks the output location of a Java package and is defined by the ** element. A package contains interface and class elements that correspond to java interfaces and classes in this package. .. rubric:: Usage .. code-block:: xml :caption: example :name: Package-01 :linenos: :emphasize-lines: 3-17 ... 0 or more elements 0 or more elements ... .. rubric:: Attributes .. list-table:: **attributes of ** :widths: 20 80 :header-rows: 1 :class: tight-table * - Name - Details * - name - The name of the java package made * - path - The path relating to the java output folder as defined in the MetaFactory project. * - foreach - Indicates whether the package must be created for each element in model (value of foreach determines what model element). Possible values: package, object, attribute, reference * - package - The element also has a package attribute. The latter points to the package element of the model. * - object - The name of the model element used to apply the foreach attribute. * - condition - An expression that evaluates to true or false. Generation of the current file wil precede if true and otherwise not. .. code-block:: condition="${object.name}=Person" In this case, the package is generated only if the current model object has the name: Person. This works only if all model objects are iterated (foreach=”object”). * - var0 - Value that you wish to store in the pre-defined variable with the name var0. Reference to this value can be made later by means of: ${var0}. This can be used in both the pattern and in a snippet (freemarker or velocity template). * - var1 - Value that you wish to store in the pre-defined variable with the name var1. Reference to this value can be made later by means of: ${var1}. This can be used in both the pattern and in a snippet (freemarker or velocity template). * - var2 - Value that you wish to store in the pre-defined variable with the name var2. Reference to this value can be made later by means of: ${var2}. This can be used in both the pattern and in a snippet (freemarker or velocity template). * - var3 - Value that you wish to store in the pre-defined variable with the name var3. Reference to this value can be made later by means of: ${var3}. This can be used in both the pattern and in a snippet (freemarker or velocity template). * - var4 - Value that you wish to store in the pre-defined variable with the name var4. Reference to this value can be made later by means of: ${var4}. This can be used in both the pattern and in a snippet (freemarker or velocity template). * - var5 - Value that you wish to store in the pre-defined variable with the name var5. Reference to this value can be made later by means of: ${var5}. This can be used in both the pattern and in a snippet (freemarker or velocity template). * - skip - True or false. This works as a flag to prevent generation of this package whenever the “Use @skip of packages” checkbox of the MetaFactory tool (located inside the menu Transform) is checked. Choosing not to generate specific packages every time can reduce processing time. You might also want to use this when you work on one specific package. Setting its flag to true while false for the other packages allows generation of the package that you are working on only.