|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.mdm.index.phonetic.impl.RefinedSoundex
Encodes a string into a refined soundex value. A refined soundex code is optimized for spell checking word. "Soundex" method originally developed by Margaret Odell and Robert Russell
| Field Summary | |
static java.lang.String |
ENCODING_TYPE
informative String about the encoding type this encoder does |
static RefinedSoundex |
US_ENGLISH
This static variable contains an instance of the RefinedSoundex using the US_ENGLISH mapping. |
static char[] |
US_ENGLISH_MAPPING
RefinedSoundex is *refined* for a number of reasons one being that the mappings have been altered. |
| Constructor Summary | |
RefinedSoundex()
Creates an instance of the RefinedSoundex object using the default US English mapping. |
|
RefinedSoundex(char[] mapping)
Creates a refined soundex instance using a custom mapping. |
|
| Method Summary | |
java.lang.Object |
encode(java.lang.Object pObject)
Encodes an Object using the refined soundex algorithm. |
java.lang.String |
encode(java.lang.String pString)
Encodes a String using the refined soundex algorithm. |
java.lang.String |
encode(java.lang.String value,
java.lang.String domain)
Encode the value using Soundex. |
java.lang.String |
getEncodingType()
|
java.lang.String |
soundex(java.lang.String str)
Retreives the Refined Soundex code for a given String object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ENCODING_TYPE
public static final RefinedSoundex US_ENGLISH
public static final char[] US_ENGLISH_MAPPING
| Constructor Detail |
public RefinedSoundex()
public RefinedSoundex(char[] mapping)
mapping - Mapping array to use when finding the corresponding
code for a given character| Method Detail |
public java.lang.Object encode(java.lang.Object pObject)
throws PhoneticEncoderException
pObject - Object to encode
PhoneticEncoderException - if the parameter supplied is not
of type java.lang.Stringpublic java.lang.String encode(java.lang.String pString)
encode in interface PhoneticEncoderpString - A String object to encode
PhoneticEncoderException - throws exception if there is an
encoding-specific problem
public java.lang.String encode(java.lang.String value,
java.lang.String domain)
encode in interface PhoneticEncodervalue - String to encodedomain - locality
PhoneticEncoderException - thrown if there is an exception during
the encoding process.public java.lang.String getEncodingType()
PhoneticEncoder
getEncodingType in interface PhoneticEncoderpublic java.lang.String soundex(java.lang.String str)
str - String to encode using the Refined Soundex algorithm
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Sun Microsystems, Inc.