<?xml version="1.0" encoding="UTF-8"?>
<!-- 2008-09-17 Benoit GSCHWIND and Lucien WALD -->
<schema targetNamespace="http://www.soda-is.com/SolarResourceKnowledge"
	elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:tns="http://www.soda-is.com/SolarResourceKnowledge">
	<annotation>
		<documentation>
			Schema for describing and exploiting Solar Resource
			Knowledge. Units are expressed as string. Examples: kWh/m2,
			W/(m2.sr), W.m-2.sr-1, rad, degree.
		</documentation>
	</annotation>
	
    <complexType name="geopointType">
    	<annotation>
			<documentation>
				Latitude and longitude are expressed in decimal degrees.
				Elevation is in meters.
			</documentation>
		</annotation>
    	<sequence>
    		<element name="latitude" type="double" minOccurs="0" maxOccurs="1"></element>
    		<element name="longitude" type="double" minOccurs="0" maxOccurs="1"></element>
    		<element name="elevation" type="double" minOccurs="0" maxOccurs="1"></element>
    	</sequence>
    </complexType>

    <complexType name="IPRType">
    	<sequence>
    		<element name="providerName" type="string" minOccurs="0" maxOccurs="1"></element>
    		<element name="copyrightText" type="string" minOccurs="0" maxOccurs="1"></element>
    		<element name="providerURL" type="string" minOccurs="0" maxOccurs="1"></element>
    		<element name="providerLogoURL" type="string" minOccurs="0" maxOccurs="1"></element>
    	</sequence>
    </complexType>

    <complexType name="spectralRangeType">
    	<sequence>
    		<element name="begin" type="float" minOccurs="0" maxOccurs="1"></element>
    		<element name="end" type="float" minOccurs="0" maxOccurs="1"></element>
    		<element name="FWHM" type="float" minOccurs="0" maxOccurs="1"></element>
    		<element name="halfWidth" type="float" minOccurs="0" maxOccurs="1"></element>
    		<element name="unit" type="string" minOccurs="0" maxOccurs="1"></element>
    	</sequence>
    </complexType>

    <complexType name="tiltedPlaneType">
    	<sequence>
    		<element name="tilt" type="float" maxOccurs="1"></element>
    		<element name="azimut" type="float" maxOccurs="1"></element>
    		<element name="unitAngle" type="string" maxOccurs="1"></element>
    	</sequence>
    </complexType>
    
    <complexType name="singleObservationType">
    	<annotation>
			<documentation>
				Describes a single observation. Date is the end of the
				interval of observation, value is the count (measure),
				uncertainty denotes uncertainty and reliability denotes
				the confidence in the observation. Note that the
				interval of measurement is not defined there. For
				example, if the period is 1 h, dateTime equals to
				2008-25-01T18:43:26 means that the observation was made
				during this day from 17:43:27 to 18:43:26. If the
				interval of observation spans over several years, e.g.,
				10, for a given month, date will be equal to e.g.,
				2002-01 for the month of January, with measurements between 1993 and 2002.
			</documentation>
		</annotation>
		<sequence>
			<element name="date" type="dateTime" minOccurs="1" maxOccurs="1"/>
			<element name="value" type="float" minOccurs="1" maxOccurs="1"/>
			<element name="uncertainty" type="float" minOccurs="0" maxOccurs="1"/>
			<element name="reliability" type="float" minOccurs="0" maxOccurs="1"/>
		</sequence>
	</complexType>

    <complexType name="sequenceOfObservationType">
    		<annotation>
			<documentation>
				Describes a series of single observations. ObservationType can be found in a dictionnary, e.g. URL. Note that
				usually date denotes the end of the period of the
				measurement (duration). For example, if the period is 1
				h, dateTime equals to 2008-25-01T18:43:26 means that the
				observation was made during this day from 17:43:27 to
				18:43:26. It happens that several observers do not
				follow that rule and that the time may be, say the
				middle of the hour. The "offsetInstant" has been created
				to manage such case. It is expressed in percent. 100
				means that it is the end of the duration, 50 the middle,
				0 the beginning etc. Duration is defined as ISO8601
				duration, form: PnYnMnDTnHnMnS. Example: P1M is a one
				month duration, P10Y is a ten years duration.
			</documentation>
		</annotation>
    	<sequence>
    		<element name="IPR" type="tns:IPRType" minOccurs="0"
    			maxOccurs="1">
    		</element>
    		<element name="location" type="tns:geopointType"
    			minOccurs="1" maxOccurs="1">
    		</element>
    		<element name="sequence" type="tns:singleObservationType"
    			minOccurs="1" maxOccurs="unbounded">
    		</element>
    		<element name="timeSeriesTitle" type="string" minOccurs="1"
    			maxOccurs="1">
    		</element>
    		<element name="unitUncertainty" type="string" minOccurs="0"
    			maxOccurs="1">
    		</element>
    		<element name="duration" type="duration" minOccurs="1"
    			maxOccurs="1">
    		</element>
    		<element name="offsetInstant" type="float" minOccurs="0"
    			maxOccurs="1">
    		</element>
    		<element name="absenceOfValue" type="float" minOccurs="1"
    			maxOccurs="1">
    		</element>
    		<element name="unitOfMeasure" type="string" minOccurs="1"
    			maxOccurs="1">
    		</element>
    		<element name="observationType" type="string" minOccurs="1" maxOccurs="1"></element>
    	</sequence>
    </complexType>

    <complexType name="sequenceOfRadiationObservationType">
    	<complexContent>
    		<extension base="tns:sequenceOfObservationType">
    			<sequence>
    				<element name="spectralRange" type="tns:spectralRangeType" minOccurs="0" maxOccurs="1"></element>
    				<element name="tiltedPlane" type="tns:tiltedPlaneType" minOccurs="0" maxOccurs="1"></element>
    			</sequence>
    		</extension>
    	</complexContent>
    </complexType>
</schema>
