public class DefaultPluralStemmer extends Object implements PluralStemmer
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
Log used for logging (Doh!)
|
Constructor and Description |
---|
DefaultPluralStemmer() |
Modifier and Type | Method and Description |
---|---|
ElementDescriptor |
findPluralDescriptor(String propertyName,
Map map)
Algorithm supports common english plural patterns.
|
public ElementDescriptor findPluralDescriptor(String propertyName, Map map)
Algorithm supports common english plural patterns.
First, common english plural constructions will be tried.
If the property doesn't end with 'y'
then this method will look for
a property with which has 'es'
appended.
If the property ends with 'y'
then a property with the 'y'
replaced by 'ies'
will be searched for.
If no matches are found then - if one exists - a property starting with the singular name will be returned.
findPluralDescriptor
in interface PluralStemmer
propertyName
- the property name string to matchmap
- the Map
containing the ElementDescriptor
's
to be searchedCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.