<?xml version="1.0" encoding="UTF-8"?>
<gml:FeatureCollection gml:id="feduni.example.specimen"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:sam="http://www.opengis.net/sampling/2.0"
xmlns:sams="http://www.opengis.net/samplingSpatial/2.0"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:swe="http://www.opengis.net/swe/2.0"
 xmlns:gmd="http://www.isotc211.org/2005/gmd"
 xmlns:gco="http://www.isotc211.org/2005/gco"
 xmlns:cv="http://www.opengis.net/cv/0.2/gml32"
 xmlns:om="http://www.opengis.net/om/2.0"
 xmlns:spec="http://www.opengis.net/samplingSpecimen/2.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.opengis.net/gwml/2.2 http://schemas.opengis.net/gwml/2.2/gwml2.xsd http://www.opengis.net/samplingSpecimen/2.0 http://schemas.opengis.net/samplingSpecimen/2.0/specimen.xsd">
	<!-- ######################### -->
	<!-- Mapping of Federation University (FedUni) Groundwater database tables and records to the proposed GroundWaterML2 OGC standard release candidate  version 2.2 -->
	<!-- Note that http://www.opengis.net/gwml/2.2 is required to ensure <om:value xsi:type="swe:QuantityPropertyType"> is valid -->
	<!-- File created by Bruce Simons, CSIRO, February 2016 -->
	<!-- ######################### -->
	<!-- This file is an example instance of a spec:SF_Specimen -->
	<!-- Although this instance is a gml:FeatureCollection with one or more gml:featureMembers, a valid alternative is as a single spec:SF_Specimen -->
	<!-- Other related GWML2 features are referred to "byReference" using xlink:href. In most cases these could be included "inLine" (i.e. within this instance). A separate instance for each feature is provided for ease of mapping. The final aggregation of inLine vs. byReference features will be determined by the use case requirements -->
	<!-- Where features are aggregated into single feature services the xlink:href references to URIs need to be replaced with internal # references to gml:id -->
	<!-- ######################### -->
	<!-- FedUni - Mapping patterns -->
	<!-- Comments beginning 'FedUni -' are instructions for mappings between FedUni data and GWML2 -->
	<!-- ???? Comments beginning ???? require further checking -->
	<!-- FedUni table record pairs are referred to by the pattern [table.record] -->
	<!-- The mapping pattern is [schema/property] = [table.record] -->
	<!-- ######################### -->
	<!-- FedUni - Feature IDs and identifiers -->
	<!-- Feature IDs (gml:id) are document specific unique identifiers based on FedUni table keys and the feature type -->
	<!-- To create the id, replace [table.record_id] with values from the appropriate table -->
	<!-- Feature identities (gml:identifier) use the URI for the feature. This is in the format "[domain name]/[category]/[type]/[gml:id]" -->
	<!-- Domain Name - The temporary domain name "http://www.groundwater-victoria.com.au" has been used for the feature identifiers and vocabulary term references. An appropriate persistent and organisation independent domain will need to be established.
A redirect service, such as the SISS PID service, is required to resolve these URIs -->
	<!-- Category - where the object is a GML Feature use "feature". Where the object is a vocabulary concept use "def". -->
	<!-- Type - where the Category is a feature, the type of feature, where Category is "def' the type of term (e.g. from "http://environment.data.gov.au/def/" it is "object", "unit", "property") -->
	<!-- ######################### -->
	<!-- FedUni Mapping -->
	<!-- This gml:featureMember is a spec:SF_Specimen -->
	<gml:featureMember>
		<!-- FedUni - if [chemistry_code.chemistry_category_id] = "4" then use gwml2c:GW_BiologicalConstituent. if [chemistry_code.chemistry_category_id] = "1", "2", "3", "5" or "9", use gwml2c:GW_ChemicalConstituent -->
		<!-- FedUni - if [chemistry_code.chemistry_category_id] = "6", "7" or "8" they are not constituent readings (not samplingFeatures). They will be delivered as relatedObservations instead of relatedSamplingFeatures. -->
		<!-- FedUni - spec:SF_Specimen gml:id = feduni.borehole.specimen.[bore.bore_ID].[hydrochemistry.hydrochemistry_id] -->
		<spec:SF_Specimen gml:id="feduni.borehole.specimen.51409.44574">
			<!-- FedUni - gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616"
value = http://groundwater.victoria.com.au/feature/specimen/feduni.borehole.specimen.[bore.bore_ID].[hydrochemistry.hydrochemistry_id] -->
			<gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616">http://groundwater.victoria.com.au/feature/specimen/feduni.borehole.specimen.51409.44574</gml:identifier>
			<!-- FedUni - gml:name = [hydrochemistry.sampno] codeSpace="http://www.groundwater-victoria.com.au/def/feduni/waterwell/sample-number" -->
			<gml:name codeSpace="http://www.groundwater-victoria.com.au/def/feduni/waterwell/sample-number">102728</gml:name>
			<!-- FedUni - The sam:sampledFeature is the GW_FluidBody.
							sam:sampledFeature xlink:href="http://www.ietf.org/rfc/rfc2616">http://groundwater.victoria.com.au/feature/fluid-body/feduni.borehole.fluid-body.[bore.bore_ID].[hydrochemistry.hydrochemistry_id]-->
			<sam:sampledFeature xlink:href="http://groundwater.victoria.com.au/feature/fluid-body/feduni.borehole.fluid-body.51409.44574"/>
			<!-- FedUni - [hydrochemistry.source] is a free text field that contains the source citation. Effort would be required to extract gmd:title, gmd:date, gmd:citedResponsibleParty etc. Instead I have suggested placing [hydrochemistry.source] in gmd:otherCitationDetails/gco:CharacterString -->
			<sam:lineage>
				<gmd:LI_Lineage>
					<gmd:source>
						<gmd:LI_Source>
							<gmd:sourceCitation>
								<gmd:CI_Citation>
									<gmd:title gco:nilReason="unknown"/>
									<gmd:date gco:nilReason="unknown"/>
									<gmd:otherCitationDetails>
										<gco:CharacterString>N. Lucas 1997</gco:CharacterString>
									</gmd:otherCitationDetails>
								</gmd:CI_Citation>
							</gmd:sourceCitation>
						</gmd:LI_Source>
					</gmd:source>
				</gmd:LI_Lineage>
			</sam:lineage>
			<!-- FedUni - the sam:relatedObservation within a sam:relatedSamplingFeature is the observation on the constituent (GW_ChemicalConstituent, GW_BiologicalConstituent or GW_MaterialConstituent) -->
			<!-- FedUni - These are shown as xlink:hef but could be included in-line and repeat sam:relatedObservation for all the same [sample_chemistry.hydrochemistry_id] values -->
			<!-- FedUni - This example refers to the "18Oxygen" OM_Observation -->
			<!-- sam:relatedObservation xlink:href="http://groundwater.victoria.com.au/feature/observation/feduni.borehole.[bore.bore_ID].[hydrochemistry.hydrochemistry_id].[sample_chemistry.sample_chemistry_id] -->
			<sam:relatedObservation xlink:href="http://groundwater.victoria.com.au/feature/observation/feduni.borehole.51409.44574.32317"/>
			<spec:materialClass/>
			<!-- FedUni - spec:samplingTime = [hydrochemistry.sampdate] -->
			<spec:samplingTime>
				<!-- FedUni - gml:TimeInstant/gml:id = feduni.borehole.specimen.time.[bore.bore_ID].[hydrochemistry.hydrochemistry_id] -->
				<gml:TimeInstant gml:id="feduni.borehole.specimen.time.51409.44574">
					<!-- FedUni - gml:timePosition =  [hydrochemistry.sampdate] -->
					<!-- FedUni - may need to convert [hydrochemistry.sampdate] to ISO format -->
					<gml:timePosition>1997-07-14T12:00:00</gml:timePosition>
				</gml:TimeInstant>
			</spec:samplingTime>
			<!-- FedUni - spec:samplingMethod xlink:title= [hydrochemistry.meth] -->
			<!-- FedUni - gmd:LI_Lineage could possibly be used to deliver [hydrochemistry.sampled_by] and [hydrochemistry.analysis] -->
			<spec:samplingMethod xlink:title="PUM"/>
		</spec:SF_Specimen>
	</gml:featureMember>
</gml:FeatureCollection>
