.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : MapiRef_ModelAttribute.rst * Created by : Marnix Bochove (original text) * Last update : 31-03-2021 * Updated by : Niels de Nies * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /inline-images.txt .. include:: /external-links.txt Model API Model Attribute ========================= ModelAttribute is a child of ModelObject and can contain Metadata. All mentioned functions are available on ModelAttribute which is made available in Freemarker/Velocity by iterating over the element tree in model.xml. In any step of the operation process you can access ModelAttribute, which is always the currently active attribute. For an image see :ref:`API_hierarchy` |Eye M| Getter functions in Freemarker/Velocity can be accessed as an object property, so modelAttribute.getName() can be written as **modelAttribute.name**. Overview -------- .. list-table:: **API of 'Model Attribute'** :widths: 20 80 :header-rows: 1 :class: tight-table * - Modifier and Type - Method and Description * - void - :ref:`addMetaData(String key, String value) ` * - void - :ref:`addMetaData(String key, String value, String description) ` * - List - :ref:`findMetaDataByKey(String expression) ` * - String - :ref:`getAttributeValue(String attributeName) ` * - String - :ref:`getFileComment() ` * - String - :ref:`getKind() ` * - Integer - :ref:`getLength() ` * - List - :ref:`getMetaData() ` * - String - :ref:`getMetaData(String metaDataKey) ` * - String - :ref:`getMetaData(String metaDataKey, boolean throwExceptionIfNotFound) ` * - String - :ref:`getMetaData(String metaDataKey, String defaultValue) ` * - String - :ref:`getName() ` * - Boolean - :ref:`getNotnull() ` * - ModelObject - :ref:`getObject() ` * - String - :ref:`getType() ` * - boolean - :ref:`hasMetaData(String key) ` * - boolean - :ref:`hasMetaData(String key, String value) ` * - void - :ref:`setFileComment(String fileComment) ` * - void - :ref:`setLength(Integer length) ` * - void - :ref:`setName(String name) ` * - void - :ref:`setNotnull(Boolean notnull) ` * - void - :ref:`setObject(ModelObject object) ` * - void - :ref:`setType(String type) ` Details ------- .. include:: include/addMetaData2.txt .. include:: include/addMetaData3.txt .. include:: include/findMetaDataByKey1.txt .. include:: include/getAttributeValue1.txt .. include:: include/getFileComment.txt .. include:: include/getKind.txt .. include:: include/getLength.txt .. include:: include/getMetaData.txt .. include:: include/getMetaData1.txt .. include:: include/getMetaData1a.txt .. include:: include/getMetaData2.txt .. include:: include/getName.txt .. include:: include/getNotnull.txt .. include:: include/getobject.txt .. include:: include/getType.txt .. include:: include/hasMetaData1.txt .. include:: include/hasMetaData2.txt .. include:: include/setFileComment1.txt .. include:: include/setLength1.txt .. include:: include/setName1.txt .. include:: include/setNotnull1.txt .. include:: include/setObject1.txt .. include:: include/setType1.txt