4.2.2.5. Metadata

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.

Metadata example 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 4.18 Metadata example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<model>
    <package name="yourModelPackage">
        <metadata>
            <yourProperty1>yourPropertyValue1</yourProperty1>
            <yourProperty2>yourPropertyValue2</yourProperty2>
            ...
        </metadata>
    <object name="yourModelObject01">
        <metadata>
            <yourPropertyA>yourPropertyValueA</yourPropertyA>
            <yourPropertyB>yourPropertyValueA</yourPropertyB>
            ...
        </metadata>
        ...
    </object>
        ...
    <package/>
    ...
</model>

Attributes

There are no attributes for <metadata/>.

Sub elements

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