Data Structure¶
Data structure is the main part of the data model. You can use the 5-part file model.xml to get it.
Part “entities”¶
The part contains 6 entities, each of which has certain properties.
Entity Properties:
name – entity name (required; may contain Latin letters, figures, ‘_’ symbol);
displayName – entity name displayed in the UI (required; may contain letters of different languages, figures, different symbols including “space”);
groupName – group of entities (required; may contain Latin letters, figures, ‘_’ symbol). See description in the entitiesGroup part.
The attribute list of an entity can contain many attributes of three types: simple, array-attribute and complex.
The “MASTER” entity has only two simple attributes.
Entity Attribute Properties:
name – attribute name (required; may contain Latin letters, figures, ‘_’ symbol);
displayName – attribute name displayed in the UI (required; may contain letters of different languages, figures, different symbols including “space”);
order – attribute order in the entity attribute list.

Figure 1. Six entities in “entities” part
All entitys have some properties such as “name”, “display name”, list of attributes.

Figure 2. “MASTER” entity and its properties
Most simple attributes have the simpleDataType property. This property sets the data type of the simple attribute.
The “ALL_TYPES» entity has 12 simple attributes, and 9 of them have different simpleDataType properties with values: string, integer, number, date, time, date/time, boolean.
The simple attribute with simpleDataType = “Number” is used to set the units of measurement. It has a measureSettings property, which in turn has categoryId and defaultUnitId properties. The values of measureSettings.categoryId and measureSettings.defaultUnitId must match the values of category.name and unit.name in the measure-units.xml file.
The “ALL_TYPES” entity has a simple “lookupLink” attribute. The value of this attribute is the code attribute of the lookup entity.
The lookupEntityCodeAttributeType property tells you the type of this code attribute. The lookupEntityType property specifies the name of the lookup entity. See the description of the lookups part.
The simple “webLink” attribute is suitable for linking to data. It has a linkDataType property.
The value of the simple attribute “enum” is an element of one of the enumerations that are defined in enumDataType. All enumerations of the model and their elements are written in the file enumerations.xml.
Notes:
Each entity must have at least one simple attribute.
One simple attribute of each entity must be main displayable (have the following properties: mainDisplayable=”true” displayable=”true” nullable=”false”).
«ALL_TYPES” entity has not only simple attributes, but also array attributes, which can store multiple values (arrays of values).
Array attributes have arrayValueType properties instead of simpleDataType attribute properties.
The third type of attributes is complex. “COMPLEX_ATTRS» entity contains two complex attributes. The first one is defined by the nested object “complex_levels” (nestedEntityName=”complex_levels”). The second uses the nested object “complex_all_types” (nestedEntityName=”complex_all_types”). See nesteds part for description of nested objects.
Part “lookups”¶
Lookups entities are quite similar to entities. They have the same properties:
name – lookup name (required; may contain Latin letters, figures, ‘_’ symbol);
displayName – lookup name displayed in the UI (required; may contain letters of different languages, figures, different symbols including “space”);
groupName – group of entities/lookup entities (required; may contain Latin letters, figures, ‘_’ symbol). See description in the entitiesGroup part.
Lookup entity has a list of simple attributes and one code attribute. The code attribute can be used in the attributes of the entity to link the entity and the lookup entity.
In the above example the “ALL_TYPES” entity is linked to the “STR_LOOKUP» lookup entity by a simple entity attribute “lookupLink” and code attribute “code”.
Notes:
Each lookup entity must have one code attribute and at least one simple attribute.
The code attribute or one simple attribute of each lookup entity must be main displayable (must have the following properties: mainDisplayable=”true” displayable=”true” nullable=”false”).

Figure 3. Lookups
Part “nesteds”¶
In the above example data model, there are four nested objects that cannot exist without entities. They define a complex attribute structure and contain lists of simple, array or complex attributes.
Properties of nested object:
name - name of the nested object (required; can contain Latin letters, numbers, ‘_’ character);
displayName - name of the object displayed in the user interface (required; can contain letters of different languages, numbers, different symbols, including space).

Figure 4. Four nesteds
Part “entitiesGroup”¶
A data model can contain many entities and lookup entities. You can use entity/lookup entity groups to make searching the user interface easier.
There is one default group - “ROOT”.
Group properties:
name - group name (required; can contain Latin letters, numbers, ‘_’ symbol);
displayName - group name displayed in the user interface (required; can contain letters of different languages, numbers, various symbols, including space).

Figure 5. Entity/lookup entity groups
Part “relations”¶
Entities can be linked to lookup entities using simple or array attributes with given lookupEntityType and lookupEntityCodeAttributeType properties.
There are relations of 3 types: “Contains”, “References”, and “ManyToMany” (relType property).
Each relation, like register or lookup, has a name and a display name (properties name and displayName). They can be required or not (property “required”). The name of the primary entity is defined by the fromEntity property; toEntity is the name of the subordinate entity.
Relations like register or lookup type can also have simple attributes.

Figure 6. Relations