diff --git a/.gitignore b/.gitignore index dc64bc58..f8a03b38 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,7 @@ Dockerfile # Generated documents for testing /result.csv /result.md +/tests/templates/**/*-result.ttl /docs/pages/**/*.md !/docs/pages/index.md /docs/pages/index.html diff --git a/abis_mapping/templates/incidental_occurrence_data_v3/examples/margaret_river_flora/margaret_river_flora.ttl b/abis_mapping/templates/incidental_occurrence_data_v3/examples/margaret_river_flora/margaret_river_flora.ttl index a546e6d4..5787ef9a 100644 --- a/abis_mapping/templates/incidental_occurrence_data_v3/examples/margaret_river_flora/margaret_river_flora.ttl +++ b/abis_mapping/templates/incidental_occurrence_data_v3/examples/margaret_river_flora/margaret_river_flora.ttl @@ -12,24 +12,80 @@ @prefix void: . @prefix xsd: . - a rdfs:Datatype ; - skos:prefLabel "catalogNumber source" ; - prov:wasAttributedTo . - - a rdfs:Datatype ; - skos:prefLabel "otherCatalogNumbers source" ; + a rdfs:Datatype ; + skos:definition "A catalog number for the sample" ; + skos:prefLabel "BHP catalogNumber" ; prov:wasAttributedTo . - a rdfs:Datatype ; - skos:prefLabel "ownerRecordID source" ; - prov:wasAttributedTo . + a rdfs:Datatype ; + skos:definition "A catalog number for the sample" ; + skos:prefLabel "WAM catalogNumber" ; + prov:wasAttributedTo . - a rdfs:Datatype ; - skos:prefLabel "providerRecordID source" ; - prov:wasAttributedTo . + a rdfs:Datatype ; + skos:definition "An identifier for the record" ; + skos:prefLabel "Stream Environment and Water Pty Ltd recordID" ; + prov:qualifiedAttribution [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ] . + + a rdfs:Datatype ; + skos:definition "An identifier for the record" ; + skos:prefLabel "http://createme.org/datatype/recordID/WAM recordID" ; + prov:qualifiedAttribution [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ] . a rdfs:Datatype ; - skos:prefLabel "recordNumber source" ; + skos:prefLabel "Stream Environment and Water Pty Ltd recordNumber" ; prov:wasAttributedTo . a tern:Observation ; @@ -658,9 +714,6 @@ sosa:observedProperty ; sosa:usedProcedure . - a prov:Agent ; - schema:name "WAM" . - a tern:Attribute ; void:inDataset ; tern:attribute ; @@ -1354,9 +1407,9 @@ tern:featureType . a tern:Sampling ; - dcterms:identifier "1"^^ ; + dcterms:identifier "1"^^ ; void:inDataset ; - geo:hasGeometry _:Nb3c5431f1fe4410786aadd1ac38b9d7f ; + geo:hasGeometry _:N1d7b3c94df884fd2aa3cdf38e0c24623 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1367,9 +1420,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "10"^^ ; + dcterms:identifier "10"^^ ; void:inDataset ; - geo:hasGeometry _:N8b2029000a7740d693b4d16d5c588364 ; + geo:hasGeometry _:Nd81f97d45db6430a82cac42ce3783907 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1380,9 +1433,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "11"^^ ; + dcterms:identifier "11"^^ ; void:inDataset ; - geo:hasGeometry _:N7103fa3ceb48407b8a77a4a17193ac17 ; + geo:hasGeometry _:Nbed37d40ee6a4bc0a77e26c9be4bd73c ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1393,9 +1446,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "12"^^ ; + dcterms:identifier "12"^^ ; void:inDataset ; - geo:hasGeometry _:N338bd3ceac1f4695b503ae2fd6c7c6bf ; + geo:hasGeometry _:N8b38efbd6f424e94876111c4e21ddab3 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1404,9 +1457,9 @@ sosa:usedProcedure . a tern:Sampling ; - dcterms:identifier "13"^^ ; + dcterms:identifier "13"^^ ; void:inDataset ; - geo:hasGeometry _:N28de7fcf2713477fac7065d7567fcebc ; + geo:hasGeometry _:Nc8160c273d204353970691fceff5fff5 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1417,9 +1470,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "14"^^ ; + dcterms:identifier "14"^^ ; void:inDataset ; - geo:hasGeometry _:N491bd9fcda3b4517be31ed080f8a384b ; + geo:hasGeometry _:N195f0bad195a4acfa04de2b5b673547c ; geo:hasMetricSpatialAccuracy 2e+01 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; @@ -1432,9 +1485,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "8022FSJMJ079c5cf"^^ ; + dcterms:identifier "8022FSJMJ079c5cf"^^ ; void:inDataset ; - geo:hasGeometry _:N2ed3cc9314a64022b76585393f2a914e ; + geo:hasGeometry _:N8eb028bfc92844a19b82a69cac34d73c ; geo:hasMetricSpatialAccuracy 5e+01 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; @@ -1448,9 +1501,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "ABC123"^^ ; + dcterms:identifier "ABC123"^^ ; void:inDataset ; - geo:hasGeometry _:Ne6ca4a30c5b148ca88ac636a26606ca5 ; + geo:hasGeometry _:N066776a0537048d2b30f234a938b7bdc ; geo:hasMetricSpatialAccuracy 3e+01 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; @@ -1464,9 +1517,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "2"^^ ; + dcterms:identifier "2"^^ ; void:inDataset ; - geo:hasGeometry _:N08136dc05cc342cea5c4b68888f857ab ; + geo:hasGeometry _:N4473886e934a44cfb97719f8e2976c9f ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1477,9 +1530,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "3"^^ ; + dcterms:identifier "3"^^ ; void:inDataset ; - geo:hasGeometry _:Nc25379ee4cbf4d1c95eb2a462b34d79f ; + geo:hasGeometry _:N04397c593eb549ad972b8db2d579cf21 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1490,9 +1543,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "4"^^ ; + dcterms:identifier "4"^^ ; void:inDataset ; - geo:hasGeometry _:N5c997447d2034836b2a27faf1e2797bb ; + geo:hasGeometry _:N70b6e9b07d2d461a9a229ad74b59fe63 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1503,9 +1556,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "5"^^ ; + dcterms:identifier "5"^^ ; void:inDataset ; - geo:hasGeometry _:N733ae2fe7f804c83ac9a9dfc690db981 ; + geo:hasGeometry _:Nf2823c96a8494ec9bd3c627c1f469e86 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1516,9 +1569,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "6"^^ ; + dcterms:identifier "6"^^ ; void:inDataset ; - geo:hasGeometry _:N0471641062b34d6998707865b42b60f2 ; + geo:hasGeometry _:N6abd249328e94ddd97914c0964b7b564 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1529,9 +1582,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "7"^^ ; + dcterms:identifier "7"^^ ; void:inDataset ; - geo:hasGeometry _:Nd56db8566a8549d4a9e0f3e1db15a79a ; + geo:hasGeometry _:Nb7b642b7b340436f8039478646594e3b ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1542,9 +1595,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "8022FSJMJ079c5cf"^^ ; + dcterms:identifier "8022FSJMJ079c5cf"^^ ; void:inDataset ; - geo:hasGeometry _:N39fb5013ae464c299c9d632e1431f605 ; + geo:hasGeometry _:N93a5c1cbe47b4df1b77baf9afde6b5cf ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1555,9 +1608,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "9"^^ ; + dcterms:identifier "9"^^ ; void:inDataset ; - geo:hasGeometry _:N16583510d7584d33afba1c02e3be92cf ; + geo:hasGeometry _:N3e621fe8edd54f73b14a7f3bc61cb903 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-26"^^xsd:date ] ; @@ -1569,7 +1622,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N0bb1c9cb18324465ae21d264f16ad98b ; + geo:hasGeometry _:N7a9803d7b54b4fbfaf5953f777ce76c6 ; geo:hasMetricSpatialAccuracy 5e+01 ; rdfs:comment "sequencing-sampling" ; time:hasTime [ a time:Instant ; @@ -1581,7 +1634,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N6a8ad8c453924ef09943084e5924757c ; + geo:hasGeometry _:N89290d6e0b0346f49acf69c7e248bef2 ; geo:hasMetricSpatialAccuracy 3e+01 ; rdfs:comment "sequencing-sampling" ; time:hasTime [ a time:Instant ; @@ -1593,7 +1646,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N3bef65dee5c4416d9a68fed945e0b9c1 ; + geo:hasGeometry _:N22f79dd58ac94390867d755da33b8430 ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; rdfs:comment "Date unknown, template eventDate used as proxy" ; @@ -1605,7 +1658,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N2f312a34c16d402cb10ca963c5c53311 ; + geo:hasGeometry _:N2a68efc267934c8e8a4605ee6e9d5c59 ; geo:hasMetricSpatialAccuracy 2e+01 ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; @@ -1619,7 +1672,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N841512c546c0496ba37901eac4c9deb9 ; + geo:hasGeometry _:N5eed6442b24f4594ae75250560a151fe ; geo:hasMetricSpatialAccuracy 5e+01 ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; @@ -1632,7 +1685,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:Nd94473f8809d4824a0c09f72ac8f1c13 ; + geo:hasGeometry _:Ne25180dbfeea4e27a277095c2d212d0a ; geo:hasMetricSpatialAccuracy 3e+01 ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; @@ -1790,10 +1843,10 @@ a tern:FeatureOfInterest, tern:Sample ; - dcterms:identifier "MR-456"^^ ; + dcterms:identifier "MR-456"^^ ; void:inDataset ; - dwc:otherCatalogNumbers "BHP2012-7521"^^, - "M12378"^^ ; + dwc:otherCatalogNumbers "BHP2012-7521"^^, + "M12378"^^ ; dwc:recordNumber "PE:12:8832"^^ ; rdfs:comment "field-sample" ; sosa:isResultOf ; @@ -1802,10 +1855,10 @@ a tern:FeatureOfInterest, tern:Sample ; - dcterms:identifier "MR-457"^^ ; + dcterms:identifier "MR-457"^^ ; void:inDataset ; - dwc:otherCatalogNumbers "BHP2012-7522"^^, - "M12379"^^ ; + dwc:otherCatalogNumbers "BHP2012-7522"^^, + "M12379"^^ ; dwc:recordNumber "PE:12:8833"^^ ; rdfs:comment "field-sample" ; sosa:isResultOf ; @@ -1834,6 +1887,9 @@ tern:featureType ; tern:hasAttribute . + a prov:Agent ; + schema:name "WAM" . + a tern:FeatureOfInterest ; void:inDataset ; geo:hasGeometry [ a geo:Geometry ; @@ -1845,254 +1901,254 @@ a tern:RDFDataset ; dcterms:description "Example Incidental Occurrence Dataset by Gaia Resources" ; - dcterms:issued "2024-07-04"^^xsd:date ; + dcterms:issued "2024-09-02"^^xsd:date ; dcterms:title "Example Incidental Occurrence Dataset" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N3bef65dee5c4416d9a68fed945e0b9c1 ; + rdf:object _:Nd81f97d45db6430a82cac42ce3783907 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; + rdfs:comment "supplied as" . + +[] a rdf:Statement ; + geo:hasGeometry [ a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N3e621fe8edd54f73b14a7f3bc61cb903 ; + rdf:predicate geo:hasGeometry ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Nd94473f8809d4824a0c09f72ac8f1c13 ; + rdf:object _:N5eed6442b24f4594ae75250560a151fe ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N338bd3ceac1f4695b503ae2fd6c7c6bf ; + rdf:object _:N1d7b3c94df884fd2aa3cdf38e0c24623 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N0471641062b34d6998707865b42b60f2 ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Nbed37d40ee6a4bc0a77e26c9be4bd73c ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N08136dc05cc342cea5c4b68888f857ab ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N2a68efc267934c8e8a4605ee6e9d5c59 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N39fb5013ae464c299c9d632e1431f605 ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N195f0bad195a4acfa04de2b5b673547c ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Ne6ca4a30c5b148ca88ac636a26606ca5 ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N22f79dd58ac94390867d755da33b8430 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N841512c546c0496ba37901eac4c9deb9 ; + rdf:object _:N066776a0537048d2b30f234a938b7bdc ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N491bd9fcda3b4517be31ed080f8a384b ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N93a5c1cbe47b4df1b77baf9afde6b5cf ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N5c997447d2034836b2a27faf1e2797bb ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:Ne25180dbfeea4e27a277095c2d212d0a ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N6a8ad8c453924ef09943084e5924757c ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N70b6e9b07d2d461a9a229ad74b59fe63 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Nd56db8566a8549d4a9e0f3e1db15a79a ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N89290d6e0b0346f49acf69c7e248bef2 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N16583510d7584d33afba1c02e3be92cf ; + rdf:object _:Nc8160c273d204353970691fceff5fff5 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Nb3c5431f1fe4410786aadd1ac38b9d7f ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N6abd249328e94ddd97914c0964b7b564 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Nc25379ee4cbf4d1c95eb2a462b34d79f ; + rdf:object _:N04397c593eb549ad972b8db2d579cf21 ; rdf:predicate geo:hasGeometry ; rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N733ae2fe7f804c83ac9a9dfc690db981 ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N8eb028bfc92844a19b82a69cac34d73c ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N8b2029000a7740d693b4d16d5c588364 ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N4473886e934a44cfb97719f8e2976c9f ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N28de7fcf2713477fac7065d7567fcebc ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Nf2823c96a8494ec9bd3c627c1f469e86 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N0bb1c9cb18324465ae21d264f16ad98b ; + rdf:object _:N7a9803d7b54b4fbfaf5953f777ce76c6 ; rdf:predicate geo:hasGeometry ; rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N7103fa3ceb48407b8a77a4a17193ac17 ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Nb7b642b7b340436f8039478646594e3b ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N2ed3cc9314a64022b76585393f2a914e ; + rdf:object _:N8b38efbd6f424e94876111c4e21ddab3 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; - rdfs:comment "supplied as" . - -[] a rdf:Statement ; - geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N2f312a34c16d402cb10ca963c5c53311 ; - rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . -_:N0471641062b34d6998707865b42b60f2 a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . - -_:N08136dc05cc342cea5c4b68888f857ab a geo:Geometry ; +_:N04397c593eb549ad972b8db2d579cf21 a geo:Geometry ; geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . -_:N0bb1c9cb18324465ae21d264f16ad98b a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; - rdfs:comment "Location unknown, location of field sampling used as proxy" . - -_:N16583510d7584d33afba1c02e3be92cf a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . +_:N066776a0537048d2b30f234a938b7bdc a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . -_:N28de7fcf2713477fac7065d7567fcebc a geo:Geometry ; +_:N195f0bad195a4acfa04de2b5b673547c a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . -_:N2ed3cc9314a64022b76585393f2a914e a geo:Geometry ; +_:N1d7b3c94df884fd2aa3cdf38e0c24623 a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . -_:N2f312a34c16d402cb10ca963c5c53311 a geo:Geometry ; +_:N22f79dd58ac94390867d755da33b8430 a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N338bd3ceac1f4695b503ae2fd6c7c6bf a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . - -_:N39fb5013ae464c299c9d632e1431f605 a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . - -_:N3bef65dee5c4416d9a68fed945e0b9c1 a geo:Geometry ; +_:N2a68efc267934c8e8a4605ee6e9d5c59 a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N491bd9fcda3b4517be31ed080f8a384b a geo:Geometry ; +_:N3e621fe8edd54f73b14a7f3bc61cb903 a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . -_:N5c997447d2034836b2a27faf1e2797bb a geo:Geometry ; +_:N4473886e934a44cfb97719f8e2976c9f a geo:Geometry ; geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . -_:N6a8ad8c453924ef09943084e5924757c a geo:Geometry ; +_:N5eed6442b24f4594ae75250560a151fe a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N7103fa3ceb48407b8a77a4a17193ac17 a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . - -_:N733ae2fe7f804c83ac9a9dfc690db981 a geo:Geometry ; +_:N6abd249328e94ddd97914c0964b7b564 a geo:Geometry ; geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . -_:N841512c546c0496ba37901eac4c9deb9 a geo:Geometry ; +_:N70b6e9b07d2d461a9a229ad74b59fe63 a geo:Geometry ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . + +_:N7a9803d7b54b4fbfaf5953f777ce76c6 a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N8b2029000a7740d693b4d16d5c588364 a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . +_:N89290d6e0b0346f49acf69c7e248bef2 a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; + rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:Nb3c5431f1fe4410786aadd1ac38b9d7f a geo:Geometry ; +_:N8b38efbd6f424e94876111c4e21ddab3 a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . -_:Nc25379ee4cbf4d1c95eb2a462b34d79f a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . +_:N8eb028bfc92844a19b82a69cac34d73c a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . + +_:N93a5c1cbe47b4df1b77baf9afde6b5cf a geo:Geometry ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . -_:Nd56db8566a8549d4a9e0f3e1db15a79a a geo:Geometry ; +_:Nb7b642b7b340436f8039478646594e3b a geo:Geometry ; geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . -_:Nd94473f8809d4824a0c09f72ac8f1c13 a geo:Geometry ; +_:Nbed37d40ee6a4bc0a77e26c9be4bd73c a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . + +_:Nc8160c273d204353970691fceff5fff5 a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . + +_:Nd81f97d45db6430a82cac42ce3783907 a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . + +_:Ne25180dbfeea4e27a277095c2d212d0a a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:Ne6ca4a30c5b148ca88ac636a26606ca5 a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . +_:Nf2823c96a8494ec9bd3c627c1f469e86 a geo:Geometry ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . diff --git a/abis_mapping/templates/incidental_occurrence_data_v3/mapping.py b/abis_mapping/templates/incidental_occurrence_data_v3/mapping.py index ccbd1a14..a3fb9d6a 100644 --- a/abis_mapping/templates/incidental_occurrence_data_v3/mapping.py +++ b/abis_mapping/templates/incidental_occurrence_data_v3/mapping.py @@ -47,12 +47,14 @@ CONCEPT_CONSERVATION_JURISDICTION = rdflib.URIRef("http://linked.data.gov.au/def/tern-cv/755b1456-b76f-4d54-8690-10e41e25c5a7") # noqa: E501 # Roles -ROLE_ORIGINATOR = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/originator") # noqa: E501 -ROLE_RIGHTS_HOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/rightsHolder") # noqa: E501 -ROLE_RESOURCE_PROVIDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/resourceProvider") # noqa: E501 -ROLE_CUSTODIAN = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/custodian") # noqa: E501 -ROLE_STAKEHOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/stakeholder") # noqa: E501 -ROLE_OWNER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/owner") # noqa: E501 +CI_ROLECODE_ORIGINATOR = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/originator") # noqa: E501 +CI_ROLECODE_RIGHTS_HOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/rightsHolder") # noqa: E501 +CI_ROLECODE_RESOURCE_PROVIDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/resourceProvider") # noqa: E501 +CI_ROLECODE_CUSTODIAN = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/custodian") # noqa: E501 +CI_ROLECODE_STAKEHOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/stakeholder") # noqa: E501 +CI_ROLECODE_OWNER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/owner") # noqa: E501 +DATA_ROLE_RESOURCE_PROVIDER = rdflib.URIRef("https://linked.data.gov.au/def/data-roles/resourceProvider") +DATA_ROLE_OWNER = rdflib.URIRef("https://linked.data.gov.au/def/data-roles/owner") class IncidentalOccurrenceMapper(base.mapper.ABISMapper): @@ -282,14 +284,14 @@ def apply_mapping_row( conservation_jurisdiction_value = utils.rdf.uri(f"value/conservationJurisdiction/{row_num}", base_iri) provider_determined_by = utils.rdf.uri(f"provider/{row['threatStatusDeterminedBy']}", base_iri) provider_record_id_datatype = utils.rdf.uri( - internal_id=f"datatype/providerRecordID/{row['providerRecordIDSource']}", + internal_id=f"datatype/recordID/{row['providerRecordIDSource']}", namespace=base_iri, ) provider_record_id_agent = utils.rdf.uri(f"agent/{row['providerRecordIDSource']}", base_iri) # Conditionally create uris dependent on ownerRecordIDSource field if owner_record_id_source := row["ownerRecordIDSource"]: - owner_record_id_datatype = utils.rdf.uri(f"datatype/ownerRecordID/{owner_record_id_source}", base_iri) + owner_record_id_datatype = utils.rdf.uri(f"datatype/recordID/{owner_record_id_source}", base_iri) owner_record_id_provider = utils.rdf.uri(f"provider/{row['ownerRecordIDSource']}", base_iri) else: owner_record_id_datatype = None @@ -314,7 +316,7 @@ def apply_mapping_row( # Conditionally create uris dependent on otherCatalogNumbersSource field. if other_catalog_numbers_source := row["otherCatalogNumbersSource"]: other_catalog_numbers_datatype = utils.rdf.uri( - internal_id=f"datatype/otherCatalogNumbers/{other_catalog_numbers_source}", + internal_id=f"datatype/catalogNumber/{other_catalog_numbers_source}", namespace=base_iri, ) other_catalog_numbers_provider = utils.rdf.uri(f"provider/{other_catalog_numbers_source}", base_iri) @@ -346,6 +348,7 @@ def apply_mapping_row( self.add_record_number_datatype( uri=record_number_datatype, provider=provider_recorded_by, + value=recorded_by, graph=graph, ) @@ -357,9 +360,11 @@ def apply_mapping_row( ) # Add owner record id datatype - self.add_owner_record_id_datatype( + self.add_record_id_datatype( uri=owner_record_id_datatype, provider=owner_record_id_provider, + value=owner_record_id_source, + provider_role_type=DATA_ROLE_OWNER, graph=graph, ) @@ -386,9 +391,11 @@ def apply_mapping_row( ) # Add provider record ID datatype - self.add_provider_record_id_datatype( + self.add_record_id_datatype( uri=provider_record_id_datatype, - agent=provider_record_id_agent, + provider=provider_record_id_agent, + value=provider_record_id_datatype, + provider_role_type=DATA_ROLE_RESOURCE_PROVIDER, graph=graph, ) @@ -415,6 +422,7 @@ def apply_mapping_row( self.add_catalog_number_datatype( uri=catalog_number_datatype, provider=catalog_number_provider, + value=catalog_number_source, graph=graph, ) @@ -426,9 +434,10 @@ def apply_mapping_row( ) # Add other catalog numbers datatype - self.add_other_catalog_numbers_datatype( + self.add_catalog_number_datatype( uri=other_catalog_numbers_datatype, provider=other_catalog_numbers_provider, + value=other_catalog_numbers_source, graph=graph, ) @@ -1062,10 +1071,12 @@ def add_provider_recorded_by_agent( # Add name graph.add((uri, rdflib.SDO.name, rdflib.Literal(row['recordedBy']))) - def add_owner_record_id_datatype( + def add_record_id_datatype( self, uri: rdflib.URIRef | None, provider: rdflib.URIRef | None, + value: str | None, + provider_role_type: rdflib.URIRef, graph: rdflib.Graph, ) -> None: """Adds the owner record id datatype to the graph. @@ -1073,9 +1084,11 @@ def add_owner_record_id_datatype( Args: uri (rdflib.URIRef): Subject of the node. provider (rdflib.URIRef): Provider of the datatype. + value (str | None): Raw value provided for the record id source. + provider_role_type (rdflib.URIRef): Role type of provider. graph (rdflid.Graph): Graph to be modified. """ - # Check to see subject provided + # Check to see subject provided. if uri is None: return @@ -1083,11 +1096,19 @@ def add_owner_record_id_datatype( graph.add((uri, a, rdflib.RDFS.Datatype)) # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("ownerRecordID source"))) + if value is not None: + graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal(f"{value} recordID"))) + + # Add definition + graph.add((uri, rdflib.SKOS.definition, rdflib.Literal("An identifier for the record"))) # Add attribution if provider is not None: - graph.add((uri, rdflib.PROV.wasAttributedTo, provider)) + qualified_attribution = rdflib.BNode() + graph.add((qualified_attribution, a, rdflib.PROV.Attribution)) + graph.add((qualified_attribution, rdflib.PROV.agent, provider)) + graph.add((qualified_attribution, rdflib.PROV.hadRole, provider_role_type)) + graph.add((uri, rdflib.PROV.qualifiedAttribution, qualified_attribution)) def add_owner_record_id_provider( self, @@ -1229,28 +1250,6 @@ def add_sampling_field( # Add Basis Of Record Attribute graph.add((uri, utils.namespaces.TERN.hasAttribute, basis)) - def add_provider_record_id_datatype( - self, - uri: rdflib.URIRef, - agent: rdflib.URIRef, - graph: rdflib.Graph, - ) -> None: - """Adds the provider record id datatype to the graph. - - Args: - uri (rdflib.URIRef): Subject of the node. - agent (rdflib.URIRef): Provider agent URI. - graph (rdflib.Graph): Graph to be modified. - """ - # Add the type - graph.add((uri, a, rdflib.RDFS.Datatype)) - - # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("providerRecordID source"))) - - # Add attribution - graph.add((uri, rdflib.PROV.wasAttributedTo, agent)) - def add_provider_record_id_agent( self, uri: rdflib.URIRef, @@ -1409,6 +1408,7 @@ def add_catalog_number_datatype( self, uri: rdflib.URIRef | None, provider: rdflib.URIRef | None, + value: str | None, graph: rdflib.Graph, ) -> None: """Adds catalog number datatype to the graph. @@ -1416,6 +1416,7 @@ def add_catalog_number_datatype( Args: uri (rdflib.URIRef | None): Subject of the node. provider (rdflib.URIRef | None): Corresponding provider. + value (str | None): Catalog number source name obtained from raw data. graph (rdflib.Graph): Graph to be modified. """ # Check subject was provided @@ -1426,7 +1427,11 @@ def add_catalog_number_datatype( graph.add((uri, a, rdflib.RDFS.Datatype)) # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("catalogNumber source"))) + if value is not None: + graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal(f"{value} catalogNumber"))) + + # Add definition + graph.add((uri, rdflib.SKOS.definition, rdflib.Literal("A catalog number for the sample"))) # Add attribution if provider is not None: @@ -1455,33 +1460,6 @@ def add_catalog_number_provider( # Add name graph.add((uri, rdflib.SDO.name, rdflib.Literal(row["catalogNumberSource"]))) - def add_other_catalog_numbers_datatype( - self, - uri: rdflib.URIRef | None, - provider: rdflib.URIRef | None, - graph: rdflib.Graph, - ) -> None: - """Adds other catalog numbers datatype to the graph. - - Args: - uri (rdflib.URIRef | None): Subject of the node. - provider (rdflib.URIRef | None): Corresponding provider. - graph (rdflib.Graph): Graph to be modified. - """ - # Check subject provided - if uri is None: - return - - # Add type - graph.add((uri, a, rdflib.RDFS.Datatype)) - - # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("otherCatalogNumbers source"))) - - # Add attribution - if provider is not None: - graph.add((uri, rdflib.PROV.wasAttributedTo, provider)) - def add_other_catalog_numbers_provider( self, uri: rdflib.URIRef | None, @@ -1697,6 +1675,7 @@ def add_record_number_datatype( self, uri: rdflib.URIRef | None, provider: rdflib.URIRef | None, + value: str | None, graph: rdflib.Graph, ) -> None: """Adds record number datatype to the graph. @@ -1706,6 +1685,7 @@ def add_record_number_datatype( or None if uri wasn't created. provider (rdflib.URIRef | None): The corresponding provider uri. + value (str | None): Raw value provided in row. graph (rdflib.Graph): Graph to be modified. """ # Check subject provided @@ -1716,7 +1696,8 @@ def add_record_number_datatype( graph.add((uri, a, rdflib.RDFS.Datatype)) # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("recordNumber source"))) + if value is not None: + graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal(f"{value} recordNumber"))) # Add attribution if provider is not None: diff --git a/abis_mapping/templates/survey_occurrence_data_v2/examples/margaret_river_flora/margaret_river_flora.ttl b/abis_mapping/templates/survey_occurrence_data_v2/examples/margaret_river_flora/margaret_river_flora.ttl index a700de19..9efaa9f3 100644 --- a/abis_mapping/templates/survey_occurrence_data_v2/examples/margaret_river_flora/margaret_river_flora.ttl +++ b/abis_mapping/templates/survey_occurrence_data_v2/examples/margaret_river_flora/margaret_river_flora.ttl @@ -13,27 +13,80 @@ @prefix xsd: . a rdfs:Datatype ; - skos:prefLabel "catalogNumber source" ; + skos:definition "A catalog number for the sample" ; + skos:prefLabel "BHP catalogNumber" ; prov:wasAttributedTo . a rdfs:Datatype ; - skos:prefLabel "catalogNumber source" ; + skos:definition "A catalog number for the sample" ; + skos:prefLabel "WAM catalogNumber" ; prov:wasAttributedTo . - a rdfs:Datatype ; - skos:prefLabel "otherCatalogNumbers source" ; - prov:wasAttributedTo . - - a rdfs:Datatype ; - skos:prefLabel "ownerRecordID source" ; - prov:wasAttributedTo . - - a rdfs:Datatype ; - skos:prefLabel "providerRecordID source" ; - prov:wasAttributedTo . + a rdfs:Datatype ; + skos:definition "An identifier for the record" ; + skos:prefLabel "http://createme.org/datatype/recordID/UFP recordID" ; + prov:qualifiedAttribution [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ] . + + a rdfs:Datatype ; + skos:definition "An identifier for the record" ; + skos:prefLabel "WAM recordID" ; + prov:qualifiedAttribution [ a prov:Attribution ; + prov:agent ; + prov:hadRole ], + [ a prov:Attribution ; + prov:agent ; + prov:hadRole ] . a rdfs:Datatype ; - skos:prefLabel "recordNumber source" ; + skos:definition "The record number of the original observation from the original observer of the organism" ; + skos:prefLabel "Stream Environment and Water Pty Ltd recordNumber" ; prov:wasAttributedTo . a tern:Observation ; @@ -642,9 +695,6 @@ a prov:Agent ; schema:name "UFP" . - a prov:Agent ; - schema:name "UFP" . - a tern:Attribute ; void:inDataset ; tern:attribute ; @@ -902,6 +952,9 @@ skos:inScheme ; skos:prefLabel "WA/new threat status" . + a prov:Agent ; + schema:name "BHP" . + a prov:Agent ; schema:name "WA-BIO" . @@ -1314,12 +1367,6 @@ skos:inScheme ; skos:prefLabel "new identification method" . - a prov:Agent ; - schema:name "BHP" . - - a prov:Agent ; - schema:name "WAM" . - a tern:FeatureOfInterest, tern:Sample ; void:inDataset ; @@ -1338,9 +1385,9 @@ tern:featureType . a tern:Sampling ; - dcterms:identifier "A001"^^ ; + dcterms:identifier "A001"^^ ; void:inDataset ; - geo:hasGeometry _:Nd806c902186749a5a0d599160ec8ceba ; + geo:hasGeometry _:N32de8ac55e904722897b3e1ca803bf07 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-24"^^xsd:date ] ; @@ -1352,9 +1399,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A010"^^ ; + dcterms:identifier "A010"^^ ; void:inDataset ; - geo:hasGeometry _:Ncde070864c0b4c2ea8ad677264d116b4 ; + geo:hasGeometry _:Ncbdfb55e47c04510829a4227fde5773d ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-23"^^xsd:date ] ; @@ -1366,9 +1413,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A011"^^ ; + dcterms:identifier "A011"^^ ; void:inDataset ; - geo:hasGeometry _:N721243701a404be9931f4251f319de54 ; + geo:hasGeometry _:N34f7303053704d668b7abd30f857457d ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-23"^^xsd:date ] ; @@ -1380,9 +1427,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A012"^^ ; + dcterms:identifier "A012"^^ ; void:inDataset ; - geo:hasGeometry _:N33c88eef4a2f46ce96c5c91e3a782ec2 ; + geo:hasGeometry _:N37fe36024a364588a67a3b841b5a86c3 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2019-09-24"^^xsd:date ] ; @@ -1392,9 +1439,9 @@ schema:isPartOf . a tern:Sampling ; - dcterms:identifier "A013"^^ ; + dcterms:identifier "A013"^^ ; void:inDataset ; - geo:hasGeometry _:Na453ad06840b47e8a01beba7d49cb143 ; + geo:hasGeometry _:N0677f52302834340ae8485267af3098c ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-23"^^xsd:date ] ; @@ -1406,9 +1453,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A014"^^ ; + dcterms:identifier "A014"^^ ; void:inDataset ; - geo:hasGeometry _:N933d9d8713aa4c678aea14efddd2c938 ; + geo:hasGeometry _:Nd2453ce83cdb4d749735d13ec709de80 ; geo:hasMetricSpatialAccuracy 2e+01 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; @@ -1423,9 +1470,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "8022FSJMJ079c5cf"^^ ; + dcterms:identifier "8022FSJMJ079c5cf"^^ ; void:inDataset ; - geo:hasGeometry _:N4b49ce7dd64e44cfa42aeae0f632a78d ; + geo:hasGeometry _:Nfc070803164d4f3d9d5e5dd09a9134c7 ; geo:hasMetricSpatialAccuracy 5e+01 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; @@ -1440,9 +1487,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "ABC123"^^ ; + dcterms:identifier "ABC123"^^ ; void:inDataset ; - geo:hasGeometry _:Ne658571dba5d4ac4b9714ae738ec1d40 ; + geo:hasGeometry _:N37c45913b1fc463f988f17c23cfa317f ; geo:hasMetricSpatialAccuracy 3e+01 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; @@ -1457,9 +1504,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A002"^^ ; + dcterms:identifier "A002"^^ ; void:inDataset ; - geo:hasGeometry _:N7c5b986ae48c4e739ab77e1152a04a9d ; + geo:hasGeometry _:Nead1c23c0d4744e8bd5febb586916c95 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1471,9 +1518,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A003"^^ ; + dcterms:identifier "A003"^^ ; void:inDataset ; - geo:hasGeometry _:Nc507d40c2480467894bee3414312a1de ; + geo:hasGeometry _:N9dc79be22c84403e8891fb3bc19e7d1c ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1485,9 +1532,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A004"^^ ; + dcterms:identifier "A004"^^ ; void:inDataset ; - geo:hasGeometry _:Nab3badd73b9c4aac9998606ccf2644bd ; + geo:hasGeometry _:Nc250ece147224ffb900ce69bb5adb83c ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1499,9 +1546,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A005"^^ ; + dcterms:identifier "A005"^^ ; void:inDataset ; - geo:hasGeometry _:N8e7140c707864e2f9dd31e0df57ab0ca ; + geo:hasGeometry _:Nff39f1c1591e4587883bdcf4753f0160 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1513,9 +1560,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A006"^^ ; + dcterms:identifier "A006"^^ ; void:inDataset ; - geo:hasGeometry _:Nd64752c54b6a4d4c9e645c921a3d665a ; + geo:hasGeometry _:N365007fa3ff74856a84bb82ce252eff8 ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1527,9 +1574,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A007"^^ ; + dcterms:identifier "A007"^^ ; void:inDataset ; - geo:hasGeometry _:N2d4958b875ad4374a8e87b977593effb ; + geo:hasGeometry _:Ndc7c8d852cb340bebcf5b0a4eed6864d ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1541,9 +1588,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A008"^^ ; + dcterms:identifier "A008"^^ ; void:inDataset ; - geo:hasGeometry _:N792620ca3c1046ccb145b4439a675c63 ; + geo:hasGeometry _:N7826a22187334d108ad7199df36693fd ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-21"^^xsd:date ] ; @@ -1555,9 +1602,9 @@ tern:locationDescription "Cowaramup Bay Road" . a tern:Sampling ; - dcterms:identifier "A009"^^ ; + dcterms:identifier "A009"^^ ; void:inDataset ; - geo:hasGeometry _:N21b639687a8f4865af7d84537b8677ff ; + geo:hasGeometry _:Ne8524f09767b4e47b096234b80eb3b2a ; rdfs:comment "field-sampling" ; time:hasTime [ a time:Instant ; time:inXSDDate "2020-09-23"^^xsd:date ] ; @@ -1570,7 +1617,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:Ne75462b4a28643f1a15b2c97102be89b ; + geo:hasGeometry _:N39bae6dbeb05440eacb8cd034f3229ec ; geo:hasMetricSpatialAccuracy 5e+01 ; rdfs:comment "sequencing-sampling" ; time:hasTime [ a time:Instant ; @@ -1582,7 +1629,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N37aab44093684e2cb3783b93afb19c0c ; + geo:hasGeometry _:N7fed5965e37249a581c30378df9ea775 ; geo:hasMetricSpatialAccuracy 3e+01 ; rdfs:comment "sequencing-sampling" ; time:hasTime [ a time:Instant ; @@ -1594,7 +1641,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N16116dbb2d9049d28c249d3ff1bdf8e7 ; + geo:hasGeometry _:N0554e74b65b943fe8edf8bad0a2747fc ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; rdfs:comment "Date unknown, template eventDate used as proxy" ; @@ -1606,7 +1653,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:Ne2cff294718a4df3b5f7db5692cdbd07 ; + geo:hasGeometry _:N885818aace7e43bf917bce0d4e3e38a1 ; geo:hasMetricSpatialAccuracy 5e+01 ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; @@ -1619,7 +1666,7 @@ a tern:Sampling ; void:inDataset ; - geo:hasGeometry _:N9ad1c94a66fe45a29198296f6fb50b5f ; + geo:hasGeometry _:N9eff66228ba34c4fb3164268f8471c24 ; geo:hasMetricSpatialAccuracy 3e+01 ; rdfs:comment "specimen-sampling" ; time:hasTime [ a time:Instant ; @@ -1662,6 +1709,9 @@ rdf:value "Caladenia excelsa Hopper & A.P.Br." ; tern:featureType . + a prov:Agent ; + schema:name "WAM" . + a tern:FeatureOfInterest, tern:Sample ; void:inDataset ; @@ -1768,10 +1818,10 @@ a tern:FeatureOfInterest, tern:Sample ; - dcterms:identifier "MR-456"^^ ; + dcterms:identifier "MR-456"^^ ; void:inDataset ; - dwc:otherCatalogNumbers "BHP2012-7521"^^, - "M12378"^^, + dwc:otherCatalogNumbers "BHP2012-7521"^^, + "M12378"^^, "['BHP2012-7521', 'M12378']" ; dwc:recordNumber "PE:12:8832"^^ ; rdfs:comment "field-sample" ; @@ -1781,10 +1831,10 @@ a tern:FeatureOfInterest, tern:Sample ; - dcterms:identifier "MR-457"^^ ; + dcterms:identifier "MR-457"^^ ; void:inDataset ; - dwc:otherCatalogNumbers "BHP2012-7522"^^, - "M12379"^^, + dwc:otherCatalogNumbers "BHP2012-7522"^^, + "M12379"^^, "['BHP2012-7522', 'M12379']" ; dwc:recordNumber "PE:12:8833"^^ ; rdfs:comment "field-sample" ; @@ -1814,6 +1864,9 @@ tern:featureType ; tern:hasAttribute . + a prov:Agent ; + schema:name "UFP" . + a tern:FeatureOfInterest ; void:inDataset ; geo:hasGeometry [ a geo:Geometry ; @@ -1825,242 +1878,242 @@ a tern:RDFDataset ; dcterms:description "Example Systematic Survey Occurrence Dataset by Gaia Resources" ; - dcterms:issued "2024-07-04"^^xsd:date ; + dcterms:issued "2024-09-02"^^xsd:date ; dcterms:title "Example Systematic Survey Occurrence Dataset" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N721243701a404be9931f4251f319de54 ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N39bae6dbeb05440eacb8cd034f3229ec ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Ne658571dba5d4ac4b9714ae738ec1d40 ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N9dc79be22c84403e8891fb3bc19e7d1c ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N933d9d8713aa4c678aea14efddd2c938 ; + rdf:object _:Ne8524f09767b4e47b096234b80eb3b2a ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N9ad1c94a66fe45a29198296f6fb50b5f ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N0554e74b65b943fe8edf8bad0a2747fc ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N21b639687a8f4865af7d84537b8677ff ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N7fed5965e37249a581c30378df9ea775 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N4b49ce7dd64e44cfa42aeae0f632a78d ; + rdf:object _:N885818aace7e43bf917bce0d4e3e38a1 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N7c5b986ae48c4e739ab77e1152a04a9d ; + rdf:object _:Nc250ece147224ffb900ce69bb5adb83c ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Ne2cff294718a4df3b5f7db5692cdbd07 ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Ncbdfb55e47c04510829a4227fde5773d ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Nc507d40c2480467894bee3414312a1de ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N7826a22187334d108ad7199df36693fd ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N792620ca3c1046ccb145b4439a675c63 ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N37fe36024a364588a67a3b841b5a86c3 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N8e7140c707864e2f9dd31e0df57ab0ca ; + rdf:object _:Ndc7c8d852cb340bebcf5b0a4eed6864d ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Nd806c902186749a5a0d599160ec8ceba ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Nead1c23c0d4744e8bd5febb586916c95 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Nd64752c54b6a4d4c9e645c921a3d665a ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N9eff66228ba34c4fb3164268f8471c24 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:Ne75462b4a28643f1a15b2c97102be89b ; + rdf:object _:Nfc070803164d4f3d9d5e5dd09a9134c7 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Ncde070864c0b4c2ea8ad677264d116b4 ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N365007fa3ff74856a84bb82ce252eff8 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N33c88eef4a2f46ce96c5c91e3a782ec2 ; + rdf:object _:N37c45913b1fc463f988f17c23cfa317f ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N16116dbb2d9049d28c249d3ff1bdf8e7 ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Nff39f1c1591e4587883bdcf4753f0160 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Nab3badd73b9c4aac9998606ccf2644bd ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N34f7303053704d668b7abd30f857457d ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:Na453ad06840b47e8a01beba7d49cb143 ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; + rdf:object _:N32de8ac55e904722897b3e1ca803bf07 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ] ; - rdf:object _:N37aab44093684e2cb3783b93afb19c0c ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:N0677f52302834340ae8485267af3098c ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . [] a rdf:Statement ; geo:hasGeometry [ a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral ] ; - rdf:object _:N2d4958b875ad4374a8e87b977593effb ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ] ; + rdf:object _:Nd2453ce83cdb4d749735d13ec709de80 ; rdf:predicate geo:hasGeometry ; - rdf:subject ; + rdf:subject ; rdfs:comment "supplied as" . -_:N16116dbb2d9049d28c249d3ff1bdf8e7 a geo:Geometry ; +_:N0554e74b65b943fe8edf8bad0a2747fc a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N21b639687a8f4865af7d84537b8677ff a geo:Geometry ; +_:N0677f52302834340ae8485267af3098c a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . + +_:N32de8ac55e904722897b3e1ca803bf07 a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . + +_:N34f7303053704d668b7abd30f857457d a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . -_:N2d4958b875ad4374a8e87b977593effb a geo:Geometry ; +_:N365007fa3ff74856a84bb82ce252eff8 a geo:Geometry ; geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . -_:N33c88eef4a2f46ce96c5c91e3a782ec2 a geo:Geometry ; +_:N37c45913b1fc463f988f17c23cfa317f a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . -_:N37aab44093684e2cb3783b93afb19c0c a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; - rdfs:comment "Location unknown, location of field sampling used as proxy" . - -_:N4b49ce7dd64e44cfa42aeae0f632a78d a geo:Geometry ; +_:N37fe36024a364588a67a3b841b5a86c3 a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . -_:N721243701a404be9931f4251f319de54 a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . +_:N39bae6dbeb05440eacb8cd034f3229ec a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; + rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N792620ca3c1046ccb145b4439a675c63 a geo:Geometry ; +_:N7826a22187334d108ad7199df36693fd a geo:Geometry ; geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . -_:N7c5b986ae48c4e739ab77e1152a04a9d a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . +_:N7fed5965e37249a581c30378df9ea775 a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; + rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N8e7140c707864e2f9dd31e0df57ab0ca a geo:Geometry ; - geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . +_:N885818aace7e43bf917bce0d4e3e38a1 a geo:Geometry ; + geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; + rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:N933d9d8713aa4c678aea14efddd2c938 a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . +_:N9dc79be22c84403e8891fb3bc19e7d1c a geo:Geometry ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . -_:N9ad1c94a66fe45a29198296f6fb50b5f a geo:Geometry ; +_:N9eff66228ba34c4fb3164268f8471c24 a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; rdfs:comment "Location unknown, location of field sampling used as proxy" . -_:Na453ad06840b47e8a01beba7d49cb143 a geo:Geometry ; - geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . - -_:Nab3badd73b9c4aac9998606ccf2644bd a geo:Geometry ; +_:Nc250ece147224ffb900ce69bb5adb83c a geo:Geometry ; geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . -_:Nc507d40c2480467894bee3414312a1de a geo:Geometry ; - geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . +_:Ncbdfb55e47c04510829a4227fde5773d a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . -_:Ncde070864c0b4c2ea8ad677264d116b4 a geo:Geometry ; +_:Nd2453ce83cdb4d749735d13ec709de80 a geo:Geometry ; geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . -_:Nd64752c54b6a4d4c9e645c921a3d665a a geo:Geometry ; +_:Ndc7c8d852cb340bebcf5b0a4eed6864d a geo:Geometry ; geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . -_:Nd806c902186749a5a0d599160ec8ceba a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . +_:Ne8524f09767b4e47b096234b80eb3b2a a geo:Geometry ; + geo:asWKT " POINT (115.02 -33.86)"^^geo:wktLiteral . -_:Ne2cff294718a4df3b5f7db5692cdbd07 a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; - rdfs:comment "Location unknown, location of field sampling used as proxy" . +_:Nead1c23c0d4744e8bd5febb586916c95 a geo:Geometry ; + geo:asWKT " POINT (115.01 -33.86)"^^geo:wktLiteral . -_:Ne658571dba5d4ac4b9714ae738ec1d40 a geo:Geometry ; +_:Nfc070803164d4f3d9d5e5dd09a9134c7 a geo:Geometry ; geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral . -_:Ne75462b4a28643f1a15b2c97102be89b a geo:Geometry ; - geo:asWKT " POINT (115.21 -33.8)"^^geo:wktLiteral ; - rdfs:comment "Location unknown, location of field sampling used as proxy" . +_:Nff39f1c1591e4587883bdcf4753f0160 a geo:Geometry ; + geo:asWKT " POINT (114.99 -33.86)"^^geo:wktLiteral . diff --git a/abis_mapping/templates/survey_occurrence_data_v2/mapping.py b/abis_mapping/templates/survey_occurrence_data_v2/mapping.py index 718d2f2c..83c89d3b 100644 --- a/abis_mapping/templates/survey_occurrence_data_v2/mapping.py +++ b/abis_mapping/templates/survey_occurrence_data_v2/mapping.py @@ -49,12 +49,14 @@ CONCEPT_CONSERVATION_JURISDICTION = rdflib.URIRef("http://linked.data.gov.au/def/tern-cv/755b1456-b76f-4d54-8690-10e41e25c5a7") # noqa: E501 # Roles -ROLE_ORIGINATOR = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/originator") # noqa: E501 -ROLE_RIGHTS_HOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/rightsHolder") # noqa: E501 -ROLE_RESOURCE_PROVIDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/resourceProvider") # noqa: E501 -ROLE_CUSTODIAN = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/custodian") # noqa: E501 -ROLE_STAKEHOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/stakeholder") # noqa: E501 -ROLE_OWNER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/owner") # noqa: E501 +CI_ROLECODE_ORIGINATOR = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/originator") # noqa: E501 +CI_ROLECODE_RIGHTS_HOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/rightsHolder") # noqa: E501 +CI_ROLECODE_RESOURCE_PROVIDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/resourceProvider") # noqa: E501 +CI_ROLECODE_CUSTODIAN = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/custodian") # noqa: E501 +CI_ROLECODE_STAKEHOLDER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/stakeholder") # noqa: E501 +CI_ROLECODE_OWNER = rdflib.URIRef("http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/owner") # noqa: E501 +DATA_ROLE_RESOURCE_PROVIDER = rdflib.URIRef("https://linked.data.gov.au/def/data-roles/resourceProvider") +DATA_ROLE_OWNER = rdflib.URIRef("https://linked.data.gov.au/def/data-roles/owner") # Temporary DEFAULT_SURVEY = rdflib.URIRef("http://createme.org/survey/SSD-Survey/1") # TODO -> Cross reference @@ -363,14 +365,14 @@ def apply_mapping_row( site = dataset + f"/site/{urllib.parse.quote(row['siteID'], safe='')}" if row['siteID'] else None provider_record_id_datatype = utils.rdf.uri( - internal_id=f"datatype/providerRecordID/{row['providerRecordIDSource']}", + internal_id=f"datatype/recordID/{row['providerRecordIDSource']}", namespace=base_iri, ) provider_record_id_agent = utils.rdf.uri(f"agent/{row['providerRecordIDSource']}", base_iri) # Conditionally create uris dependent on ownerRecordIDSource field if owner_record_id_source := row["ownerRecordIDSource"]: - owner_record_id_datatype = utils.rdf.uri(f"datatype/ownerRecordID/{owner_record_id_source}", base_iri) + owner_record_id_datatype = utils.rdf.uri(f"datatype/recordID/{owner_record_id_source}", base_iri) owner_record_id_provider = utils.rdf.uri(f"provider/{row['ownerRecordIDSource']}", base_iri) else: owner_record_id_datatype = None @@ -395,7 +397,7 @@ def apply_mapping_row( # Conditionally create uris dependent on otherCatalogNumbersSource field. if other_catalog_numbers_source := row["otherCatalogNumbersSource"]: other_catalog_numbers_datatype = utils.rdf.uri( - internal_id=f"datatype/otherCatalogNumbers/{other_catalog_numbers_source}", + internal_id=f"datatype/catalogNumber/{other_catalog_numbers_source}", namespace=base_iri, ) other_catalog_numbers_provider = utils.rdf.uri(f"provider/{other_catalog_numbers_source}", base_iri) @@ -435,6 +437,7 @@ def apply_mapping_row( self.add_record_number_datatype( uri=record_number_datatype, provider=provider_recorded_by, + value=recorded_by, graph=graph, ) @@ -446,9 +449,11 @@ def apply_mapping_row( ) # Add owner record id datatype - self.add_owner_record_id_datatype( + self.add_record_id_datatype( uri=owner_record_id_datatype, provider=owner_record_id_provider, + value=owner_record_id_source, + provider_role_type=DATA_ROLE_OWNER, graph=graph, ) @@ -477,9 +482,11 @@ def apply_mapping_row( ) # Add provider record ID datatype - self.add_provider_record_id_datatype( + self.add_record_id_datatype( uri=provider_record_id_datatype, - agent=provider_record_id_agent, + provider=provider_record_id_agent, + value=provider_record_id_datatype, + provider_role_type=DATA_ROLE_RESOURCE_PROVIDER, graph=graph, ) @@ -506,6 +513,7 @@ def apply_mapping_row( self.add_catalog_number_datatype( uri=catalog_number_datatype, provider=catalog_number_provider, + value=catalog_number_source, graph=graph, ) @@ -517,9 +525,10 @@ def apply_mapping_row( ) # Add other catalog numbers datatype - self.add_other_catalog_numbers_datatype( + self.add_catalog_number_datatype( uri=other_catalog_numbers_datatype, provider=other_catalog_numbers_provider, + value=other_catalog_numbers_source, graph=graph, ) @@ -1186,6 +1195,7 @@ def add_provider_recorded_by_agent( graph: rdflib.Graph, ) -> None: """Adds the provider agent to the graph. + Args: uri (rdflib.URIRef | None): Subject of the node. row (frictionless.Row): Raw data. @@ -1201,16 +1211,21 @@ def add_provider_recorded_by_agent( # Add name graph.add((uri, rdflib.SDO.name, rdflib.Literal(row['recordedBy']))) - def add_owner_record_id_datatype( + def add_record_id_datatype( self, uri: rdflib.URIRef | None, provider: rdflib.URIRef | None, + value: str | None, + provider_role_type: rdflib.URIRef, graph: rdflib.Graph, ) -> None: """Adds the owner record id datatype to the graph. + Args: uri (rdflib.URIRef): Subject of the node. provider (rdflib.URIRef): Provider of the datatype. + value (str | None): Raw value provided for the record id source. + provider_role_type (rdflib.URIRef): Role type of the provider. graph (rdflid.Graph): Graph to be modified. """ # Check to see subject provided @@ -1221,11 +1236,16 @@ def add_owner_record_id_datatype( graph.add((uri, a, rdflib.RDFS.Datatype)) # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("ownerRecordID source"))) + graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal(f"{value} recordID"))) + graph.add((uri, rdflib.SKOS.definition, rdflib.Literal("An identifier for the record"))) # Add attribution if provider is not None: - graph.add((uri, rdflib.PROV.wasAttributedTo, provider)) + qualified_attribution = rdflib.BNode() + graph.add((qualified_attribution, a, rdflib.PROV.Attribution)) + graph.add((qualified_attribution, rdflib.PROV.agent, provider)) + graph.add((qualified_attribution, rdflib.PROV.hadRole, provider_role_type)) + graph.add((uri, rdflib.PROV.qualifiedAttribution, qualified_attribution)) def add_owner_record_id_provider( self, @@ -1391,27 +1411,6 @@ def add_sampling_field( # Add Basis Of Record Attribute graph.add((uri, utils.namespaces.TERN.hasAttribute, basis)) - def add_provider_record_id_datatype( - self, - uri: rdflib.URIRef, - agent: rdflib.URIRef, - graph: rdflib.Graph, - ) -> None: - """Adds the provider record id datatype to the graph. - Args: - uri (rdflib.URIRef): Subject of the node. - agent (rdflib.URIRef): Provider agent URI. - graph (rdflib.Graph): Graph to be modified. - """ - # Add the type - graph.add((uri, a, rdflib.RDFS.Datatype)) - - # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("providerRecordID source"))) - - # Add attribution - graph.add((uri, rdflib.PROV.wasAttributedTo, agent)) - def add_provider_record_id_agent( self, uri: rdflib.URIRef, @@ -1569,12 +1568,14 @@ def add_catalog_number_datatype( self, uri: rdflib.URIRef | None, provider: rdflib.URIRef | None, + value: str | None, graph: rdflib.Graph, ) -> None: """Adds catalog number datatype to the graph. Args: uri (rdflib.URIRef | None): Subject of the node. provider (rdflib.URIRef | None): Corresponding provider. + value (str | None): Catalog number source name obtained from raw data. graph (rdflib.Graph): Graph to be modified. """ # Check subject was provided @@ -1585,7 +1586,11 @@ def add_catalog_number_datatype( graph.add((uri, a, rdflib.RDFS.Datatype)) # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("catalogNumber source"))) + if value is not None: + graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal(f"{value} catalogNumber"))) + + # Add definition + graph.add((uri, rdflib.SKOS.definition, rdflib.Literal("A catalog number for the sample"))) # Add attribution if provider is not None: @@ -1613,32 +1618,6 @@ def add_catalog_number_provider( # Add name graph.add((uri, rdflib.SDO.name, rdflib.Literal(row["catalogNumberSource"]))) - def add_other_catalog_numbers_datatype( - self, - uri: rdflib.URIRef | None, - provider: rdflib.URIRef | None, - graph: rdflib.Graph, - ) -> None: - """Adds other catalog numbers datatype to the graph. - Args: - uri (rdflib.URIRef | None): Subject of the node. - provider (rdflib.URIRef | None): Corresponding provider. - graph (rdflib.Graph): Graph to be modified. - """ - # Check subject provided - if uri is None: - return - - # Add type - graph.add((uri, a, rdflib.RDFS.Datatype)) - - # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("otherCatalogNumbers source"))) - - # Add attribution - if provider is not None: - graph.add((uri, rdflib.PROV.wasAttributedTo, provider)) - def add_other_catalog_numbers_provider( self, uri: rdflib.URIRef | None, @@ -1888,6 +1867,7 @@ def add_record_number_datatype( self, uri: rdflib.URIRef | None, provider: rdflib.URIRef | None, + value: str | None, graph: rdflib.Graph, ) -> None: """Adds record number datatype to the graph. @@ -1896,6 +1876,7 @@ def add_record_number_datatype( or None if uri wasn't created. provider (rdflib.URIRef | None): The corresponding provider uri. + value (str | None): Raw value provided in row. graph (rdflib.Graph): Graph to be modified. """ # Check subject provided @@ -1906,7 +1887,13 @@ def add_record_number_datatype( graph.add((uri, a, rdflib.RDFS.Datatype)) # Add label - graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal("recordNumber source"))) + if value is not None: + graph.add((uri, rdflib.SKOS.prefLabel, rdflib.Literal(f"{value} recordNumber"))) + + # Add definition + graph.add((uri, rdflib.SKOS.definition, rdflib.Literal( + "The record number of the original observation from the original observer of the organism" + ))) # Add attribution if provider is not None: diff --git a/tests/conftest.py b/tests/conftest.py index 65a00ca2..cf5ed17d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,6 +7,7 @@ # Third-Party import pytest import pytest_mock +import _pytest.skipping import rdflib import rdflib.compare @@ -14,7 +15,45 @@ from abis_mapping import utils # Typing -from typing import Union +from typing import Union, Any, Callable + + +# def pytest_addoption(parser: pytest.Parser) -> None: +# """Adds parser option to pytest cmd line. +# +# Adapted from https://stackoverflow.com/a/61503247 +# +# Args: +# parser (pytest.Parser): The pytest argparser. +# """ +# # Add option to parser +# parser.addoption( +# "--no-skip", +# action="store_true", +# default=False, +# help="disable skip marks", +# ) +# +# +# @pytest.hookimpl(tryfirst=True) +# def pytest_cmdline_preparse(config: pytest.Config, args: list[Any]) -> None: +# """Determines if skips will be honoured by pytest. +# +# Adapted from https://stackoverflow.com/a/61503247 +# +# Args: +# config (pytest.Config): pytest config object. +# args (list[Any]): List of items associated with hook. +# """ +# # Check for no-skip flag +# if "--no-skip" not in args: +# return +# +# def no_skip(*args: list[Any], **kwargs: dict[str, Any]) -> None: +# return +# +# # Assign no_skip as skip function within pytest +# _pytest.skipping.skip = no_skip # type: ignore[assignment] @pytest.fixture @@ -99,3 +138,9 @@ def compare_graphs( graph1=graph1, graph2=graph2, ) + + +@pytest.fixture +def graph_comparer() -> Callable[[rdflib.Graph | str, rdflib.Graph | str], bool]: + """Make a fixture out of the compare_graphs function for convenience.""" + return compare_graphs diff --git a/tests/templates/under_development/test_mapping_udev.py b/tests/templates/under_development/test_mapping_udev.py new file mode 100644 index 00000000..b91fdce6 --- /dev/null +++ b/tests/templates/under_development/test_mapping_udev.py @@ -0,0 +1,82 @@ +"""Provides tests for the template mapping modules whilst in development.""" + +# Standard +import pathlib +import dataclasses +import os + +# Third-party +import pytest +import rdflib + +# Local +from abis_mapping import base +from abis_mapping import settings +import abis_mapping.templates.incidental_occurrence_data_v3.mapping +import abis_mapping.templates.survey_occurrence_data_v2.mapping + +# Typing +from typing import Callable, Type + + +@dataclasses.dataclass +class Parameters: + mapper: Type[base.mapper.ABISMapper] + data: bytes + expected: str + + +minversion = pytest.mark.skipif( + settings.SETTINGS.MAJOR_VERSION < 5 and not os.getenv("PYTEST_NO_SKIPS"), reason="templates not released until v5" +) + + +@minversion +@pytest.mark.parametrize( + "parameters", + [ + Parameters( + mapper=abis_mapping.templates.incidental_occurrence_data_v3.mapping.IncidentalOccurrenceMapper, + data=pathlib.Path( + "abis_mapping/templates/incidental_occurrence_data_v3/examples/margaret_river_flora/margaret_river_flora.csv" # noqa: E501 + ).read_bytes(), + expected=pathlib.Path( + "abis_mapping/templates/incidental_occurrence_data_v3/examples/margaret_river_flora/margaret_river_flora.ttl" # noqa: E501 + ).read_text(), + ), + Parameters( + mapper=abis_mapping.templates.survey_occurrence_data_v2.mapping.SurveyOccurrenceMapper, + data=pathlib.Path( + "abis_mapping/templates/survey_occurrence_data_v2/examples/margaret_river_flora/margaret_river_flora.csv" # noqa: E501 + ).read_bytes(), + expected=pathlib.Path( + "abis_mapping/templates/survey_occurrence_data_v2/examples/margaret_river_flora/margaret_river_flora.ttl" # noqa: E501 + ).read_text(), + ), + ] +) +def test_apply_mapping(parameters: Parameters, graph_comparer: Callable) -> None: + """Tests apply mapping for the specific template while in development. + + Args: + parameters (Parameters): Parameters for the test. + graph_comparer (Callable): Graph comparison fixture. + """ + # Invoke + graphs: list[rdflib.Graph] = list(parameters.mapper().apply_mapping(parameters.data)) + + # Ensure only one graph + assert len(graphs) == 1 + + # Compare, output to file if not valid + if not (is_same := graph_comparer(graphs[0], parameters.expected)): + graphs[0].serialize(f"tests/templates/under_development/{parameters.mapper().template_id}-result.ttl") + assert is_same + + # Check that there are no `None`s in the Graph + # This check is important. As some fields are optional they can be `None` + # at runtime. Unfortunately, `None` is valid in many contexts in Python, + # including string formatting. This means that type-checking is unable to + # determine whether a statement is valid in our specific context. As such, + # we check here to see if any `None`s have snuck their way into the RDF. + assert "None" not in graphs[0].serialize(format="ttl")