Skip to content

Commit

Permalink
Merge pull request #335 from gaiaresources/BDRSPS-1039
Browse files Browse the repository at this point in the history
BDRSPS-1039 Add void:inDataset properties to the prov:Plan nodes
  • Loading branch information
joecrowleygaia authored Nov 19, 2024
2 parents 28e38f7 + aeebc3c commit a66d850
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
schema:name "Disentangling the effects of farmland use, habitat edges, and vegetation structure on ground beetle morphological traits - Summer" .

<http://createme.org/survey/plan/COL1> a prov:Plan ;
void:inDataset <http://createme.org/dataset/Example-Systematic-Survey-Metadata-Dataset> ;
schema:citation "Ng, K., Barton, P.S., Blanchard, W. et al. Disentangling the effects of farmland use, habitat edges, and vegetation structure on ground beetle morphological traits. Oecologia 188, 645–657 (2018). https://doi.org/10.1007/s00442-018-4180-9\"" ;
schema:description "Our experimental design consisted of four 400 m transects running from inside each woodland patch out into four adjoining farmland uses (crop, rested, woody debris application, revegetation plantings). To quantify potential edge efects on beetle species traits, we sampled beetles at five locations along each transect: 200 and 20 m inside woodlands, 200 and 20 m inside farmlands, and at the woodland–farmland edge (0 m). Each sampling location comprised a pair of wet invertebrate pitfall traps. separated by a drift fence (60 cm long x 10 cm high) to help direct arthropods into traps. We opened a total of 220 pairs of traps for 14 days during spring (Oct–Nov 2014), and repeated sampling during summer (January–February 2015). Beetle samples from each pitfall trap pair, and across the two time periods, were pooled to provide one sample per sampling location." ;
schema:url "https://biocollect.ala.org.au/document/download/2022-01/202201%20CBR%20Flora%20and%20Vegetation%20report_draftv1.pdf"^^xsd:anyURI,
Expand Down
6 changes: 6 additions & 0 deletions abis_mapping/templates/survey_metadata_v2/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def apply_mapping_row(
self.add_plan(
uri=survey_plan,
row=row,
dataset=dataset,
graph=graph,
)

Expand Down Expand Up @@ -626,18 +627,23 @@ def add_plan(
self,
uri: rdflib.URIRef,
row: frictionless.Row,
dataset: rdflib.URIRef,
graph: rdflib.Graph,
) -> None:
"""Adds plan to graph.
Args:
uri: Plan reference.
row: Raw data row.
dataset: URI for the dataset node.
graph: Graph to be modified.
"""
# Add type
graph.add((uri, a, rdflib.PROV.Plan))

# add link to dataset
graph.add((uri, rdflib.VOID.inDataset, dataset))

# Add citation(s)
if citations := row["surveyMethodCitation"]:
for citation in citations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,17 @@
rdf:value <http://createme.org/bdr-cv/attribute/targetTaxonomicScope/new-taxon> .

<http://createme.org/visit/plan/TIS-24-03-P1-01> a prov:Plan ;
void:inDataset <http://createme.org/dataset/Example-Systematic-Survey-Site-Visit-Dataset> ;
sosa:usedProcedure <https://linked.data.gov.au/def/nrm/4caf0cde-9ffb-56c2-bdc6-17c4c2a7275a> ;
schema:description "10 x square buckets of size 20 x 20 x 15 cm. Propylene glycol." .

<http://createme.org/visit/plan/TIS-24-03-P1-02> a prov:Plan ;
void:inDataset <http://createme.org/dataset/Example-Systematic-Survey-Site-Visit-Dataset> ;
sosa:usedProcedure <http://createme.org/bdr-cv/attribute/protocolName/litter-sifting> ;
schema:description "50 cm diameter sifter with 5 mm mesh. Litter samles taken ~1 metre from each pitfall trap" .

<http://createme.org/visit/plan/TIS-24-03-P1-03> a prov:Plan ;
void:inDataset <http://createme.org/dataset/Example-Systematic-Survey-Site-Visit-Dataset> ;
sosa:usedProcedure <http://linked.data.gov.au/def/tern-cv/ea1d6342-1901-4f88-8482-3111286ec157> .

<https://linked.data.gov.au/dataset/bdr/orgs/DBCA> a prov:Agent,
Expand Down
3 changes: 3 additions & 0 deletions abis_mapping/templates/survey_site_visit_data_v2/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,9 @@ def add_site_visit_plan(
# Add subject type
graph.add((uri, a, rdflib.PROV.Plan))

# add link to dataset
graph.add((uri, rdflib.VOID.inDataset, dataset))

# Add description
row_protocol_description: str | None = row["protocolDescription"]
if row_protocol_description:
Expand Down

0 comments on commit a66d850

Please sign in to comment.