|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.strategy.DefaultPluralStemmer
public class DefaultPluralStemmer
A default implementation of the plural name stemmer which tests for some common english plural/singular patterns and then uses a simple starts-with algorithm
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Log used for logging (Doh!) |
Constructor Summary | |
---|---|
DefaultPluralStemmer()
|
Method Summary | |
---|---|
ElementDescriptor |
findPluralDescriptor(java.lang.String propertyName,
java.util.Map map)
Algorithm supports common english plural patterns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public DefaultPluralStemmer()
Method Detail |
---|
public ElementDescriptor findPluralDescriptor(java.lang.String propertyName, java.util.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 searched
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |