<?xml version="1.0" encoding="UTF-8"?>
<!--  Delft FEWS Published Interface (Copyright 2003 WL | Delft Hydraulics) -->
<schema targetNamespace="http://www.wldelft.nl/fews/PI" xmlns:fews="http://www.wldelft.nl/fews/PI" xmlns="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<include schemaLocation="pi_sharedtypes.xsd"/>
	<element name="Run" type="fews:RunComplexType">
		<annotation>
			<documentation>Since 2008.03. General information about the run executed by the general adapter that is used by the pre and post adapter
			This file generated on the fly during a pi run file export activity from the General Adapter. This file is read only for the pre and post adapters.
			A pre or post adapter that supports pi run files only needs this pi run file at the command line argument to find all the pi files it needs to read and write.
			Other options can be passed to the pre or post adapter by adding extra properties to the generated pi run file during export.
			</documentation>
		</annotation>
	</element>
	<complexType name="RunComplexType">
		<sequence>
			<element name="logLevel" type="fews:logLevelString" minOccurs="0">
				<annotation>
					<documentation>since 1.8, Log level compatible with log4j.
					</documentation>
				</annotation>
			</element>
			<group ref="fews:TimeZoneChoice">
				<annotation>
					<documentation>Time zone used in the exported pi files. This is also the default time zone used by the general adapter</documentation>
				</annotation>
			</group>
			<element name="startDateTime" type="fews:DateTimeComplexType">
				<annotation>
					<documentation>Start of the run. The time of the of the state exported by the General Adapter. When there is no state exported the earliest time in any time series exported by the General Adapter will be used</documentation>
				</annotation>
			</element>
			<element name="endDateTime" type="fews:DateTimeComplexType">
				<annotation>
					<documentation>End of the run. The latest time exported by the General Adapter
						</documentation>
				</annotation>
			</element>
			<element name="time0" type="fews:DateTimeComplexType">
				<annotation>
					<documentation>This is the start of a forecast for a forecast run
						This is the time 0 of a FEWS task run.
					</documentation>
				</annotation>
			</element>
			<element name="lastObservationDateTime" type="fews:DateTimeComplexType" minOccurs="0">
				<annotation>
					<documentation>
						Last time of non missing observation based on observed time series sets configured in the General Adapter.
					</documentation>
				</annotation>
			</element>
			<element name="workDir" type="string">
				<annotation>
					<documentation>Fully qualified path to the current working directory.
						This is also the startup directory of an non java executable launched by the general adapter.</documentation>
				</annotation>
			</element>
			<element name="inputParameterFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to the pi parameter file exported by the
						General Adapter before the run.
						An active modifier is already applied to this file
					</documentation>
				</annotation>
			</element>
			<element name="inputLocationAttributeCsvFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to the location attributes CSV file exported by the
						General Adapter before the run.
					</documentation>
				</annotation>
			</element>
			<element name="inputStateDescriptionFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to the pi state file that describes the state exported by the General Adapter before the run.
						In this file you can also find the state time and the paths to the actual state files</documentation>
				</annotation>
			</element>
			<element name="inputTimeSeriesFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi time series file exported by the General Adapter before the run</documentation>
				</annotation>
			</element>
			<element name="inputMapStackFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a map stack file exported by the General Adapter before the run.
						A map stack is a list of raster files for each time step.
					</documentation>
				</annotation>
			</element>
			<element name="inputNetcdfFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi netcdf file exported by the General Adapter before the run
					</documentation>
				</annotation>
			</element>
			<element name="inputLongitudinalProfilesFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi longitudinal profiles file exported by the General before the run</documentation>
				</annotation>
			</element>
			<element name="inputPiTablesFile" type="string" minOccurs="0" maxOccurs="unbounded">
					<annotation>
						<documentation>Since 2016.01 Fully qualified path to a pi_tables file exported by the General Adapter before the model run</documentation>
					</annotation>
			</element>
			<element name="inputRatingCurveFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi_ratingcurves file exported by the General Adapter before the model run</documentation>
				</annotation>
			</element>
			<element name="outputDiagnosticFile" type="string">
				<annotation>
					<documentation>Fully qualified path to a pi diagnostic file that that will be imported by the General
						Adapter after the run	. It is deleted by the general adapter before the run.
					</documentation>
				</annotation>
			</element>
			<element name="outputStateDescriptionFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to the pi state file that describes the state that will be imported by the General Adapter
						adapter after the run
					</documentation>
				</annotation>
			</element>
			<element name="outputTimeSeriesFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi time series file that will be imported by the General Adapter after the run
					</documentation>
				</annotation>
			</element>
			<element name="outputMapStackFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi map stack file that will be imported by the General
						Adapter after the run. A map stack is a list of raster files for each time step.
					</documentation>
				</annotation>
			</element>
			<element name="outputNetcdfFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi netcdf file that will be imported by the General
						Adapter after the run
					</documentation>
				</annotation>
			</element>
			<element name="outputLongitudinalProfilesFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Fully qualified path to a pi longitudinal profiles file that will be imported by the GeneralAdapter after the run</documentation>
				</annotation>
			</element>
			<element name="outputCsvModuleRunTableFile" type="string" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Since 2015.01. Fully qualified path to a csv module run table file that will be imported by the General Adapter after the run</documentation>
				</annotation>
			</element>
			<element name="properties" type="fews:PropertiesComplexType" minOccurs="0">
				<annotation>
					<documentation>Kind of an extra command line argument for the pre and post adapter. This is also a
						convenient way way to pass global properties to a pre or post adapter. An adapter is not allowed to access the
						FEWS global.properties directly.
						These extra options makes an additional pre or post adapter configuration file unnecessary.
						See the documentation of the used pre and post adapter for the supported property keys with their allowed values
					</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="version" type="fews:versionString" use="required"/>
	</complexType>
	<simpleType name="logLevelString">
		<restriction base="string">
			<enumeration value="fatal">
				<annotation>
					<documentation>
						level designates very severe error events that will presumably lead the application to abort.
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="error">
				<annotation>
					<documentation>
						level designates error events that	 might still allow the application to continue running
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="warn">
				<annotation>
					<documentation>
						level designates potentially harmful situations
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="info">
				<annotation>
					<documentation>
						level designates informational messages that highlight the progress of the application at coarse-grained
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="debug">
				<annotation>
					<documentation>
						level designates informational messages that highlight the progress of the application at coarse-grained
					</documentation>
				</annotation>
			</enumeration>
			<enumeration value="trace">
				<annotation>
					<documentation>
						Level designates finer-grained informational events than the debug
					</documentation>
				</annotation>
			</enumeration>
		</restriction>
	</simpleType>
</schema>
