Skip to content

Commit

Permalink
outsourced to Geosamples Model
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholascar committed Sep 13, 2024
1 parent 24243ea commit 4625980
Show file tree
Hide file tree
Showing 13 changed files with 136 additions and 199 deletions.
File renamed without changes
1 change: 0 additions & 1 deletion docs/assets/samples-EX1.a.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-EX1.b.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-EX2.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-EX3.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-EX4.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-Overview.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-SampleAttribution.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/samples-SamplePropsColoured.svg

This file was deleted.

2 changes: 1 addition & 1 deletion docs/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ SKOS is used for the representation of controlled lists of terms, sometimes know

This supermodel uses SKOS to represent vocabularies used for the classification of other objects, for example the theme of a Dataset which is indicated by its association with a [Fields of Research Code](https://linked.data.gov.au/def/anzsrc-for/2020). The vocabulary of FoR Codes is a SKOS `Concept Hierarchy` and each Code within it a `Concept`.


### Web Ontology Language (OWL)

[https://www.w3.org/TR/owl2-primer/](https://www.w3.org/TR/owl2-primer/)
Expand All @@ -106,7 +107,6 @@ This supermodel uses SKOS to represent vocabularies used for the classification

This Supermodel and all the models within this profile hierarchy, except for GeoSciML, use OWL as their modelling language or system.


## Models not in the hierarchy

The following models are not included in the profile hierarchy figure above to simplicity's sake but are nonetheless profiles by this Supermodel.
Expand Down
219 changes: 34 additions & 185 deletions docs/components/geosample.md
Original file line number Diff line number Diff line change
@@ -1,140 +1,55 @@
# Samples Model

## Overview

<a href="../../assets/samples-Overview.svg">
<figure id="figure-bh" markdown style="width:100%">
![](../assets/samples-Overview.svg)
<figcaption>Figure SO: Overview of the SOSA-based Samples Model</figcaption>
</figure>
</a>

This Samples Model is an implementation of [SOSA](../background.md#sosa)'s _Sampling_ framing to link Samples to Observations and the things they are samples of (Features), with detailed Sample properties taken from a number of non-Semantic Web models such as [GeoSciML](../background.md#geosciml) and the [IGSN Description Model](#igsn-description-model). Specific connections to other models such as [DCAT](../background.md#dcat) are also included to allow for Samples model data cataloguing.

_**NOTE**: This model implements no new Classes or Properties of its own and thus is just a profile of other models. The Classes and Properties from other models suggested for use are shown in the Overview figure about and the sample details figures below. Note also that this model is a profile of this Supermodel's Backbone Model and thus is constrained to be valida according to that model._

## Sample Details

The model overview above shows the relation of Sample to other SOSA classes however the model subset below shows basic properties of just Sample.

<a href="../../assets/samples-SampleProps.svg">
<figure id="figure-bh" markdown style="width:70%">
![](../assets/samples-SampleProps.svg)
<figcaption>Figure SP: Sample properties</figcaption>
</figure>
</a>

The properties of the Sample class can be categorised in the following groups which are coloured in the figure below:

* Classification properties (green)
* Entity/Agent relations (mauve)
* Spatio-temporality (blue)

<a href="../../assets/samples-SamplePropsColoured.svg">
<a href="../../assets/geosamples-overview.svg">
<figure id="figure-bh" markdown style="width:70%">
![](../assets/samples-SamplePropsColoured.svg)
<figcaption>Figure SP: Sample properties, categorised</figcaption>
![](../assets/geosamples-overview.svg)
<figcaption>Geosamples Model overview</figcaption>
</figure>
</a>

The values for the classification properties MUST all come from controlled vocabularies of terms. The following section contains more information about the vocabularies required for use here.
The model used for samples within this Supermodel is the [Geosamples Model](https://kurrawong.github.io/geosamples-model/model.html) which "...describes physical attributes and important relationships of geological samples". This model is limited to just describing samples themselves and their direct relationships to other object but not those other objects.

Entity/Agent relations are indicated using [PROV](../background.md#prov) thus if specialised roles need to be allocated to particular Agents related to a Sample, perhaps such as 'Curator' and 'Collector', the [qualified relations](https://patterns.dataincubator.org/book/qualified-relation.html) pattern and a vocabulary of roles can be used with `prov:qualifiedAttribution` as per the figure below:
## Geosamples Model extensions

<a href="../../assets/samples-SampleAttribution.svg">
<figure id="figure-bh" markdown style="width:70%">
![](../assets/samples-SampleAttribution.svg)
<figcaption>Figure SP: Sample attribution: qualified and un-qualified forms</figcaption>
</figure>
</a>
Within this Supermodel, the Geosamples Model is extended to allow for:

## Example Scenarios
* [Feature of Interest details](#feature-of-interest-details) - the thing sampled
* [Observations on a Sample](#observations-on-a-sample)

### Geochemistry observations
### Feature of Interest details

A physical rock, sediment or soil sample, "Sample X", may be taken in the field and analysed in a laboratory to determine the occurrence of gold which is found to be 124 parts per million. The act of analysis is termed an Observation - "Observation Y" - and in this case it followed the method "Procedure Z". The result and the unit of measure used are bundled into a result which is given no independent identity (a Blank Node):
Samples can be made from other Samples and any other kind of thing, such as a Bore, Site, Rock Unit etc. This is always indicated using the predicate `sosa:isSampleOf`.

<a href="../../assets/samples-EX1.a.svg">
<figure id="figure-bh" markdown style="width:70%">
![](../assets/samples-EX1.a.svg)
<figcaption>Figure SX1a: Example sampling scenario showing classes and class instances</figcaption>
</figure>
</a>

Removing all the class information to just show object relations directly:

<a href="../../assets/samples-EX1.b.svg">
<figure id="figure-bh" markdown style="width:50%">
![](../assets/samples-EX1.b.svg)
<figcaption>Figure SX1b: Example sampling scenario showing class instances only</figcaption>
</figure>
</a>

### Linking Sampling results to Features

For the example above, if "Sample X" was actually part of a larger sample, "Sample N", which was taken from a drillhole was drilled into "Rock Unit O" then we have:

<a href="../../assets/samples-EX2.svg">
<figure id="figure-bh" markdown style="width:60%">
![](../assets/samples-EX2.svg)
<figcaption>Figure SX2: Example linking Sampling to Features</figcaption>
</figure>
</a>

In this scenario, we can infer (calculate) that "Rock Unit O" has the geological property of "Occurrence of Gold in a Matrix" and thus it contains gold at some overall concentration that the sample is approximating.

### Packaging Observations in Catalogues

An Observation Collection is a grouping of Observations and, in this scenario, a grouping has a single supplier/creator, "Company Q".

<a href="../../assets/samples-EX3.svg">
<figure id="figure-bh" markdown style="width:100%">
![](../assets/samples-EX3.svg)
<figcaption>Figure SX2: Example showing cataloguing of Observations</figcaption>
</figure>
</a>
From the Sample's point-of-view, the thing it is a sample of is the _Feature Of Interest_, regardless of what kind of thing it is.

To catalogue this Observation Collection, we treat it as a Dataset and make an Excel Spreadsheet version of it available as a Distribution.
Furthermore, a Sample may be of another Sample and sampling chains may be of any length:

Since the Sample is ultimately of "Rock Unit O", we can infer that the Dataset has the location of, or at least includes the location of, "Rock Unit O", hence the `dcterms:spatial` inferred property.
_Part Sample_ `isSampleOf` _Whole Sample_ `isSampleOf` _Rock Unit_.

We can also infer that the Dataset has the theme (`dcterms:theme`) of the particular property that was observed: "Occurrence of Gold in a Matrix".
Some models consider Bores and even Mines as _sampling features_, i.e. things that sample other things to produce samples, such as the Rock Unit the Bore is drilled in to. So we can have:

This modelling will allow users of a catalogue to discover this Observation Collection by either searching for things in the area of "Rock Unit O" or that deal with the occurrence of gold.
_Part Sample_ `isSampleOf` _Whole Sample_ `isSampleOf` _Bore_ `isSampleOf` _Rock Unit_.

### Sample properties
The things that samples are aiming to characterise are the _Ultimate Feature of Interest_ so, as per the example immediately above, that would be the _Rock Unit_.

For the Sample used in the previous scenarios, "Sample X" could be a rock sample, on a shelf in the rock shet, sampled by John Smith at some location and, we could have the following properties for it:
### Observations on a Sample

<a href="../../assets/samples-EX4.svg">
<figure id="figure-bh" markdown style="width:100%">
![](../assets/samples-EX4.svg)
<figcaption>Figure SX2: Example Sample properties</figcaption>
</figure>
</a>
Observations of the properties of samples are often made and the [SOSA](../background.md#sosa) model represents this by having instances of `sosa:Observation` that target instances of `sosa:Sample` with the `sosa:hasFeatureOfInterest` predicate, just as Samples target other things.

Observations are very similar to Samples, but they produce _Results_ which are normally categorisations or numerical measures of the properties of something, such as the gold content of a Sample's material.

## Example Data
The very detailed [Geochemistry Model](https://linked.data.gov.au/def/geochem) should be used for geochemistry observations of Samples.

Here is example RDF data for the union of the examples above:
An example:

```
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX ex: <http://example.com/>
PREFIX gas: <https://linked.data.gov.au/def/gas/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX gswa: <https://linked.data.gov.au/def/gswa-supermodel/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX qudt: <http://qudt.org/schema/qudt/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sdo: <https://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sosa: <http://www.w3.org/ns/sosa/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX unit: <http://qudt.org/vocab/unit/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
```turtle
ex:sample-x
a sosa:Sample ;
sosa:isSampleOf ex:sample-n ;
schema:material ex:Rock ;
schema:usedProcedure ex:CoreDrill ;
sdo:additionalType ex:CoreSectionHalf ;
.
ex:observation-y
a sosa:Observation ;
Expand All @@ -147,83 +62,17 @@ ex:observation-y
rdf:value "124.0"^^xsd:float ;
] ;
.
ex:sample-x
a sosa:Sample ;
sosa:isSampleOf ex:sample-n ;
gas:material ex:Rock ;
gas:samplingMethod ex:CoreDrill ;
sdo:additionalType ex:CoreSectionHalf ;
prov:qualifiedAttribution [
prov:agent [
a sdo:Person ;
sdo:name "John Smith" ;
] ;
prov:hadRole ex:Collector ;
] ;
prov:generatedAtTime [
a time:Instant ;
time:inXSDDate "2023-06-09"^^xsd:date ;
] ;
gas:samplingLocation [
a geo:Geometry ;
geo:asWKT "POINT (...)"^^geo:wktLiteral ;
] ;
gas:currentLocation [
a geo:Feature ;
dcterms:description "Rock Shed, Shelf 12, Box 32" ;
] ;
.
ex:sample-n
a sosa:Sample ;
sosa:isSampleOf ex:sample-n ;
.
ex:rock-unit-o
a gswa:GeologicalFeature ;
sosa:hasProperty ex:occurence-of-gold-in-a-matrix ;
.
ex:procedure-z
a sosa:Procedure ;
.
unit:PPM
a qudt:Unit ;
.
ex:occurence-of-gold-in-a-matrix
a skos:Concept ;
.
ex:observation-collection-p
a sosa:ObservationCollection , dcat:Dataset ;
prov:wasAttributedTo ex:company-q ;
dcterms:spatial ex:rock-unit-o ;
dcat:theme ex:occurence-of-gold-in-a-matrix ;
dcat:distribution [
a dcat:Distribution ;
dcterms:format "application/vnd.ms-excel" ;
dcat:downloadURL "http://somewhere.com/blob/1"^^xsd:anyURI ;
] ;
rdfs:member ex:observation-y ;
.
ex:company-q
a sdo:Organization ;
.
```

## Vocabularies

Vocabularies supporting this model and the positions within the model they occupy are listed and described below.

**Vocabulary** | **Description** | **Model Position**
--- | --- | ---
[GSWA Sample Materials](https://linked.data.gov.au/def/gswa-sample-materials)<br /><br />Derived from [GA's Material Type](http://pid.geoscience.gov.au/def/voc/ga/materialtype) vocabulary | Types of material which samples may consist of | Range value for `gas:material` predicate used on a `Sample` instance
[GSWA Specimen Types](https://linked.data.gov.au/def/gswa-specimen-types)<br /><br />Derived from [ODM's Specimen Type](http://vocabulary.odm2.org/specimentype) vocabulary | Types of physical Specimen | Range value for `sdo:additionalType` predicate used on a `Sample` instance
[GSWA Sampling Methods](https://linked.data.gov.au/def/gswa-sampling-methods)<br /><br />Derived from [GA's Sampling Method](http://pid.geoscience.gov.au/def/voc/ga/samplingmethod) vocabulary | Methods used to collect geological samples | Range value for `gas:samplingMethod` predicate used on a `Sample` instance
| **Vocabulary** | **Description** | **Model Position** |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|------------------------------------------------------------------------------------------|
| [GSWA Sample Materials](https://linked.data.gov.au/def/gswa-sample-materials)<br /><br />Derived from [GA's Material Type](http://pid.geoscience.gov.au/def/voc/ga/materialtype) vocabulary | Types of material which samples may consist of | Range value for `schema:material` predicate used on a `Sample` instance |
| [GSWA Specimen Types](https://linked.data.gov.au/def/gswa-specimen-types)<br /><br />Derived from [ODM's Specimen Type](http://vocabulary.odm2.org/specimentype) vocabulary | Types of physical Specimen | Range value for `sdo:additionalType` predicate used on a `Sample` instance |
| [GSWA Sampling Methods](https://linked.data.gov.au/def/gswa-sampling-methods)<br /><br />Derived from [GA's Sampling Method](http://pid.geoscience.gov.au/def/voc/ga/samplingmethod) vocabulary | Methods used to collect geological samples | Range value for `sosa:usedProcedure` predicate used on `Sample` and `Sampling` instances |

## Mappings

Expand Down
101 changes: 101 additions & 0 deletions docs/components/sample-example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

## Example Data

Here is example RDF data for the union of the examples above:

```
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX ex: <http://example.com/>
PREFIX gas: <https://linked.data.gov.au/def/gas/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX gswa: <https://linked.data.gov.au/def/gswa-supermodel/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX qudt: <http://qudt.org/schema/qudt/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sdo: <https://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sosa: <http://www.w3.org/ns/sosa/>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX unit: <http://qudt.org/vocab/unit/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

ex:observation-y
a sosa:Observation ;
sosa:hasFeatureOfInterest ex:sample-x ;
sosa:userProcedure ex:procedure-z ;
sosa:observedProperty ex:occurence-of-gold-in-a-matrix ;
sosa:hasResult [
a sosa:Result ;
qudt:unit unit:PPM ;
rdf:value "124.0"^^xsd:float ;
] ;
.

ex:sample-x
a sosa:Sample ;
sosa:isSampleOf ex:sample-n ;
gas:material ex:Rock ;
gas:samplingMethod ex:CoreDrill ;
sdo:additionalType ex:CoreSectionHalf ;
prov:qualifiedAttribution [
prov:agent [
a sdo:Person ;
sdo:name "John Smith" ;
] ;
prov:hadRole ex:Collector ;
] ;
prov:generatedAtTime [
a time:Instant ;
time:inXSDDate "2023-06-09"^^xsd:date ;
] ;
gas:samplingLocation [
a geo:Geometry ;
geo:asWKT "POINT (...)"^^geo:wktLiteral ;
] ;
gas:currentLocation [
a geo:Feature ;
dcterms:description "Rock Shed, Shelf 12, Box 32" ;
] ;
.

ex:sample-n
a sosa:Sample ;
sosa:isSampleOf ex:sample-n ;
.

ex:rock-unit-o
a gswa:GeologicalFeature ;
sosa:hasProperty ex:occurence-of-gold-in-a-matrix ;
.

ex:procedure-z
a sosa:Procedure ;
.

unit:PPM
a qudt:Unit ;
.

ex:occurence-of-gold-in-a-matrix
a skos:Concept ;
.

ex:observation-collection-p
a sosa:ObservationCollection , dcat:Dataset ;
prov:wasAttributedTo ex:company-q ;
dcterms:spatial ex:rock-unit-o ;
dcat:theme ex:occurence-of-gold-in-a-matrix ;
dcat:distribution [
a dcat:Distribution ;
dcterms:format "application/vnd.ms-excel" ;
dcat:downloadURL "http://somewhere.com/blob/1"^^xsd:anyURI ;
] ;
rdfs:member ex:observation-y ;
.

ex:company-q
a sdo:Organization ;
.
```
5 changes: 0 additions & 5 deletions rdf/components/geosample.ttl

This file was deleted.

0 comments on commit 4625980

Please sign in to comment.