org.dspace.browse
Class LocaleOrderingFilter

java.lang.Object
  extended by 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
LocaleOrderingFilter()
           
 
Method Summary
 String filter(String str)
          Uses a Locale dependent Collator to generate a sort string
 String filter(String str, String lang)
          We don't need to use the language parameter, so map this to the standard sort string filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleOrderingFilter

public LocaleOrderingFilter()
Method Detail

filter

public String filter(String str)
Uses a Locale dependent Collator to generate a sort string

Specified by:
filter in interface TextFilter
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:
filter in interface TextFilter


Copyright © 2010 DuraSpace. All Rights Reserved.