Skip to main content

VI. Defaults layer

The current architecture allows for defining fallback values and limiting the domain of properties by explicitly specifying the permitted set of values. Both the fallback values and the value-set are contained in a contextual profile dependent on a language/locale. Additionally, it is possible to create a new profile that inherits definitions from an existing one, through the use of inheritance mechanism.

{
"$type": "defaults",
"$version": "1.0",
"$schema": "A01564DBBCB04816A9BFE5FB50723EFD3BBE119E",
"$id": "DA4B9237BACCCDF19C0760CAB7AEC4A8359010B0",
"$author": "Andrei",
"$description": "Provides default values for English schema properties",
"locale": "en_US",
"extendsLocale": "54C3CC765FE34F3C862FD4EE2FA8E891817CDD43",
"defaults": {
"active": "false"
},
"options": {
"sex": [{ "m": "male" }, { "f": "female" }]
}
}

The presented data model aggregates at the profile level the properties default values and value-sets. The defaults collection gives the possibility of assigning a default value to each property in the corresponding locale.

Occasionally, concepts have properties with a bounded list of values (e.g. months of the year) - these values can be added to the options list for any concept’s property.

In a Nutshell

If you want to add drop down values for a property, you can do it by adding the a list of values against the property name in the options section of the defaults layer.

OpenfabricAI Footer