Package org.dspace.browse
Class LocaleOrderingFilter
- java.lang.Object
-
- org.dspace.browse.LocaleOrderingFilter
-
- All Implemented Interfaces:
TextFilter
public class LocaleOrderingFilter extends Object implements TextFilter
Makes a sort string that is Locale dependent. Uses the same Locale for all items, regardless of source language. You can set the Locale to use by setting 'webui.browse.sort.locale' in the dspace.cfg to an ISO code. If you do not specify a Locale, then it defaults to Locale.ENGLISH. IMPORTANT: The strings that this generates are NOT human readable. Also, you will not be able to meaningfully apply any filters *after* this, however, you can apply other filters before.- Author:
- Graham Triggs
-
-
Constructor Summary
Constructors Constructor Description LocaleOrderingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringfilter(String str)Uses a Locale dependent Collator to generate a sort stringStringfilter(String str, String lang)We don't need to use the language parameter, so map this to the standard sort string filter
-
-
-
Method Detail
-
filter
public String filter(String str)
Uses a Locale dependent Collator to generate a sort string- Specified by:
filterin interfaceTextFilter- Parameters:
str- The string to parse- Returns:
- String the sort ordering text
-
filter
public String filter(String str, String lang)
We don't need to use the language parameter, so map this to the standard sort string filter- Specified by:
filterin interfaceTextFilter- Parameters:
str- stringlang- language- Returns:
- string
-
-