Skip to content

Commit

Permalink
Rename Hierarchical to Tree for keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
claravox committed Dec 16, 2024
1 parent 8081dd0 commit bc25105
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions json_datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def get_subjects(combi):
subjects.append({'subjectScheme': 'OECD FOS 2007', 'subject': discipline})

# Assume that there is only one keyword field,
# either called HierarchicalKeyword or Keyword
if "HierarchicalKeyword" in combi:
subjects.extend(combi["HierarchicalKeyword"])
# either called TreeKeyword or Keyword
if "TreeKeyword" in combi:
subjects.extend(combi["TreeKeyword"])
else:
for keyword in combi.get('Keyword', []):
subjects.append({'subject': keyword, 'subjectScheme': 'Keyword'})
Expand Down
4 changes: 2 additions & 2 deletions json_landing_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def json_landing_page_create_json_landing_page(ctx, zone, template_name, combi_j
keywords.append({'subject': keyword, 'subjectScheme': 'Keyword'})

# From core-2 and default-3 Tag is renamed to Keyword
if "HierarchicalKeyword" in json_data:
keywords.extend(json_data.get("HierarchicalKeyword"))
if "TreeKeyword" in json_data:
keywords.extend(json_data.get("TreeKeyword"))
else:
for keyword in json_data.get('Keyword', []):
keywords.append({'subject': keyword, 'subjectScheme': 'Keyword'})
Expand Down
4 changes: 2 additions & 2 deletions schemas/epos-msl-0/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
"Version",
"Language",
"Collected",
"HierarchicalKeyword",
"TreeKeyword",
"Retention_Period",
"Data_Type",
"Data_Classification",
Expand Down Expand Up @@ -997,7 +997,7 @@
}
}
},
"HierarchicalKeyword": {
"TreeKeyword": {
"type": "array",
"additionalProperties": false,
"title": "Keywords",
Expand Down
4 changes: 2 additions & 2 deletions schemas/epos-msl-0/uischema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
}
}
},
"HierarchicalKeyword": {
"TreeKeyword": {
"ui:description": "Adding (searchable) keywords to your data package.",
"ui:field": "hierarchical_keyword_selector",
"ui:field": "tree_keyword_selector",
"ui:data": "https://raw.githubusercontent.com/UtrechtUniversity/msl_vocabularies/refs/heads/main/vocabularies/combined/editor/1.3/editor_1-3.json",
"ui:subjectScheme": "EPOS MSL",
"ui:schemeUri": "https://github.com/UtrechtUniversity/msl_vocabularies"
Expand Down

0 comments on commit bc25105

Please sign in to comment.