Get language-aware results for existing labels in ManageLabelsForPersonGenerator

This commit is contained in:
Brian Lowe 2021-05-28 15:52:16 +03:00
parent 9652127081
commit 43289ba71e

View file

@ -439,21 +439,20 @@ public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerat
ArrayList<Literal> labels = new ArrayList<Literal>();
try {
//We want to get the labels for all the languages, not just the display language
ResultSet results = QueryUtils.getLanguageNeutralQueryResults(queryStr, vreq);
// No longer retrieving language-neutral results here, so that
// language editing is consistent with other editing forms.
// Editable values depend on the interface's locale selector.
ResultSet results = QueryUtils.getQueryResults(queryStr, vreq);
while (results.hasNext()) {
QuerySolution soln = results.nextSolution();
Literal nodeLiteral = soln.get("label").asLiteral();
labels.add(nodeLiteral);
}
} catch (Exception e) {
log.error(e, e);
}
return labels;
}
}
//Putting this into a method allows overriding it in subclasses