<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:adx="http://www.seegrid.csiro.au/xml/adx/3" targetNamespace="http://www.seegrid.csiro.au/xml/adx/3" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0">
	<!-- ==================================================== -->
	<!-- ==================================================== -->
	<annotation>
		<documentation>Top-level ADX objects:
    adx:Report
  
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.isotc211.org/2005/gmd" schemaLocation="../../../../gml/trunk/gml/3.1.1/gmd/gmd.xsd"/>
	<!-- ==================================================== -->
	<include schemaLocation="adxPrepProcedure.xsd"/>
	<include schemaLocation="assayProcedure.xsd"/>
	<!--	<include schemaLocation="adxSpecimen.xsd"/>  -->
	<include schemaLocation="adxProcessing.xsd"/>
	<include schemaLocation="adxProcessingLeaves.xsd"/>
	<include schemaLocation="assay.xsd"/>
	<!-- ==================================================== -->
	<complexType name="ReportType">
		<annotation>
			<documentation>
			basic ADX Report object
		comprising a list of
		(a) report/job metadata
		(b) definitions (including Procedures)
		(c) events (including ProcedureEvents)
		(d) processingHistories
		(e) measurements (including Assays)</documentation>
		</annotation>
		<complexContent>
			<extension base="gml:AbstractGMLType">
				<sequence>
					<!-- Report metadata -->
					<element name="reportStatus" type="adx:ReportStatusCode"/>
					<element name="reportDate" type="date"/>
					<element name="requestor" type="gmd:CI_ResponsibleParty_PropertyType"/>
					<element name="requestorsOrderID" type="string"/>
					<element name="orderSubmittalDate" type="date"/>
					<element name="provider" type="gmd:CI_ResponsibleParty_PropertyType"/>
					<element name="providersOrderID" type="string"/>
					<element name="orderReceiptDate" type="date"/>
					<element name="comment" type="string" minOccurs="0"/>
					<!-- Report data -->
					<element name="definition" type="gml:DictionaryEntryType" minOccurs="0" maxOccurs="unbounded"/>
<!-- ASD don't think we need as any unique events would be contained in unique protoHistory					<element name="event" type="adx:SpecimenEventPropertyType" minOccurs="0" maxOccurs="unbounded"/> -->
					<element name="history" type="adx:ProcessingHistoryPropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="measurement" type="adx:AssayPropertyType" minOccurs="0" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ........................................................................ -->
	<element name="Report" type="adx:ReportType"/>
	<!-- ==================================================== -->
<!-- ASD only needed if uncomment the event element in ReportType above
	<complexType name="SpecimenEventPropertyType">
		<annotation>
			<documentation>Contains instances of events possibly pointed to by other objects such as ProtoHistory</documentation>
		</annotation>
		<choice>
			<element ref="adx:SpecimenPreparationEvent"/>
			<element ref="adx:SampleReceiptEvent"/>
			<element ref="adx:PulpReuseEvent"/>
		</choice>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
-->

	<!-- ==================================================================   -->
	<simpleType name="ReportStatusCode">
		<annotation>
			<documentation>Codes indicating state of documents reporting sets of measurements - based on Newmont Standard Laboratory EDF</documentation>
		</annotation>
		<union>
			<simpleType>
				<restriction base="string">
					<enumeration value="PARTIAL">
						<annotation>
							<documentation>Not all results are provided.  Delayed results are indicated.</documentation>
						</annotation>
					</enumeration>
					<enumeration value="COMPLETE">
						<annotation>
							<documentation>All results are provided, but not certified.</documentation>
						</annotation>
					</enumeration>
					<enumeration value="CERTIFIED">
						<annotation>
							<documentation>All results have been finalised by the provider.</documentation>
						</annotation>
					</enumeration>
					<enumeration value="OVER LIMITS">
						<annotation>
							<documentation>Document covers measurements whose results were earlier reported as "greater than".</documentation>
						</annotation>
					</enumeration>
					<enumeration value="RERUNS">
						<annotation>
							<documentation>Document reports additional measurements on specimens for which results were reported previously.</documentation>
						</annotation>
					</enumeration>
				</restriction>
			</simpleType>
			<simpleType>
				<restriction base="string">
					<pattern value="other:\w{2,}">
						<annotation>
							<documentation>Other reports such as QC data etc.</documentation>
						</annotation>
					</pattern>
				</restriction>
			</simpleType>
		</union>
	</simpleType>
	<!-- ==================================================================   -->
</schema>

