Skip to content

Commit

Permalink
BDRSPS-966 Update IRIs for surveyID datatype and agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Lincoln-GR committed Nov 6, 2024
1 parent a5ae325 commit ee4c718
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
36 changes: 18 additions & 18 deletions abis_mapping/templates/survey_metadata_v2/examples/minimal.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,23 @@
skos:prefLabel "Gaia Resources datasetID" ;
prov:wasAttributedTo <http://createme.org/provider/Gaia-Resources> .

<http://createme.org/datatype/surveyID/CSIRO> a rdfs:Datatype ;
skos:prefLabel "surveyID source" ;
prov:qualifiedAttribution [ a prov:Attribution ;
prov:agent <http://createme.org/agent/CSIRO> ;
prov:hadRole <http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/principalInvestigator> ] .

<http://createme.org/datatype/surveyID/NSW-Department-of-Planning-Industry-and-Environment> a rdfs:Datatype ;
skos:prefLabel "surveyID source" ;
prov:qualifiedAttribution [ a prov:Attribution ;
prov:agent <http://createme.org/agent/NSW-Department-of-Planning-Industry-and-Environment> ;
prov:hadRole <http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/principalInvestigator> ] .

<http://createme.org/project/SSD-Survey-Project/1> a bdr:Project ;
void:inDataset <http://createme.org/dataset/Example-Systematic-Survey-Metadata-Dataset> ;
schema:hasPart <http://createme.org/Survey/COL1> ;
schema:identifier "COL1" ;
schema:name "Disentangling the effects of farmland use, habitat edges, and vegetation structure on ground beetle morphological traits - Summer" .

<http://createme.org/agent/CSIRO> a prov:Agent ;
schema:name "CSIRO" .
<https://linked.data.gov.au/dataset/bdr/datatypes/surveyID/CSIRO> a rdfs:Datatype ;
skos:prefLabel "surveyID source" ;
prov:qualifiedAttribution [ a prov:Attribution ;
prov:agent <https://linked.data.gov.au/dataset/bdr/orgs/CSIRO> ;
prov:hadRole <http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/principalInvestigator> ] .

<http://createme.org/agent/NSW-Department-of-Planning-Industry-and-Environment> a prov:Agent ;
schema:name "NSW Department of Planning, Industry and Environment" .
<https://linked.data.gov.au/dataset/bdr/datatypes/surveyID/NSW-Department-of-Planning-Industry-and-Environment> a rdfs:Datatype ;
skos:prefLabel "surveyID source" ;
prov:qualifiedAttribution [ a prov:Attribution ;
prov:agent <https://linked.data.gov.au/dataset/bdr/orgs/NSW-Department-of-Planning-Industry-and-Environment> ;
prov:hadRole <http://def.isotc211.org/iso19115/-1/2018/CitationAndResponsiblePartyInformation/code/CI_RoleCode/principalInvestigator> ] .

<http://createme.org/attribute/surveyType/Wet-pitfall-trapping> a tern:Attribute ;
void:inDataset <http://createme.org/dataset/Example-Systematic-Survey-Metadata-Dataset> ;
Expand Down Expand Up @@ -121,6 +115,12 @@
rdfs:label "Insecta" ;
rdf:value <http://createme.org/bdr-cv/attribute/targetTaxonomicScope/Insecta> .

<https://linked.data.gov.au/dataset/bdr/orgs/CSIRO> a prov:Agent ;
schema:name "CSIRO" .

<https://linked.data.gov.au/dataset/bdr/orgs/NSW-Department-of-Planning-Industry-and-Environment> a prov:Agent ;
schema:name "NSW Department of Planning, Industry and Environment" .

<http://createme.org/Survey/COL1> a tern:Survey ;
bdr:purpose "Summer sampling for peak insect diversity." ;
bdr:target "Coleoptera",
Expand All @@ -132,8 +132,8 @@
time:hasEnd [ a time:Instant ;
time:inXSDDate "2015-02-03"^^xsd:date ] ] ;
prov:hadPlan <http://createme.org/Plan/COL1> ;
schema:identifier "COL1"^^<http://createme.org/datatype/surveyID/CSIRO>,
"COL1"^^<http://createme.org/datatype/surveyID/NSW-Department-of-Planning-Industry-and-Environment> ;
schema:identifier "COL1"^^<https://linked.data.gov.au/dataset/bdr/datatypes/surveyID/CSIRO>,
"COL1"^^<https://linked.data.gov.au/dataset/bdr/datatypes/surveyID/NSW-Department-of-Planning-Industry-and-Environment> ;
schema:keywords "farmland",
"ground beetle",
"habitat",
Expand Down
4 changes: 2 additions & 2 deletions abis_mapping/templates/survey_metadata_v2/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def apply_mapping_row(
survey_org_objects.append(
SurveyIDDatatype(
name=raw_org,
datatype=utils.rdf.uri(f"datatype/surveyID/{raw_org}", base_iri),
agent=utils.rdf.uri(f"agent/{raw_org}"),
datatype=utils.rdf.uri(f"surveyID/{raw_org}", utils.namespaces.BDR_DATATYPES),
agent=utils.rdf.uri(f"{raw_org}", utils.namespaces.BDR_ORGS),
)
)

Expand Down
4 changes: 4 additions & 0 deletions abis_mapping/utils/namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
CREATEME = rdflib.Namespace("http://createme.org/")
EXAMPLE = rdflib.Namespace("http://example.com/")

# BDR IRI Namespaces
BDR_DATATYPES = rdflib.Namespace("https://linked.data.gov.au/dataset/bdr/datatypes/")
BDR_ORGS = rdflib.Namespace("https://linked.data.gov.au/dataset/bdr/orgs/")

# Namespaces
GEO = rdflib.Namespace("http://www.opengis.net/ont/geosparql#")
TERN = rdflib.Namespace("https://w3id.org/tern/ontologies/tern/")
Expand Down

0 comments on commit ee4c718

Please sign in to comment.