4.2.2.2. Package

Element <package> is the highest inside your model xml tree and may contain multiple <object> elements. The number of <package> elements in <model> is not limited. It can thus be used to group your objects, which allows MetaFactory to execute group specific code instructions.

Listing 4.14 <package/> syntax
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?xml version="1.0" encoding="UTF-8"?>
<model xmlns="https://metafactory.io/xsd/v1/model"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://metafactory.io/xsd/v1/model
                             https://metafactory.io/xsd/v1/model.xsd">
        ...
        <package name="yourModelPackageA">
                0 or more <properties><properties>
                0 or more <object name="yourModelObject01">
        </package>
        <package name="yourModelPackageB">
                0 or more <properties><properties>
                0 or more <object name="yourModelObject01">
        </package>
        ...
</model>

Attributes

Table 4.9 attributes of <package/>

Name

Details

Required

name

Name of the package – has to be unique.

mandatory

Sub elements

Table 4.10 <package/> sub elements

Name

Details

Number

properties

This element can contain properties that are specific to the package.

0 .. n

object

Objects define the data entities in the MetaFactory model. They live inside the package in which they are defined.

0 .. n