Package org.dspace.text.filter
Class InitialArticleWord
java.lang.Object
org.dspace.text.filter.InitialArticleWord
- All Implemented Interfaces:
TextFilter
- Direct Known Subclasses:
MARC21InitialArticleWord,StandardInitialArticleWord
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 -
Method Summary
Modifier and TypeMethodDescriptionWhen no language is passed, use null and let implementation decide what to doDo 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
-
Constructor Details
-
InitialArticleWord
protected InitialArticleWord(boolean stripWord) -
InitialArticleWord
protected InitialArticleWord()
-
-
Method Details
-
filter
When no language is passed, use null and let implementation decide what to do- Specified by:
filterin interfaceTextFilter
-
filter
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
-
getArticleWords
Abstract method to get the list of words to use in the initial word filter- Parameters:
lang- The language to retrieve article words for- Returns:
- An array of definite/indefinite article words
-