mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Fix skos parser to not replace Product type URI by dfc-pt
The given productType.rdf file doesn't give us any context for `dfc-pt`, so there was no reason to do that. We still need to do some substitution in the importer, as some times we are given `dfc-pt` as input data.
This commit is contained in:
@@ -130,8 +130,8 @@ module DataFoodConsortium
|
||||
"https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#",
|
||||
"dfc-m:"
|
||||
).sub(
|
||||
"https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#",
|
||||
"dfc-pt:"
|
||||
"dfc-pt:",
|
||||
"https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#"
|
||||
)
|
||||
|
||||
SKOSParser.concepts[id]
|
||||
|
||||
@@ -90,13 +90,8 @@ module DataFoodConsortium
|
||||
prefLabels: element.label
|
||||
)
|
||||
skosConcept.semanticType = element.type
|
||||
# Gaetan's fix for productTypes
|
||||
id = element.id.sub(
|
||||
"https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#",
|
||||
"dfc-pt:"
|
||||
)
|
||||
# Maikel's patch
|
||||
self.class.concepts[id] = skosConcept
|
||||
self.class.concepts[element.id] = skosConcept
|
||||
skosConcept
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user