Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

They can have different value types like the predefined string, double or dataTime but also custom value types.

Config

With custom value types it is possible to define a list of restricted values the properties can have.

Config

An example configuration can be seen below where the different properties are defined in SampleProperties.csv and the custom value type "SOURCE" in Bron.csv 

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<sampleMetadataSchema xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/sampleMetadataSchema.xsd">
	<valueTypes>
		<string id="TEXT"/>
		<enumerationsCsvFile>
			<file>Bron.csv</file>
			<id>SOURCE</id>
			<code>%BRON%</code>
			<label>%NAME%</label>
		</enumerationsCsvFile>
	</valueTypes>
	<properties>
		<propertiesCsvFile>
			<file>SampleProperties.csv</file>
			<charset>UTF-8</charset>
			<id>%id%</id>
			<name>%name%</name>
			<valueTypeId>%valueTypeId%</valueTypeId>
		</propertiesCsvFile>
	</properties>
</sampleMetadataSchema>

In SampleProperties.csv shown below the properties "EMP_NR_A", "EXT_REF", "SMP_NAME" and "COST_CODE" are sample properties which are of value type "TEXT" that is defined as string with no other restrictions. 

No Format
id,name,valueTypeId
EMP_NR_A,Medewerker analyse,TEXT
EXT_REF,Externe referentie,TEXT
SMP_NAME,Monster omschrijving,TEXT
COST_CODE,Projectcode,TEXT
BRON,Bron,SOURCE

The property "BRON" however has the custom value type "SOURCE" which is defined as an enumeration in the file Bron.csv. This means the values of the property "BRON" can only have the values "Visdata_Waternet_2006-2012 V4" or "MACFT2010LIJN"

No Format
BRON;NAME
Visdata_Waternet_2006-2012 V4;Visdata_Waternet_2006-2012 V4
MACFT2010LIJN;MACFT2010LIJN