SKOS parser, user shorten version for product types URI

This commit is contained in:
Gaetan Craig-Riou
2023-12-14 15:43:15 +11:00
parent a2cb1f4c37
commit 2be1aea64c

View File

@@ -90,8 +90,13 @@ 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[element.id] = skosConcept
self.class.concepts[id] = skosConcept
skosConcept
end