<?xml version="1.0" encoding="UTF-8"?>
<gml:FeatureCollection gml:id="feduni.example.fluid-body"
xmlns:gwml2w="http://www.opengis.net/gwml-well/2.2"
xmlns:gwml2="http://www.opengis.net/gwml-main/2.2"
xmlns:gwml2f="http://www.opengis.net/gwml-flow/2.2"
xmlns:gwml2wc="http://www.opengis.net/gwml-wellconstruction/2.2"
xmlns:gwml2c="http://www.opengis.net/gwml-constituent/2.2"
 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">
	<!-- Although all the GWML2 schema may not be required, this instance imports all GWML2 packages via gwml2.xsd for consistence between instance examples  -->
	<!-- ######################### -->
	<!-- Mapping of Federation University (FedUni) Groundwater database tables and records to the proposed GroundWaterML2 OGC standard release candidate  version 2.2 -->
	<!-- File created by Bruce Simons, CSIRO, February 2016 -->
	<!-- ######################### -->
	<!-- Although this instance is a gml:FeatureCollection with one or more gml:featureMembers, a valid alternative is as a single gwml2:GW_FluidBody -->
	<!-- 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 gwml2:GW_FluidBody based on [hydrochemistry] table -->
	<gml:featureMember>
		<!-- ???? FedUni - I'm not sure if the GW_FluidBody represents one set of hydrochemistry results, in which case:
gwml2:GW_FluidBody gml:id = feduni.borehole.fluid-body.[bore.bore_ID].[hydrochemistry.hydrochemistry_id]
Or one set of bore results, in which case:
gwml2:GW_FluidBody gml:id = feduni.borehole.fluid-body.[bore.bore_ID]
I've used the set of hydrochemistry results in the mapping IDs
-->
		<!-- FedUni - gwml2:GW_FluidBody gml:id = feduni.borehole.fluid-body.[bore.bore_ID].[hydrochemistry.hydrochemistry_id].
Use gww:gwWellBody to describe the fluid properties and sam:relatedSamplingFeature and om:relatedObservation to describe its properties  -->
		<gwml2:GW_FluidBody gml:id="feduni.borehole.fluid-body.51409.44574">
			<!-- FedUni - gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616">http://groundwater.victoria.com.au/feature/fluid-body/feduni.borehole.fluid-body.[bore.bore_ID].[hydrochemistry.hydrochemistry_id]. 			-->
			<gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616">http://groundwater.victoria.com.au/feature/fluid-body/feduni.borehole.fluid-body.51409.44574</gml:identifier>
			<!-- FedUni - gml:name = [hydrochemistry.sampno] codeSpace="http://www.groundwater-victoria.com.au/def/feduni/waterwell/fluid-body" -->
			<gml:name codeSpace="http://www.groundwater-victoria.com.au/def/feduni/waterwell/fluid-body">102728</gml:name>
			<!-- FedUni - most of the properties of the GW_FluidBody are not available from FedUni -->
			<!-- FedUni - Empty elements are:
					<gwml2:gwBodyFlow/>
					<gwml2:gwBodyMetadata/>
					<gwml2:gwBodyProperty/>
					<gwml2:gwBodyQuality/>
					<gwml2:gwBodyShape/>
					<gwml2:gwBodyVolume/>
					<gwml2:gwBodyVulnerability/>
					<gwml2:gwFluidBodyUnit/>
					<gwml2:gwFluidBodyVoid/>
					<gwml2:gwBodyPartOf/>
					<gwml2:gwBodySurface/> -->
			<gwml2:gwBodyFlow />
			<gwml2:gwBodyMetadata/>
			<gwml2:gwBodyProperty/>
			<gwml2:gwBodyProperty></gwml2:gwBodyProperty>
			<gwml2:gwBodyQuality/>
			<gwml2:gwBodyShape/>
			<gwml2:gwBodyVolume></gwml2:gwBodyVolume>
			<gwml2:gwBodyVulnerability/>
			<!-- FedUni - gwml2:gwFluidBodyUnit is the Aquifer the GW_FluidBody occurs within.   -->
			<gwml2:gwFluidBodyUnit/>
			<gwml2:gwFluidBodyVoid/>
			<gwml2:gwBodyPartOf/>
			<gwml2:gwBodySurface>
			<gwml2:GW_BodySurface gml:id="WMS-fluidbody-1">
			<gwml2:gwSurfaceShape xlink:href="wms response"></gwml2:gwSurfaceShape>
			<gwml2:gwSurfaceType>d</gwml2:gwSurfaceType>
			</gwml2:GW_BodySurface>
			</gwml2:gwBodySurface>
			<!-- gwBodyConstituent describes the individual 'groups' of constituent (biological, chemical or material) mixtures (e.g. those in solution as one gwBodyConstituent, those in suspension another, etc).  -->
			<gwml2:gwBodyConstituent>
				<!-- gwml2:GW_Mixture is the mix of constituents and their relationships that make up the GW_FluidBody -->
				<!-- FedUni - gwml2:GW_Mixture gml:id = feduni.borehole.mixture.[bore.bore_ID].[hydrochemistry.hydrochemistry_id] -->
				<gwml2:GW_Mixture gml:id="feduni.borehole.mixture.51409.44574">
					<!-- ???? CodeList enumerations are incorrectly encoded in the schema. A temporary work around is to use xlink:title -->
					<!-- FedUni - gwml2:gwMixture xlink:title="solution" -->
					<gwml2:gwMixture>solution</gwml2:gwMixture>
					<!-- FedUni - gwBodyConstituent/gwml2:GW_Mixture/gwml2:gwBodyConstituent = xlink:href to GW_Constituents from [bore.bore_ID].[hydrochemistry.hydrochemistry_id].[chemistry_code.chemistry_code_id] -->
					<!-- byReference -->
					<gwml2:gwBodyConstituent xlink:href="http://groundwater.victoria.com.au/feature/constituent/feduni.borehole.constituent.51409.44574.121"/>
					<gwml2:gwBodyConstituent xlink:href="http://groundwater.victoria.com.au/feature/constituent/feduni.borehole.constituent.51409.44574.130"/>
				</gwml2:GW_Mixture>
			</gwml2:gwBodyConstituent>
			<gwml2:gwBackgroundConstituent>
				<!-- FedUni - Second featureMember is a gwml2c:GW_BiologicConstituent -->
				<!-- FedUni - GW_BiologicConstituent gml:id="feduni.borehole.constituent.[bore.bore_ID].[hydrochemistry.hydrochemistry_id].[chemistry_code.chemistry_code_id] -->
				<gwml2c:GW_BiologicConstituent gml:id="feduni.borehole.constituent.51409.44574.130">
					<!-- FedUni - gml:description = [chemistry_code.description] -->
					<gml:description>E.coli</gml:description>
					<!-- FedUni - gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616">http://groundwater.victoria.com.au/feature/constituent/feduni.borehole.constituent.[bore.bore_ID].[hydrochemistry.hydrochemistry_id].[chemistry_code.chemistry_code_id] 	-->
					<gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616">http://groundwater.victoria.com.au/feature/constituent/feduni.borehole.constituent.51409.44574.130</gml:identifier>
					<!-- FedUni - gml:name = [chemistry_code.chemistry_code_id] codeSpace="http://www.groundwater-victoria.com.au/def/feduni/waterwell/constituent" -->
					<gml:name codeSpace="http://www.groundwater-victoria.com.au/def/feduni/waterwell/constituent">130</gml:name>
					<!-- FedUni - gml:name = [chemistry_code.name] -->
					<gml:name codeSpace="http://groundwater.feduni.edu/waterwell/chemical-name">Escherichia coli</gml:name>
					<!-- wml2c:gwState is "gas", "liquid" or "solid" -->
					<!-- #### Currently encoded incorrectly so use xlink:title as a work around -->
					<gwml2c:gwState>solid</gwml2c:gwState>
					<!-- gwml2c:gwConstituent and gwml2c:gwConstituedOf allow describing the relationship between constituents making up the mixture -->
					<!-- FedUni - does not have constituent relationship information -->
					<gwml2c:gwConstituent/>
					<gwml2c:gwConstituedOf/>
					<!-- FedUni - gwml2c:gwOrganism xlink:href and xlink:title will need to be mapped to the op:objectOfInterest related to the constituent being measured -->
					<!-- FedUni mapping:
Total Coliforms = xlink:href="http://environment.data.gov.au/def/object/coliform" xlink:title="coliform"
Faecal Coliforms = xlink:href="http://environment.data.gov.au/def/object/faecal_coliform" xlink:title="faecal coliform"
Escherichia coli = xlink:href="http://environment.data.gov.au/def/object/escherichia_coli" xlink:title="escherichia coli"
Faecal streptococci = xlink:href="http://environment.data.gov.au/def/object/faecal_streptococci" xlink:title="faecal streptococci"
Pseudomonas aeruginosa = xlink:href="http://environment.data.gov.au/def/object/pseudomonas_aeruginosa" (needs to be added to http://environment.data.gov.au/def/object/)
Heterotrophic Plate Count = xlink:href="http://environment.data.gov.au/def/object/heterotroph" (needs to be added to http://environment.data.gov.au/def/object/)
-->
					<gwml2c:gwOrganism xlink:href="http://environment.data.gov.au/def/object/escherichia_coli" xlink:title="escherichia coli"/>
				</gwml2c:GW_BiologicConstituent>
			</gwml2:gwBackgroundConstituent>
			<gwml2:gwPartOfBody/>
		</gwml2:GW_FluidBody>
	</gml:featureMember>
</gml:FeatureCollection>
