Skip to content

Commit

Permalink
Update core/src/main/java/org/fao/geonet/util/XslUtil.java
Browse files Browse the repository at this point in the history
Co-authored-by: Jose García <[email protected]>
  • Loading branch information
fxprunayre and josegar74 authored Sep 19, 2024
1 parent 3649850 commit 5e41d1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/main/java/org/fao/geonet/util/XslUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,13 @@ public static String getThesaurusIdByTitle(String title) {
return thesaurus == null ? "" : "geonetwork.thesaurus." + thesaurus.getKey();
}

public static String getThesaurusTitleByName(String id) {
/**
* Retrieve the thesaurus title using the thesaurus key.
*
* @param id the thesaurus key
* @return the thesaurus title or empty string if the thesaurus doesn't exist.
*/
public static String getThesaurusTitleByKey(String id) {
ApplicationContext applicationContext = ApplicationContextHolder.get();
ThesaurusManager thesaurusManager = applicationContext.getBean(ThesaurusManager.class);
Thesaurus thesaurus = thesaurusManager.getThesaurusByName(id);
Expand Down

0 comments on commit 5e41d1f

Please sign in to comment.