Package org.dspace.text.filter
Class InitialArticleWord
- java.lang.Object
-
- org.dspace.text.filter.InitialArticleWord
-
- All Implemented Interfaces:
TextFilter
- Direct Known Subclasses:
MARC21InitialArticleWord,StandardInitialArticleWord
public abstract class InitialArticleWord extends Object implements TextFilter
Abstract class for implementing initial article word filters Allows you to create new classes with their own rules for mapping languages to article word lists.- Author:
- Graham Triggs
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedInitialArticleWord()protectedInitialArticleWord(boolean stripWord)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringfilter(String str)When no language is passed, use null and let implementation decide what to doStringfilter(String str, String lang)Do an initial definite/indefinite article filter on the passed string.protected abstract String[]getArticleWords(String lang)Abstract method to get the list of words to use in the initial word filter
-
-
-
Method Detail
-
filter
public String filter(String str)
When no language is passed, use null and let implementation decide what to do- Specified by:
filterin interfaceTextFilter
-
filter
public String filter(String str, String lang)
Do an initial definite/indefinite article filter on the passed string. On matching an initial word, can strip or move to the end, depending on the configuration of the implementing class.- Specified by:
filterin interfaceTextFilter- Parameters:
str- The string to parselang- The language of the passed string- Returns:
- String The filtered string
-
-