Skip to content

Commit

Permalink
Fix bugs in the mapping rules of the interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
frmichel committed Jul 30, 2024
1 parent 644b75d commit 9f48f92
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/xr2rml/xr2rml_interactions_source_taxon.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
rr:class owl:Class.

<#TPL_intersectionOf_BN>
rr:template "intersectionOf_{$._id}_{$.taxon.referenceId}_{$.taxonStage}_{$.taxonSex}"; rr:termType rr:BlankNode.
rr:template "intersectionOf_{$.taxon.referenceId}_{$.taxonStage}_{$.taxonSex}"; rr:termType rr:BlankNode.

<#TPL_intersectionOf_list1>
rr:template "list1_{$.taxon.referenceId}_{$._id}_stage_{$.taxonStage}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.
rr:template "list1_{$.taxon.referenceId}_stage_{$.taxonStage}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.


# Stage and no sex
Expand Down Expand Up @@ -90,7 +90,7 @@
rr:predicateObjectMap [ rr:predicate rdf:rest; rr:objectMap <#TPL_intersectionOf_list2_taxon_stage> ].

<#TPL_intersectionOf_list2_taxon_stage>
rr:template "list2_{$._id}_{$.taxon.referenceId}_stage_{$.taxonStage}"; rr:termType rr:BlankNode.
rr:template "list2_{$.taxon.referenceId}_stage_{$.taxonStage}"; rr:termType rr:BlankNode.

<#TM_intersectionOf_list2_taxon_stage>
a rr:TriplesMap;
Expand All @@ -111,7 +111,7 @@
rr:predicateObjectMap [ rr:predicate rdf:rest; rr:objectMap <#TPL_intersectionOf_list2_taxon_sex> ].

<#TPL_intersectionOf_list2_taxon_sex>
rr:template "list2_{$._id}_{$.taxon.referenceId}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.
rr:template "list2_{$.taxon.referenceId}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.

<#TM_intersectionOf_list2_taxon_sex>
a rr:TriplesMap;
Expand All @@ -132,7 +132,7 @@
rr:predicateObjectMap [ rr:predicate rdf:rest; rr:objectMap <#TPL_intersectionOf_list2_taxon_stage_sex> ].

<#TPL_intersectionOf_list2_taxon_stage_sex>
rr:template "list2_{$._id}_{$.taxon.referenceId}_stage_{$.taxonStage}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.
rr:template "list2_{$.taxon.referenceId}_stage_{$.taxonStage}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.

<#TM_intersectionOf_list2_taxon_stage_sex>
a rr:TriplesMap;
Expand All @@ -143,7 +143,7 @@
rr:predicateObjectMap [ rr:predicate rdf:rest; rr:objectMap <#TPL_intersectionOf_list3_taxon_stage_sex> ].

<#TPL_intersectionOf_list3_taxon_stage_sex>
rr:template "list3_{$._id}_{$.taxon.referenceId}_stage_{$.taxonStage}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.
rr:template "list3_{$.taxon.referenceId}_stage_{$.taxonStage}_sex_{$.taxonSex}"; rr:termType rr:BlankNode.

<#TM_intersectionOf_list3_taxon_stage_sex>
a rr:TriplesMap;
Expand Down
6 changes: 3 additions & 3 deletions src/xr2rml/xr2rml_interactions_target_taxon.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
rr:class owl:Class.

<#TPL_intersectionOf_BN>
rr:template "intersectionOf_{$._id}_{$.target.referenceId}_{$.targetStage}"; rr:termType rr:BlankNode.
rr:template "intersectionOf_{$.target.referenceId}_{$.targetStage}"; rr:termType rr:BlankNode.

<#TPL_intersectionOf_list1>
rr:template "list_{$._id}_{$.target.referenceId}_{$.targetStage}"; rr:termType rr:BlankNode.
rr:template "list_{$.target.referenceId}_{$.targetStage}"; rr:termType rr:BlankNode.


<#LS_Extd_Stage> xrr:query """db.interactions.find({'targetStage': {$ne: null}})""".
Expand All @@ -64,7 +64,7 @@
rr:predicateObjectMap [ rr:predicate rdf:rest; rr:objectMap <#TPL_intersectionOf_list2_taxon_stage> ].

<#TPL_intersectionOf_list2_taxon_stage>
rr:template "sublist_{$._id}_{$.target.referenceId}_{$.targetStage}"; rr:termType rr:BlankNode.
rr:template "sublist_{$.target.referenceId}_{$.targetStage}"; rr:termType rr:BlankNode.

<#TM_intersectionOf_list2_taxon_stage>
a rr:TriplesMap;
Expand Down
11 changes: 11 additions & 0 deletions src/xr2rml/xr2rml_taxonomy_concepts.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@
.


<#TM_Name_In_Collection>
a rr:TriplesMap;
xrr:logicalSource [ xrr:query """db.taxonomy.find()"""; ];
rr:subject taxref:TaxonomicNameCollection;
rr:predicateObjectMap [
rr:predicate skos:member;
rr:objectMap [ rr:template "http://taxref.mnhn.fr/lod/name/{$.id}"; rr:termType rr:IRI; ];
].



# ---------------------------------------------------------------------------------
# Taxonomical rank for names
# ---------------------------------------------------------------------------------
Expand Down

0 comments on commit 9f48f92

Please sign in to comment.