<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:om="http://www.opengis.net/om/0.0" xmlns:gml="http://www.opengis.net/gml" xmlns:adx="http://www.seegrid.csiro.au/xml/adx/3" xmlns:swe="http://www.opengis.net/swe/1.0" xmlns:gmd="http://www.isotc211.org/2005/gmd" targetNamespace="http://www.seegrid.csiro.au/xml/adx/3" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0">
	<!-- ==================================================== -->
	<annotation>
		<documentation> Description of analyses 
		
2006-02-21

Copyright (c) 2006 CSIRO - see https://www.seegrid.csiro.au/twiki/bin/view/Xmml/LegalNotices#Software_Notice
</documentation>
	</annotation>
	<!-- ==================================================== -->
	<!-- ==================================================== -->
	<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
	<import namespace="http://www.opengis.net/om/0.0" schemaLocation="../../om/trunk/om.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="../../../../gml/trunk/gml/3.1.1/gmd/gmd.xsd"/>
	<import namespace="http://www.opengis.net/swe/1.0" schemaLocation="../../sweCommon/trunk/swe.xsd"/>
	<!-- ==================================================== -->
	<include schemaLocation="./adxBase.xsd"/>
	<!-- ==================================================== -->
	<!-- ==================================================== -->
	<complexType name="AssayType">
		<annotation>
			<documentation>Description of assay observation. Based on copying om:AbstractObservationType so we can omit some key fields.
</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:AbstractFeatureType">
				<sequence>
					<!-- from om:Event -->
					<element name="responsible" type="gmd:CI_ResponsibleParty_PropertyType" minOccurs="0">
						<annotation>
							<documentation>Person or organisation responsible for the event, if applicable. 
					The nature of the responsibility (i.e. the role of the party with respect to the event) may be indicated using the xlink:arcrole attribute. 
					Examples of roles are operator, sponsor, requestor, provider, processor, etc.</documentation>
						</annotation>
					</element>
					<!-- from om:AbstractObservationType -->
					<!-- NOTE omission of <element name="procedure" type="om:ObservationProcedurePropertyType"/> see 'run' below -->
					<element name="countParameter" type="swe:TypedCountType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="measureParameter" type="swe:TypedMeasureType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="termParameter" type="swe:TypedCategoryType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="observedProperty" type="swe:PhenomenonPropertyType" minOccurs="0"/>
					<element name="quality" type="gmd:DQ_DataQuality_PropertyType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>Allow multiple quality measures if required.</documentation>
						</annotation>
					</element>
					<!--
replaced by 'of' below
					<element name="featureOfInterest" type="gml:FeaturePropertyType">
						<annotation>
							<documentation>the Feature regarding which the observations are being made, 
			sometimes called the target or subject of the observation, such as a specimen, station, tract, mountain, pixel, etc.

			The spatial properties (location) of the feature of interest are typically of most interest for spatial analysis of the observation result. 

			If any of the properties are time dependent, then the values at the Observation/eventTime should appear.</documentation>
						</annotation>
					</element>
-->
					<!-- from om:MeasurementType -->
					<element name="result" type="swe:RelativeMeasureType" nillable="true"/>
					<!-- added for adx -->
					<element name="of">
						<complexType>
							<annotation>
								<documentation>Must refer to an instance of adx:ProcessingHistory which owns this Assay, the run's Assays being a measurement of that specimen.</documentation>
							</annotation>
							<attribute name="ref" type="IDREF" use="required"/>
						</complexType>
					</element>
					<element name="analyte" type="adx:AnalyteCode"/>
					<element name="nilReason" type="adx:NoAssayResultCode" minOccurs="0"/>
					<!-- 2006-03-08 ASD moved up to InstrumentRun as should use observedProperty instead if want to describe what the measurement is about and if repeating the InstrumentRun, will be many measurements with same purpose.
					<element name="purpose" type="adx:AssayPurposeCode" default="normal" minOccurs="0">
						<annotation>
							<documentation>The purpose of the measurement.</documentation>
						</annotation>
					</element>
					-->
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ......................... -->
	<element name="Assay" type="adx:AssayType"/>
	<!-- ...................... -->
	<complexType name="AssayPropertyType">
		<sequence minOccurs="0">
			<element ref="adx:Assay"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ==================================================== -->
	<!-- ==================================================== -->
	<simpleType name="NoAssayResultCode">
		<annotation>
			<documentation>Reason for no result being reported - based on Newmont Standard Laboratory EDF</documentation>
		</annotation>
		<union>
			<simpleType>
				<restriction base="string">
					<enumeration value="Delayed">
						<annotation>
							<documentation>result delayed</documentation>
						</annotation>
					</enumeration>
					<enumeration value="Insufficient material">
						<annotation>
							<documentation>Insufficient material provided</documentation>
						</annotation>
					</enumeration>
					<enumeration value="Invalid">
						<annotation>
							<documentation>Analysis performed but no valid result obtained</documentation>
						</annotation>
					</enumeration>
					<enumeration value="Not analysed">
						<annotation>
							<documentation>Not analysed</documentation>
						</annotation>
					</enumeration>
					<enumeration value="Specimen not received">
						<annotation>
							<documentation>Specimen listed but not received by provider</documentation>
						</annotation>
					</enumeration>
					<enumeration value="Specimen destroyed">
						<annotation>
							<documentation>Specimen destroyed preventing a result from this procedure being obtained.</documentation>
						</annotation>
					</enumeration>
				</restriction>
			</simpleType>
			<simpleType>
				<restriction base="string">
					<pattern value="other:\w{2,}">
						<annotation>
							<documentation>As specified by provider</documentation>
						</annotation>
					</pattern>
				</restriction>
			</simpleType>
		</union>
	</simpleType>
	<!-- ================================================================== -->
	<!-- ==================================================== -->
	<simpleType name="AssayPurposeCode">
		<annotation>
			<documentation>Purpose of this analysis</documentation>
		</annotation>
		<union>
			<simpleType>
				<restriction base="string">
					<enumeration value="calibration">
						<annotation>
							<documentation>Calibration value</documentation>
						</annotation>
					</enumeration>
					<enumeration value="normal">
						<annotation>
							<documentation>normal analysis</documentation>
						</annotation>
					</enumeration>
					<enumeration value="repeat">
						<annotation>
							<documentation>Quality control analysis - a second analysis on the same pulp using the same method in the same lab is available</documentation>
						</annotation>
					</enumeration>
					<enumeration value="check">
						<annotation>
							<documentation>Quality control analysis - another analysis on the same pulp using the same method in a different laboratory is available</documentation>
						</annotation>
					</enumeration>
				</restriction>
			</simpleType>
			<simpleType>
				<restriction base="string">
					<pattern value="other:\w{2,}">
						<annotation>
							<documentation>As specified by provider</documentation>
						</annotation>
					</pattern>
				</restriction>
			</simpleType>
		</union>
	</simpleType>
	<!-- ================================================================== -->
</schema>

