Page tree
Skip to end of metadata
Go to start of metadata

Contents

Overview

Different kind of properties can be defined for samples in the region config file SampleMetadataSchema.xml. 

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

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. By using %<column>% there can be referred to the content of the columns in the csv file.

<?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 (located in MaplayerFiles config directory) 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. 

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 (located in MaplayerFiles config directory). This means the values of the property "BRON" can only have the values "Visdata_Waternet_2006-2012 V4" or "MACFT2010LIJN"

BRON;NAME
Visdata_Waternet_2006-2012 V4;Visdata_Waternet_2006-2012 V4
MACFT2010LIJN;MACFT2010LIJN
  • No labels