<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:fews="http://www.wldelft.nl/fews" targetNamespace="http://www.wldelft.nl/fews" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<include schemaLocation="sharedTypes.xsd"/>
	<!-- -->
	<element name="commonAdapter" type="fews:CommonAdapterComplexType">
		<annotation>
			<documentation>LEGACY, NO LONGER USED</documentation>
		</annotation>
	</element>
	<!-- -->
	<complexType name="CommonAdapterComplexType">
		<sequence>
			<element name="general" type="fews:CommonAdapterGeneralComplexType"/>
			<element name="activities" type="fews:CommonAdapterActivitiesComplexType"/>
		</sequence>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterActivitiesComplexType">
		<sequence>
			<element name="preAdapterActivities" type="fews:CommonAdapterActivityComplexType" minOccurs="0" maxOccurs="unbounded"/>
			<element name="postAdapterActivities" type="fews:CommonAdapterActivityComplexType" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterGeneralComplexType">
		<sequence>
			<element name="workDir" type="fews:directoryStringType">
				<annotation>
					<documentation>Working directory for the common adapter.</documentation>
				</annotation>
			</element>
			<element name="importDir" type="fews:directoryStringType">
				<annotation>
					<documentation>Location to retrieve input files</documentation>
				</annotation>
			</element>
			<element name="exportDir" type="fews:directoryStringType">
				<annotation>
					<documentation>Location to write output files</documentation>
				</annotation>
			</element>
			<element name="stateDir" type="fews:fileStringType" minOccurs="0">
				<annotation>
					<documentation>State File directory</documentation>
				</annotation>
			</element>
			<element name="diagnosticFile" type="fews:fileStringType" minOccurs="0">
				<annotation>
					<documentation>Diagnostics file</documentation>
				</annotation>
			</element>
			<element name="missingValue" type="float">
				<annotation>
					<documentation>Missing value for adapter files.</documentation>
				</annotation>
			</element>
			<element name="columnSeperator" type="fews:CommonAdapterColumnSeperatorStringEnumType" default="tab" minOccurs="0"/>
			<element name="timeZone" type="fews:TimeZoneComplexType" minOccurs="0">
				<annotation>
					<documentation>Import data is converted from this timezone to GMT.
Export data is converted from GMT to this timezone.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterActivityComplexType">
		<sequence>
			<element name="dateFormat" type="string">
				<annotation>
					<documentation>Contains date format for date column.</documentation>
				</annotation>
			</element>
			<element name="input" type="fews:fileStringType" maxOccurs="unbounded">
				<annotation>
					<documentation>Time series files containing input data.</documentation>
				</annotation>
			</element>
			<element name="output" type="fews:fileStringType" maxOccurs="unbounded">
				<annotation>
					<documentation>Time series files containing output data.</documentation>
				</annotation>
			</element>
			<choice>
				<element name="profile" type="fews:CommonAdapterProfileActivityComplexType"/>
				<element name="timeSeries" type="fews:CommonAdapterTimeSeriesActivityComplexType"/>
			</choice>
			<element name="timeStep" type="fews:TimeStepComplexType" minOccurs="0">
				<annotation>
					<documentation>time step used only for postAdapterActivities</documentation>
				</annotation>
			</element>
			<element name="moduleLogFile" type="fews:fileStringType" minOccurs="0">
				<annotation>
					<documentation>Module Log file to include in diagnostics</documentation>
				</annotation>
			</element>
			<element name="stateFile" type="fews:fileStringType" minOccurs="0">
				<annotation>
					<documentation>State file where the time is to be updated ..</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterTimeSeriesActivityComplexType">
		<sequence>
			<element name="mapping" type="fews:CommonAdapterMappingComplexType" maxOccurs="unbounded">
				<annotation>
					<documentation>Contains information on the data that is present in the columns of either the input files (post-activity) or output files (pre-activity)</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterProfileActivityComplexType">
		<sequence>
			<element name="points" type="fews:CommonAdapterPointMappingComplexType" maxOccurs="unbounded">
				<annotation>
					<documentation>Contains information on the data that is present in the columns of either the input files (post-activity) or output files (pre-activity)</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="parameterId" type="fews:idStringType" use="required"/>
		<attribute name="locationId" type="fews:idStringType" use="required"/>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterPointMappingComplexType">
		<attribute name="id" type="fews:idStringType" use="required"/>
		<attribute name="column" type="int" use="required"/>
	</complexType>
	<!-- -->
	<complexType name="CommonAdapterMappingComplexType">
		<attribute name="parameterId" type="fews:idStringType" use="required"/>
		<attribute name="locationId" type="fews:idStringType" use="required"/>
		<attribute name="column" type="int" use="required"/>
	</complexType>
	<simpleType name="CommonAdapterColumnSeperatorStringEnumType">
		<restriction base="string">
			<enumeration value="space"/>
			<enumeration value="tab"/>
		</restriction>
	</simpleType>
</schema>
