Class AbstractTextFilterOFD

java.lang.Object
org.dspace.sort.AbstractTextFilterOFD
All Implemented Interfaces:
OrderFormatDelegate
Direct Known Subclasses:
OrderFormatAuthor, OrderFormatText, OrderFormatTitle, OrderFormatTitleMarc21

public abstract class AbstractTextFilterOFD extends Object implements OrderFormatDelegate
Helper class for creating order delegates. To configure the filters create a subclass and, in an object initializer, create an array of classes that implement TextFilter: class MyLocaleDelegate extends AbstractTextFilterOFD { { filters = new TextFilter[] { new LocaleOrderingFilter(); } } } The order they are in the array, is the order that they are executed. (this may be important for some filters - read their documentation!) Example configurations that could be used: { new DecomposeDiactritics(), new StripDiacritics(), new LowerCaseAndTrim() } - Decompose and then strip the diacritics, lowercase and trim the string. { new MARC21InitialArticleWord(), new DecomposeDiactritics(), new LowerCaseTrim() } - Parse the initial article words based on the Library of Congress list of definite/indefinite article words, decompose diacritics, and lowercase/trim. { new LowerCaseTrim(), new LocaleOrderingFilter() } - Lowercase the string, then make a locale dependent sort text (note that the sort text is not human readable)
Author:
Graham Triggs
  • Field Details

  • Constructor Details

    • AbstractTextFilterOFD

      public AbstractTextFilterOFD()
  • Method Details

    • makeSortString

      public String makeSortString(String value, String language)
      Prepare the appropriate sort string for the given value in the given language. Language should be supplied with the ISO-6390-1 or ISO-639-2 standards. For example "en" or "eng".
      Specified by:
      makeSortString in interface OrderFormatDelegate
      Parameters:
      value - the string value
      language - the language to interpret in
      Returns:
      the sort string