<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:swe="http://www.opengis.net/swe/1.0" targetNamespace="http://www.opengis.net/swe/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0.2">
  <!-- This version of sweCommon/1.0.0 was previously versioned as '1.0.1' . -->
	<annotation>
		<documentation>
temporalAggregates.xsd

time geometric complex, time aggregates and time grids

Copyright (c) 2007,2010 Open Geospatial Consortium.
To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
		</documentation>
	</annotation>
	<!-- ====================================================================== -->
	<!-- bring in other schemas -->
	<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
	<include schemaLocation="./swe.xsd"/>
	<!-- ================================================================== -->
	<!-- =========================================================== -->
	<!-- ============================================================== -->
	<simpleType name="TimeValueList">
	<annotation><documentation>Compact list of time instants, following gml:posList pattern. </documentation></annotation>
		<list itemType="gml:TimePositionUnion"/>
	</simpleType>
	<!-- ====================================================================== -->
	<complexType name="TimePositionListType">
		<annotation>
			<documentation>TimePositionList instances hold a sequence of time positions within the same frame.</documentation>
		</annotation>
		<simpleContent>
			<extension base="swe:TimeValueList">
				<attribute name="frame" type="anyURI" use="optional" default="#ISO-8601"/>
				<attribute name="calendarEraName" type="string" use="optional"/>
				<attribute name="indeterminatePosition" type="gml:TimeIndeterminateValueType" use="optional"/>
				<attribute name="count" type="positiveInteger" use="optional">
					<annotation>
						<documentation>"count" allows to specify the number of direct positions in the list. </documentation>
					</annotation>
				</attribute>
			</extension>
		</simpleContent>
	</complexType>
	<!-- ============================================================== -->
	<!-- ===== Missing property types ====== -->
	<!-- ================================================================== -->
	<complexType name="TimeGeometricPrimitivePropertyType">
	<annotation><documentation>Property type not provided by GML</documentation></annotation>
		<sequence minOccurs="0">
			<element ref="gml:_TimeGeometricPrimitive"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ================================================================== -->
	<!-- ===== Time geometric complexes ====== -->
	<!-- ================================================================== -->
	<complexType name="TimeGeometricComplexType">
	<annotation><documentation>Explicit implementation of ISO 19108 TM_GeometricComplex - a self-consistent set of TimeInstants and TimePeriods</documentation></annotation>
		<complexContent>
			<extension base="gml:AbstractTimeComplexType">
					<sequence>
							<element name="primitive" type="swe:TimeGeometricPrimitivePropertyType" maxOccurs="unbounded">
								<annotation>
									<documentation>Reference to an identified time primitive</documentation>
								</annotation>
							</element>
					</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ......................... -->
	<element name="TimeGeometricComplex" type="swe:TimeGeometricComplexType" substitutionGroup="gml:_TimeComplex">
	<annotation><documentation>Explicit implementation of ISO 19108 TM_GeometricComplex - a self-consistent set of TimeInstants and TimePeriods</documentation></annotation>
	</element>
	<!-- ......................... -->
	<complexType name="TimeGeometricComplexPropertyType">
		<sequence minOccurs="0">
			<element ref="swe:TimeGeometricComplex"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ===================================== -->
	<!-- ===== Time aggregates ====== -->
	<!-- ================================================================== -->
	<!-- ===== Explicit time aggregates ====== -->
	<!-- ================================================================== -->
	<complexType name="TimeObjectPropertyType">
	<annotation><documentation>Property type not provided by GML</documentation></annotation>
		<sequence minOccurs="0">
			<element ref="gml:_TimeObject"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ================================================================== -->
	<complexType name="TimeAggregateType">
		<annotation>
			<documentation>an arbitrary set of TimeObjects, often TimeInstants and TimePeriods</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:AbstractTimeObjectType">
				<sequence>
					<element name="member" type="swe:TimeObjectPropertyType" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ......................... -->
	<element name="TimeAggregate" type="swe:TimeAggregateType" substitutionGroup="gml:_TimeObject">
		<annotation>
			<documentation>an arbitrary set of TimeObjects, often TimeInstants and TimePeriods</documentation>
		</annotation>
	</element>
	<!-- ......................... -->
	<complexType name="TimeAggregatePropertyType">
		<sequence minOccurs="0">
			<element ref="swe:TimeAggregate"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ===================================== -->
	<!-- ===== Implicit time aggregates ====== -->
	<!-- ================================================================== -->
	<complexType name="TimeGridType">
		<annotation>
			<documentation>A set of uniformly spaced time instants described using an implicit notation.
      Follow pattern of (ISO 19123) spatial grids: 
  these have (dimension,axisName,extent(,origin,offsetVector))
  For temporal case, dimension is fixed (1), axisName is fixed ("time")</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:AbstractTimeComplexType">
				<sequence>
					<element name="extent" type="swe:TimeGridEnvelopePropertyType"/>
					<choice>
						<element name="originPos" type="gml:TimePositionType">
							<annotation>
								<documentation>Simple-content time position</documentation>
							</annotation>
						</element>
						<element name="origin" type="gml:TimeInstantPropertyType">
							<annotation>
								<documentation>Reference to an identified time instant</documentation>
							</annotation>
						</element>
					</choice>
					<choice>
						<element name="offsetDuration" type="duration">
							<annotation>
								<documentation>XML Schema built-in simple type for duration: e.g. 
                P1Y (1 year) 
                P1M (1 month) 
                P1DT12H (1 day 12 hours) 
                PT5M (5 minutes) 
                PT0.007S (7 milliseconds)</documentation>
							</annotation>
						</element>
						<element name="offsetInterval" type="gml:TimeIntervalLengthType">
							<annotation>
								<documentation>representation of the ISO 11404 model of a time interval length: e.g. 
                value=1, unit="year"  
                value=1, unit="other:month" (or see next)
                value=1, unit="year" radix="12" factor="1" (1/12 year)
                value=1.5, unit="day"  
                value=36, unit="hour" 
                value=5, unit="minute"  
                value=7, unit="second" radix="10" factor="3" (7 milliseconds)</documentation>
							</annotation>
						</element>
					</choice>
					<element name="duration" type="duration" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ......................... -->
	<element name="TimeGrid" type="swe:TimeGridType" abstract="true" substitutionGroup="gml:_TimeComplex">
		<annotation>
			<documentation>A set of uniformly spaced time instants described using an implicit notation
			      Follow pattern of (ISO 19123) spatial grids: 
  these have (dimension,axisName,extent(,origin,offsetVector))
  For temporal case, dimension is fixed (1), axisName is fixed ("time")</documentation>
		</annotation>
	</element>
	<!-- ......................... -->
	<complexType name="TimeGridPropertyType">
		<sequence minOccurs="0">
			<element ref="swe:TimeInstantGrid"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- =========================================================== -->
	<complexType name="TimeGridEnvelopePropertyType">
		<sequence>
			<element name="TimeGridEnvelope">
				<annotation>
					<documentation>Grid extent specified in grid coordinates - i.e. 2 integers</documentation>
				</annotation>
				<complexType>
					<sequence>
						<element name="low" type="integer"/>
						<element name="high" type="integer"/>
					</sequence>
				</complexType>
			</element>
		</sequence>
	</complexType>
	<!-- ================================================================== -->
	<complexType name="TimeInstantGridType">
		<annotation>
			<documentation>Extend time instant grid with window size property</documentation>
		</annotation>
		<complexContent>
			<extension base="swe:TimeGridType">
			</extension>
		</complexContent>
	</complexType>
	<!-- ......................... -->
	<element name="TimeInstantGrid" type="swe:TimeInstantGridType" substitutionGroup="swe:TimeGrid">
		<annotation>
			<documentation>A set of uniformly spaced time instants described using an implicit notation</documentation>
		</annotation>
	</element>
	<!-- ......................... -->
	<complexType name="TimeInstantGridPropertyType">
		<sequence minOccurs="0">
			<element ref="swe:TimeInstantGrid"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ================================================================== -->
	<complexType name="TimeIntervalGridType">
		<annotation>
			<documentation>Extend time instant grid with window size property</documentation>
		</annotation>
		<complexContent>
			<extension base="swe:TimeGridType">
				<sequence>
					<choice>
						<element name="windowDuration" type="duration">
							<annotation>
								<documentation>XML Schema built-in simple type for duration</documentation>
							</annotation>
						</element>
						<element name="windowInterval" type="gml:TimeIntervalLengthType">
							<annotation>
								<documentation>representation of the ISO 11404 model of a time interval length</documentation>
							</annotation>
						</element>
					</choice>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ......................... -->
	<element name="TimeIntervalGrid" type="swe:TimeIntervalGridType" substitutionGroup="swe:TimeGrid">
		<annotation>
			<documentation>A set of uniformly spaced time intervals described using an implicit notation</documentation>
		</annotation>
	</element>
	<!-- ......................... -->
	<complexType name="TimeIntervalGridPropertyType">
		<sequence minOccurs="0">
			<element ref="swe:TimeIntervalGrid"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ================================================================== -->
</schema>
