...
Besides the text of the annotation itself it is possible to define extra properties which belong to the annotation.
This should be configured in the Region Config file AnnotationMetadataSchema.xml.
They will have an id, name and a value type.
...
Annotations can be imported via annotation location set id in the import module and also exported via annotation location set id in the export module.
Configuration example
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <annotationMetadataSchema xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews httphttps://fewsfewsdocs.wldelftdeltares.nl/schemas/version1.0/annotationMetadataSchema.xsd"> <valueTypes> <string id="TEXT"/> <!--<enumeration id="Categorie"> <value code="001" label="Peilbesluiten"> <description>001 Peilbesluiten</description> </value> <value code="002" label="Grondwater"> <description>002 Grondwater</description> </value> <value code="003" label="Alarmen CAW"> <description>003 Alarmen CAW</description> </value> </enumeration>--> <enumeration id="Sub-Categorie"> <value code="001001" label="Peilbesluit kan niet ingesteld worden." constraintEnumerationId="Categorie" constraintEnumerationCode="001"> <description>001001 Peilbesluit kan niet ingesteld worden.</description> </value> <value code="001002" label="Droge zomer." constraintEnumerationId="Categorie" constraintEnumerationCode="001"> <description>001002 Droge zomer.</description> </value> <value code="001003" label="Natte winter" constraintEnumerationId="Categorie" constraintEnumerationCode="001"> <description>001003 Natte winter</description> </value> <value code="001004" label="Verkeerde instelling" constraintEnumerationId="Categorie" constraintEnumerationCode="001"> <description>001004 Verkeerde instelling</description> </value> <!-- Categorie 002 --> <value code="002001" label="hemelwater" constraintEnumerationId="Categorie" constraintEnumerationCode="002"> <description>002001 hemelwater</description> </value> <value code="002002" label="Grondwater" constraintEnumerationId="Categorie" constraintEnumerationCode="002"> <description>002002 Grondwater</description> </value> <value code="002003" label="Lekke kelder" constraintEnumerationId="Categorie" constraintEnumerationCode="002"> <description>002003 Lekke kelder</description> </value> <value code="003001" label="Alarm"> <description>003001 Alarm</description> </value> </enumeration> <enumerationsCsvFile> <file>categorie.csv</file> <id>%id%</id> <code>%code%</code> <label>%naam%</label> <description>%description%</description> <constraintEnumerationId>%restrictieType%</constraintEnumerationId> <constraintEnumerationCode>%restrictieWaarde%</constraintEnumerationCode> </enumerationsCsvFile> </valueTypes> <properties> <property id="freeText" valueTypeId="TEXT"/> <propertiesCsvFile> <file>AnnotationProperties.csv</file> <charset>UTF-8</charset> <id>%id%</id> <name>%name%</name> <valueTypeId>%valueTypeId%</valueTypeId> </propertiesCsvFile> </properties> </annotationMetadataSchema> |
...
There can be constraints defined on individual enumeration values, this means that these enumeration values can only be chosen in combination with a different enumeration value for another property. This can be done in the config by the attributes constraintEnumerationId & constraintEnumerationCode.
Example of the csv file referred to from AnnotationMetadataSchema that actually defines properties:
Code Block | ||
---|---|---|
| ||
id;name;valueTypeId
Categorie;Categorie;Categorie
Sub-Categorie;Sub-Categorie;Sub-Categorie
|