Codelists
Codelists allow to map property values to a different value. This is useful especially for HTML representations.
Configuration
The following table describes the structure of the code list files.
Name | Default | Description | Type | Since |
---|---|---|---|---|
id | Unique identifier of the entity, has to match the filename. Allowed characters are (A-Z, a-z), numbers (0-9), underscore and hyphen. | string | v2.0 | |
label | id | Human readable label. | string | v2.0 |
entries | {} | Map with the original value as key and the new value as value. | object | v2.0 |
sourceType | TEMPLATES | Always TEMPLATES . | string | v2.0 |
fallback | the value | Optional default value. | string | v2.0 |
For the target values in entries
and for fallback
also stringFormat transformations can be used. If the transformed value is intended for HTML output, then Markdown markup can also be used, this will be formatted in the HTML output.
Example
Based on the INSPIRE codelist EnvironmentalDomain, maps values like soil
to the German label of the entry in the INSPIRE codelist registry.
---
id: environmental-domain
label: Umweltbereich, für den Umweltziele festgelegt werden können.
sourceType: TEMPLATES
entries:
air: Luft
climateAndClimateChange: Klima und Klimawandel
healthProtection: Gesundheitsschutz
landUse: Bodennutzung
naturalResources: natürliche Ressourcen
natureAndBiodiversity: Natur und biologische Vielfalt
noise: Lärm
soil: Boden
sustainableDevelopment: nachhaltige Entwicklung
waste: Abfall
water: Wasser
Storage
Codelists reside under the relative path store/entities/codelists/{codelistId}.yml
in the data directory.