<?xml version="1.0" encoding="UTF-8"?>
<!-- Web OC only -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:fews="http://www.wldelft.nl/fews" targetNamespace="http://www.wldelft.nl/fews" elementFormDefault="qualified"
		version="1.0">
	<include schemaLocation="sharedTypes.xsd"/>
	<element name="webOCDashboards" type="fews:WebOCDashboardsComplexType">
		<annotation>
			<documentation>Web OC Dashboards configuration. Web OC Dashboards can be connected to the topology tree</documentation>
		</annotation>
	</element>
	<complexType name="WebOCDashboardsComplexType">
		<annotation>
			<documentation>Configure a dashboard for the Web OC</documentation>
		</annotation>
		<sequence>
			<element name="dashboard" type="fews:WebOCDashboardComplexType" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardComplexType">
		<annotation>
			<documentation>Configure a dashboard for the Web OC</documentation>
		</annotation>
		<sequence>
			<element name="id" type="fews:idStringType">
				<annotation>
					<documentation>Provide a unique identifier to the dashboard. This Id is used to reference the dashboard on a topology node.</documentation>
				</annotation>
			</element>
			<element name="name" type="string" minOccurs="0"/>
			<element name="cssTemplate" type="string">
				<annotation>
					<documentation>Define the CSS Template containing the dashboard layout configuration (e.g. dashboard_template.css). This css file must be present in the Config folder "WebResourceFiles/css/" and must be configured according to the CSS Grid Layout standard.  </documentation>
				</annotation>
			</element>
			<element name="groups" type="fews:WebOCDashboardGroupsComplexType">
				<annotation>
					<documentation>A Web OC dashboard contains groups. A group consist of one or multiple elements. In the first implementation of the Web OC Dashboard functionality the group element has no functional significance. Becauses we foresee functionality in the future - such as coupled interaction between group elements - the groups have been added to the schema.</documentation>
				</annotation>
			</element>
			<element name="viewPermission" type="string" minOccurs="0">
				<annotation>
					<documentation>set a permission to control who can view this Dashboard in the Web OC</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardGroupsComplexType">
		<sequence>
			<element name="group" type="fews:WebOCDashboardGroupComplexType" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardGroupComplexType">
		<sequence>
			<element name="elements" type="fews:WebOCDashboardElementsComplexType"/>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardElementsComplexType">
		<sequence>
			<element name="element" type="fews:WebOCDashboardElementComplexType" maxOccurs="unbounded">
				<annotation>
					<documentation>In a WebOC Dashboard an element contains the functional display definition. It consists of a gridTemplateArea (defines the placement of the element on the dashboard) and one or multiple item(s). Where the item contains the display configuration.</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardElementComplexType">
		<sequence>
			<element name="gridTemplateArea" type="string">
				<annotation>
					<documentation>The gridTemplateArea is defined in the cssTemplate, a gridTemplate area consist of one or more rows and columns. This defines the placement of the dashboard element on the screen </documentation>
				</annotation>
			</element>
			<element name="items" type="fews:WebOCDashboardItemsComplexType"/>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardItemsComplexType">
		<sequence>
			<element name="item" type="fews:WebOCDashboardItemComplexType" maxOccurs="unbounded">
				<annotation>
					<documentation>An item contains the display configuration of an element. It refers to a TopologyNodeId in combination with the component. In the current functionality only the first item of an element is used. As future functionality is foreseen, the schema already supports multiple items per element. </documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="WebOCDashboardItemComplexType">
		<sequence>
			<element name="topologyNodeId" type="fews:idStringType"/>
			<element name="component" type="fews:WebOCDashboardComponent">
				<annotation>
					<documentation>Define which Web OC Component from the referenced TopologyNodeId should be used in this dashboard item. This is required as a topologyNodeId can contain multiple Web OC Components and a dashboard item can only display one of the components. Possible Web OC component values are: map, schematic-status-display, charts, report, system-monitor, dynamic-report-display, log-display, data-download-display, runtask-display, embed-url </documentation>
				</annotation>
			</element>
			<element name="componentSettingsId" type="fews:idStringType" minOccurs="0">
				<annotation>
					<documentation>
						Refers to a collection of WebOCComponentSettings identified by its ID, as defined in the SystemConfigFiles/WebOCComponentSettings.xml. The componentSetting controls the behaviour of the WebOC Component (map, chart, report et cetera)
					</documentation>
				</annotation>
			</element>
			<element name="actionId" type="fews:idStringType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
						Configure the id of the action to be triggered when the user clicks on the dashboard item.
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<simpleType name="WebOCDashboardComponent">
		<annotation>
			<documentation>Define which Web OC Component from the referenced TopologyNodeId should be used in this dashboard item. This is required as a topologyNodeId can contain multiple Web OC Components and a dashboard item can only display one of the components. Possible Web OC component values are: map, schematic-status-display, charts, report, system-monitor, dynamic-report-display, log-display, data-download-display, runtask-display, embed-url </documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="map"/>
			<enumeration value="schematic-status-display"/>
			<enumeration value="charts"/>
			<enumeration value="report"/>
			<enumeration value="system-monitor"/>
			<enumeration value="dynamic-report-display"/>
			<enumeration value="log-display"/>
			<enumeration value="data-download-display"/>
			<enumeration value="runtask-display"/>
			<enumeration value="embed-url"/>
		</restriction>
	</simpleType>
</schema>
