org.axiondb.functions
Class SoundexFunction
java.lang.Object
org.axiondb.BaseSelectable
org.axiondb.functions.BaseFunction
org.axiondb.functions.SoundexFunction
- All Implemented Interfaces:
- Serializable, Function, FunctionFactory, ConcreteFunction, ScalarFunction, Selectable
- Direct Known Subclasses:
- DifferenceFunction, SoundsLikeFunction
public class SoundexFunction
- extends BaseFunction
- implements ScalarFunction, FunctionFactory
- Version:
- $Revision: 1.2 $ $Date: 2004/09/09 23:47:44 $
- See Also:
- Serialized Form
Methods inherited from class org.axiondb.functions.BaseFunction |
addArgument, getAlias, getArgument, getArgumentCount, getLabel, getName, setAlias, setArgument, setName, setVariableContext, toString |
SoundexFunction
public SoundexFunction()
- Creates a new instance of Class
SoundexFunction
public SoundexFunction(String name)
- Creates a new instance of Class
makeNewInstance
public ConcreteFunction makeNewInstance()
- Specified by:
makeNewInstance
in interface FunctionFactory
getDataType
public DataType getDataType()
StringType
- Specified by:
getDataType
in interface Selectable
- Specified by:
getDataType
in class BaseFunction
evaluate
public Object evaluate(RowDecorator row)
throws AxionException
- Specified by:
evaluate
in interface ScalarFunction
- Specified by:
evaluate
in interface Selectable
- Throws:
AxionException
isValid
public boolean isValid()
- Specified by:
isValid
in interface ConcreteFunction
- Specified by:
isValid
in class BaseFunction
soundex
public static String soundex(String s)
- Returns a four character code representing the sound of the given
String
. Non-ASCCI characters in the input String
are
ignored.
This method was rewritten for Axion to comply with the description at
http://www.nara.gov/genealogy/coding.html .
- Parameters:
s
- the String
for which to calculate the 4 character
SOUNDEX
value
- Returns:
- the 4 character
SOUNDEX
value for the given
String