Skip to content

Commit cd3f360

Browse files
authored
add thesaurus handling to ISO import (#226)
1 parent bafedfb commit cd3f360

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pygeometa/schemas/iso19139/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,15 @@ def import_(self, metadata: str) -> dict:
123123
for count, value in enumerate(identification.keywords):
124124
key = f'keywords-{count}'
125125
mcf['identification']['keywords'][key] = {
126-
'type': value.type,
126+
'keywords_type': value.type,
127127
'keywords': [k.name for k in value.keywords]
128128
}
129+
if value.thesaurus is not None:
130+
mcf['identification']['keywords'][key]['vocabulary'] = {
131+
'name': value.thesaurus['title'],
132+
'url': value.thesaurus['url']
133+
}
134+
129135
mcf['identification']['topiccategory'] = identification.topiccategory # noqa
130136

131137
mcf['identification']['extents'] = {

0 commit comments

Comments
 (0)