delegate = OrderFormat.getDelegate(type); if (delegate != null) { return delegate.makeSortString(value, language);
/** * Normalize the title of a Metadatum. * * @param value metadata value * @return normalized title */ protected String normalizeTitle(MetadataValue value) { if (!"title".equals(element)) { return value.getValue(); } return OrderFormat.makeSortString(value.getValue(), value.getLanguage(), OrderFormat.TITLE); } }
/** * Return a normalized focus value. If there is no normalization that can be performed, * return the focus value that is passed in. * * @param value a focus value to normalize * @return the normalized focus value * @throws BrowseException if browse error */ private String normalizeJumpToValue(String value) throws BrowseException { // If the scope has a focus value (focus by value) if (scope.hasJumpToValue()) { // Normalize it based on the specified language as appropriate for this index return OrderFormat.makeSortString(scope.getJumpToValue(), scope.getJumpToValueLang(), scope.getBrowseIndex().getDataType()); } else if (scope.hasStartsWith()) { // Scope has a starts with, so normalize that instead return OrderFormat.makeSortString(scope.getStartsWith(), null, scope.getBrowseIndex().getDataType()); } // No focus value on the scope (ie. focus by id), so just return the passed focus value // This is useful in cases where we have pulled a focus value from the index // which will already be normalized, and avoids another DB lookup return value; }
.isNotBlank(preferedLabel)) { String nLabel = OrderFormat .makeSortString( preferedLabel, values.get(x).getLanguage(), for (String var : variants) { String nVal = OrderFormat .makeSortString( var, values.get(x).getLanguage(), .makeSortString( values.get(x).getValue(), values.get(x).getLanguage(), if (dcvalue != null && dcvalue.size() > 0) { String nValue = OrderFormat .makeSortString(dcvalue.get(0).getValue(), dcvalue.get(0).getLanguage(), so.getType()); document.addField("bi_sort_" + so.getNumber() + "_sort", nValue);
value = OrderFormat.makeSortString(value, scope.getFilterValueLang(), scope.getBrowseIndex().getDataType());