mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
port pr1770
This commit is contained in:
@@ -145,7 +145,11 @@ public class DSpaceControlledVocabulary extends SelfNamedPlugin implements Choic
|
|||||||
public Choices getMatches(String field, String text, Collection collection, int start, int limit, String locale) {
|
public Choices getMatches(String field, String text, Collection collection, int start, int limit, String locale) {
|
||||||
init();
|
init();
|
||||||
log.debug("Getting matches for '" + text + "'");
|
log.debug("Getting matches for '" + text + "'");
|
||||||
String xpathExpression = String.format(xpathTemplate, text.replaceAll("'", "'").toLowerCase());
|
String xpathExpression = "";
|
||||||
|
String[] textHierarchy = text.split(hierarchyDelimiter, -1);
|
||||||
|
for (int i = 0; i < textHierarchy.length; i++) {
|
||||||
|
xpathExpression += String.format(xpathTemplate, textHierarchy[i].replaceAll("'", "'").toLowerCase());
|
||||||
|
}
|
||||||
XPath xpath = XPathFactory.newInstance().newXPath();
|
XPath xpath = XPathFactory.newInstance().newXPath();
|
||||||
Choice[] choices;
|
Choice[] choices;
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user