Skip to content

Commit

Permalink
fix: adjust mapping implementations
Browse files Browse the repository at this point in the history
Revisit the justification for SSSOM mapping predicates. In some cases,
implementations shouldn't have been made at all. In others, logic is
needed to decide whether the value should be returned or not.
Specifically:

- Remove `schema:minValue` and `schema:maxValue` due to definitional
mismatches that break the exact match.
- Move `time:hasTRS` to the same level as `time:TimePosition` to follow
OWL time conventions.

Related to SSSOM changes in commit:
384fc5e
  • Loading branch information
clnsmth authored Jul 22, 2024
1 parent b0f0baa commit df72499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/soso/strategies/eml.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def get_variable_measured(self) -> Union[list, None]:
"measurementTechnique": get_methods(item),
"unitText": item.findtext(".//standardUnit")
or item.findtext(".//customUnit"),
"minValue": item.findtext(".//minimum"),
"maxValue": item.findtext(".//maximum"),
}
property_value = {
key: value for key, value in property_value.items() if value is not None
Expand Down Expand Up @@ -434,16 +432,16 @@ def convert_single_date_time_type(
"@type": "time:Instant",
"time:inTimePosition": {
"@type": "time:TimePosition",
"time:hasTRS": {
"@type": "xsd:string",
"value": single_date_time.findtext(".//timeScaleName"),
},
"time:numericPosition": {
"@type": "xsd:decimal",
"value": numeric_position,
},
},
"gstime:uncertainty": {"@type": "xsd:decimal", "value": uncertainty},
"time:hasTRS": {
"@type": "xsd:string",
"value": single_date_time.findtext(".//timeScaleName"),
},
}
return instant

Expand Down
Loading

0 comments on commit df72499

Please sign in to comment.