private static void setDisplayNames (final @Nonnull Entity entity, final @Nonnull LocalizedDisplayable displayable) { final SortedMap<String, Locale> sortedMap = new TreeMap<String, Locale>(); for (final Entry<Locale, String> entry : displayable.getDisplayNames().entrySet()) { if (!entry.getValue().equals("")) { sortedMap.put(languageCode(entry.getKey()), entry.getKey()); } } for (final Entry<String, Locale> entry : sortedMap.entrySet()) { final Locale locale = entry.getValue(); RDFUtils.setDisplayName(entity, displayable.getDisplayName(locale), locale); } }