Skip to content

Commit

Permalink
Simplify inclusion of units for values relating to observatories (htt…
Browse files Browse the repository at this point in the history
  • Loading branch information
laurianvm committed Oct 22, 2024
1 parent aae9cd7 commit bdac9e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions templates/sediment_observatory.ldt.ttl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,10 @@ Sets:
{#- emobon ontology extension predicates #}
{%- if _.tot_depth_water_col != "NA" %}
emobon-sampling:waterColumnDepth [
a sosa:Observation ;
sosa:hasResult [
rdf:type qudt:QuantityValue ;
a qudt:QuantityValue ;
qudt:numericValue {{_.tot_depth_water_col | xsd("integer") | safe }} ; {#- usefull to also connect to sampling_event/sample #}
{%- for row in sets['schema']%}
{%- if row['LogsheetTab'] == 'Measured' and not row['LogsheetColumnTitle'].endswith('_method') and _[row['LogsheetColumnTitle']] and _[row['LogsheetColumnTitle']] != "NA" %}
{%- if row['LogsheetColumnTitle'] == 'tot_depth_water_col' %}
{%- if row['Unit_URL'] and row['Unit_URL'] != "NA" %}
qudt:unit <{{row['Unit_URL'].strip() | safe }}> ;
{%- elif row['Unit'] and row['Unit'] != "NA" %}
Expand All @@ -126,7 +124,6 @@ Sets:
{%- endif %}
{%- endfor %}
] ;
] ;
{%- endif %}
{%- if _.geo_loc_name != "NA" %}
emobon-sampling:originCountry {{_.geo_loc_name | xsd("string") | safe }} ; {#- usefull to also connect to sampling_event/sample #}
Expand Down
9 changes: 3 additions & 6 deletions templates/water_observatory.ldt.ttl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,18 @@ Sets:
{#- emobon ontology extension predicates #}
{%- if _.tot_depth_water_col != "NA" %}
emobon-sampling:waterColumnDepth [
a sosa:Observation ;
sosa:hasResult [
rdf:type qudt:QuantityValue ;
a qudt:QuantityValue ;
qudt:numericValue {{_.tot_depth_water_col | xsd("integer") | safe }} ; {#- usefull to also connect to sampling_event/sample #}
{%- for row in sets['schema']%}
{%- if row['LogsheetTab'] == 'Measured' and not row['LogsheetColumnTitle'].endswith('_method') and _[row['LogsheetColumnTitle']] and _[row['LogsheetColumnTitle']] != "NA" %}
{%- if row['LogsheetColumnTitle'] == 'tot_depth_water_col' %}
{%- if row['Unit_URL'] and row['Unit_URL'] != "NA" %}
qudt:unit <{{row['Unit_URL'].strip() | safe }}> ;
{%- elif row['Unit'] and row['Unit'] != "NA" %}
qudt:unit {{row['Unit'].strip() | xsd('string') | safe }} ;
{%- endif %}
{%- endif %}
{%- endfor %}
] ;
] ;
] ;
{%- endif %}
{%- if _.geo_loc_name != "NA" %}
emobon-sampling:originCountry {{_.geo_loc_name | xsd("string") | safe }} ; {#- usefull to also connect to sampling_event/sample #}
Expand Down

0 comments on commit bdac9e0

Please sign in to comment.