<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:swes="http://www.opengis.net/swes/2.0" xmlns:om="http://www.opengis.net/om/2.0" xmlns:sos="http://www.opengis.net/sos/2.0" targetNamespace="http://www.opengis.net/sos/2.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.1">
	<annotation>
		<documentation>			
			SOS is an OGC Standard.
			Copyright (c) 2012 Open Geospatial Consortium.
			To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
		</documentation>
	</annotation>
	<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import namespace="http://www.opengis.net/swes/2.0" schemaLocation="http://schemas.opengis.net/swes/2.0/swes.xsd"/>
	<import namespace="http://www.opengis.net/fes/2.0" schemaLocation="http://schemas.opengis.net/filter/2.0/filterAll.xsd"/>
	<import namespace="http://www.opengis.net/om/2.0" schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
	<include schemaLocation="sos.xsd"/>
	<!-- ================================================= -->
	<element name="GetObservation" type="sos:GetObservationType" substitutionGroup="swes:ExtensibleRequest">
		<annotation>
			<documentation>request to retrieve observation data</documentation>
		</annotation>
	</element>
	<complexType name="GetObservationType">
		<complexContent>
			<extension base="swes:ExtensibleRequestType">
				<sequence>
					<element name="procedure" type="anyURI" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<appinfo>
								<gml:targetElement>om:OM_Process</gml:targetElement>
							</appinfo>
							<documentation>pointer to a procedure for which observations are requested. It defines a filter for the procedure property of the observations</documentation>
						</annotation>
					</element>
					<element name="offering" type="anyURI" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<appinfo>
								<gml:targetElement>sos:ObservationOffering</gml:targetElement>
							</appinfo>
							<documentation>pointer to an ObservationOffering advertised in the Capabilities document for which observations are requested</documentation>
						</annotation>
					</element>
					<element name="observedProperty" type="anyURI" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>pointer to an observedProperty for which observations are requested</documentation>
						</annotation>
					</element>
					<element name="temporalFilter" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>specifies a filter for a time property of requested observations. The supported time range for the phenomenonTime property of observations is listed in the selected ObservationOffering. The supported temporal operands and operators are listed in the FilterCapabilities section of the Capabilities document.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="fes:temporalOps"/>
							</sequence>
						</complexType>
					</element>
					<element name="featureOfInterest" type="anyURI" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<appinfo>
								<gml:targetElement>gml:AbstractFeature</gml:targetElement>
							</appinfo>
							<documentation>pointer to a feature of interest for which observations are requested</documentation>
						</annotation>
					</element>
					<element name="spatialFilter" minOccurs="0">
						<annotation>
							<documentation>specifies a filter which applies to a spatial property of an observation. This property is defined in the valueReference element of the SpatialOperator.</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="fes:spatialOps"/>
							</sequence>
						</complexType>
					</element>
					<element name="responseFormat" type="anyURI" minOccurs="0">
						<annotation>
							<documentation>identifier of desired responseFormat for the requested observations. The supported responseFormats are listed in the ObservationOffering.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GetObservationPropertyType">
		<sequence minOccurs="0">
			<element ref="sos:GetObservation"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ================================================= -->
	<element name="GetObservationResponse" type="sos:GetObservationResponseType" substitutionGroup="swes:ExtensibleResponse">
		<annotation>
			<documentation>response with observation data matching the request criteria</documentation>
		</annotation>
	</element>
	<complexType name="GetObservationResponseType">
		<complexContent>
			<extension base="swes:ExtensibleResponseType">
				<sequence>
					<element name="observationData" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>observation which fulfills the GetObservation request</documentation>
						</annotation>
						<complexType>
							<sequence>
								<element ref="om:OM_Observation"/>
							</sequence>
						</complexType>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="GetObservationResponsePropertyType">
		<sequence minOccurs="0">
			<element ref="sos:GetObservationResponse"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
</schema>
