<?xml version="1.0" encoding="UTF-8"?>
<schema
	xmlns:gml="http://www.opengis.net/gml/3.2"
	xmlns:gmd="http://www.isotc211.org/2005/gmd"
	xmlns:om="http://www.opengis.net/om/2.0"
	xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:sam="http://www.opengis.net/sampling/2.0"
	targetNamespace="http://www.opengis.net/sampling/2.0"
	elementFormDefault="qualified"
	attributeFormDefault="unqualified"
	version="2.0.2">
	<annotation>
		<documentation> samplingFeature.xsd 
			
			Observations and Measurements - XML Implementation is an OGC Standard.
			
			Copyright (c) [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/3.2"
		schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<import
		namespace="http://www.isotc211.org/2005/gmd"
		schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
	<import
		namespace="http://www.opengis.net/om/2.0"
		schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
	<!-- ====================================================================== -->
	<!-- ====================================================================== -->
	<!-- Common properties of spatial sampling features -->
	<!-- ====================================================================== -->
	<group
		name="SF_CommonProperties">
		<sequence>
			<element
				name="type"
				type="gml:ReferenceType"
				minOccurs="0">
				<annotation>
					<documentation>If present, the sub-element 'type' shall indicate the class of
						spatial sampling feature. A register of type identifiers corresponding with
						the sampling feature types in ISO 19156 is provided by OGC at
						http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/ </documentation>
				</annotation>
			</element>
			<element
				name="sampledFeature"
				type="gml:FeaturePropertyType"
				maxOccurs="unbounded"
				nillable="true"
				block="#all">
				<annotation>
					<documentation> A sampling feature is established in order to make observations
						concerning some domain feature. The association Intention shall link the
						SF_SamplingFeature to the feature which the sampling feature was designed to
						sample. The target of this association has the role sampledFeature with
						respect to the sampling feature, and shall not be a sampling feature. It is
						usually a real-world feature from an application domain (Figures 5 and 10).
					</documentation>
				</annotation>
			</element>
			<element
				name="lineage"
				minOccurs="0"
				type="gmd:LI_Lineage_PropertyType">
				<annotation>
					<documentation> If present, the attribute lineage:LI_Lineage shall describe the
						history and provenance of the SF_SamplingFeature. This might include
						information relating to the handling of the specimen, or details of the
						survey procedure of a spatial sampling feature. </documentation>
				</annotation>
			</element>
			<element
				name="relatedObservation"
				type="om:OM_ObservationPropertyType"
				minOccurs="0"
				maxOccurs="unbounded">
				<annotation>
					<documentation> Sampling features are distinctive compared with other features
						from application domains by having navigable associations to observations.
						If present, the association Design shall link the SF_SamplingFeature to an
						OM_Observation that was made utilizing the sampling feature, and the
						description of the sampling feature provides an intrinsic element of the
						observation protocol, along with the observation procedure (6.2.2.10) and
						the decomposition of the domain geometry in the case of a coverage-valued
						result (7.3.1). The OM_Observation has the role relatedObservation with
						respect to the sampling feature. Multiple observations may be made on a
						single sampling feature. </documentation>
				</annotation>
			</element>
			<element
				name="relatedSamplingFeature"
				type="sam:SamplingFeatureComplexPropertyType"
				minOccurs="0"
				maxOccurs="unbounded">
				<annotation>
					<documentation> Sampling features are frequently related to each other, as parts
						of complexes, through sub-sampling, and in other ways. If present, the
						association class SamplingFeatureComplex (Figure 9) shall link a
						SF_SamplingFeature to another SF_SamplingFeature. </documentation>
				</annotation>
			</element>
			<element
				name="parameter"
				type="om:NamedValuePropertyType"
				minOccurs="0"
				maxOccurs="unbounded">
				<annotation>
					<documentation> If present, the attributes parameter:NamedValue shall describe
						an arbitrary parameter associated with the SF_SamplingFeature. This might be
						a parameter that qualifies the interaction with the sampled feature, or an
						environmental parameter associated with the sampling process.
					</documentation>
				</annotation>
			</element>
		</sequence>
	</group>
	<!-- ====================================================================== -->
	<!-- ===== Feature types in Site hierarchy ====== -->
	<!-- ====================================================================== -->
	<complexType
		name="SF_SamplingFeatureType">
		<annotation>
			<documentation>A "SamplingFeature" is a feature used primarily for taking
				observations.</documentation>
		</annotation>
		<complexContent>
			<extension
				base="gml:AbstractFeatureType">
				<sequence>
					<group
						ref="sam:SF_CommonProperties"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- .................. -->
	<element
		name="SF_SamplingFeature"
		type="sam:SF_SamplingFeatureType"
		abstract="true"
		substitutionGroup="gml:AbstractFeature"/>
	<!-- .................. -->
	<complexType
		name="SF_SamplingFeaturePropertyType">
		<sequence
			minOccurs="0">
			<element
				ref="sam:SF_SamplingFeature"/>
		</sequence>
		<attributeGroup
			ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ====================================================================== -->
	<complexType
		name="SamplingFeatureComplexType">
		<annotation>
			<documentation>A "SamplingFeatureRelation" is used to describe relationships between
				sampling features, including part-whole, siblings, etc.</documentation>
		</annotation>
		<sequence>
			<element
				name="role"
				type="gml:ReferenceType"/>
			<element
				name="relatedSamplingFeature"
				type="sam:SF_SamplingFeaturePropertyType"/>
		</sequence>
	</complexType>
	<!-- .................. -->
	<element
		name="SamplingFeatureComplex"
		type="sam:SamplingFeatureComplexType"/>
	<!-- .................. -->
	<complexType
		name="SamplingFeatureComplexPropertyType">
		<sequence>
			<element
				ref="sam:SamplingFeatureComplex"/>
		</sequence>
	</complexType>
	<!-- ====================================================================== -->
	<!-- ====================================================================== -->
	<!-- Collection -->
	<!-- ====================================================================== -->
	<complexType
		name="SF_SamplingFeatureCollectionType">
		<annotation>
			<documentation> The class SF_SamplingFeatureCollection (Figure 9) is an instance of the
				«metaclass» GF_FeatureType (ISO 19109:2005), which therefore represents a feature
				type. SF_SamplingFeatureCollection shall support one association. </documentation>
		</annotation>
		<complexContent>
			<extension
				base="gml:AbstractFeatureType">
				<sequence>
					<element
						name="member"
						type="sam:SF_SamplingFeaturePropertyType"
						maxOccurs="unbounded">
						<annotation>
							<documentation>The association Collection shall link a
								SF_SamplingFeatureCollection to member SF_SamplingFeatures.
							</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- .................. -->
	<element
		name="SF_SamplingFeatureCollection"
		type="sam:SF_SamplingFeatureCollectionType"
		substitutionGroup="gml:AbstractFeature"/>
	<!-- .................. -->
	<complexType
		name="SF_SamplingFeatureCollectionPropertyType">
		<sequence
			minOccurs="0">
			<element
				ref="sam:SF_SamplingFeatureCollection"/>
		</sequence>
		<attributeGroup
			ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ====================================================================== -->
	<!-- ===== Sampling feature process  ======= -->
	<!-- ====================================================================== -->
	<complexType
		name="SF_ProcessPropertyType">
		<annotation>
			<documentation> The purpose of a sampling feature process is to generate or transform a
				sampling feature. The model for SF_Process is abstract, and has no attributes,
				operations, or associations. Any suitable XML may be used to describe the sampling
				feature process in line, provided that it is contained in a single XML element. If
				reference to a schema is provided it must also be valid. </documentation>
		</annotation>
		<sequence
			minOccurs="0">
			<any
				namespace="##any"
				processContents="lax">
				<annotation>
					<documentation> Any suitable XML may be used to describe the sampling feature
						process in line, provided that it is contained in a single XML element. If
						refernece to a schema is provided it must also be valid. </documentation>
				</annotation>
			</any>
		</sequence>
		<attributeGroup
			ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ====================================================================== -->
	<!-- ====================================================================== -->
</schema>
