MetaFactory allows the addition of metadata to various levels of the model tree. For every Package, Object and Attribute/Reference, any number of metadata can be defined.

Eye M You are completely free to define the names of the metadata as well as how you use them in your Code Instructions. Nothing is predefined by MetaFactory and metadata don’t have any meaning when there is no Code Instruction that actively reads them out. Think of it as ‘toggles’ that you introduce to help your Code Instruction acquire the necessary input data to control its behaviour. It is the job of your Code Instruction to properly process whatever you choose to define there.

Listing 5.19 defines four metadata: two inside the scope of the package ‘yourModelPackage’ (yourProperty1 en yourProperty2) and two metadata in the scope of the object ‘yourModelObject01’ (yourPropertyA en yourPropertyA).

Exclam S The <metadata> must be placed as the first element in the scope of <package> or <object>.

Listing 5.19 Metadata example
 2    <package name="yourModelPackage">
 3        <metadata>
 4            <yourProperty1>yourPropertyValue1</yourProperty1>
 5            <yourProperty2>yourPropertyValue2</yourProperty2>
 6        </metadata>
 8        <object name="yourModelObject01">
 9            <metadata>
10                <yourPropertyA>yourPropertyValueA</yourPropertyA>
11                <yourPropertyB>yourPropertyValueA</yourPropertyB>
12            </metadata>
13        </object>
15    </package>
16    ...


There are no attributes for <metadata/>.

Sub elements

Every sub element is a property, with the tag name as the name of the property.