issue 69 fixed. ControlFunctionRegistry now correctly registers Chomp expression as "chomp" key.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1024 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
a9f77d0f51
commit
f0ed50e468
@ -35,6 +35,7 @@ import com.metaweb.gridworks.expr.functions.math.Mod;
|
|||||||
import com.metaweb.gridworks.expr.functions.math.Pow;
|
import com.metaweb.gridworks.expr.functions.math.Pow;
|
||||||
import com.metaweb.gridworks.expr.functions.math.Round;
|
import com.metaweb.gridworks.expr.functions.math.Round;
|
||||||
import com.metaweb.gridworks.expr.functions.math.Sum;
|
import com.metaweb.gridworks.expr.functions.math.Sum;
|
||||||
|
import com.metaweb.gridworks.expr.functions.strings.Chomp;
|
||||||
import com.metaweb.gridworks.expr.functions.strings.Contains;
|
import com.metaweb.gridworks.expr.functions.strings.Contains;
|
||||||
import com.metaweb.gridworks.expr.functions.strings.Diff;
|
import com.metaweb.gridworks.expr.functions.strings.Diff;
|
||||||
import com.metaweb.gridworks.expr.functions.strings.EndsWith;
|
import com.metaweb.gridworks.expr.functions.strings.EndsWith;
|
||||||
@ -78,10 +79,10 @@ public class ControlFunctionRegistry {
|
|||||||
|
|
||||||
static private Map<String, Function> s_nameToFunction = new HashMap<String, Function>();
|
static private Map<String, Function> s_nameToFunction = new HashMap<String, Function>();
|
||||||
static private Map<Function, String> s_functionToName = new HashMap<Function, String>();
|
static private Map<Function, String> s_functionToName = new HashMap<Function, String>();
|
||||||
|
|
||||||
static private Map<String, Control> s_nameToControl = new HashMap<String, Control>();
|
static private Map<String, Control> s_nameToControl = new HashMap<String, Control>();
|
||||||
static private Map<Control, String> s_controlToName = new HashMap<Control, String>();
|
static private Map<Control, String> s_controlToName = new HashMap<Control, String>();
|
||||||
|
|
||||||
static public Function getFunction(String name) {
|
static public Function getFunction(String name) {
|
||||||
return s_nameToFunction.get(name);
|
return s_nameToFunction.get(name);
|
||||||
}
|
}
|
||||||
@ -114,15 +115,15 @@ public class ControlFunctionRegistry {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
registerFunction("type", new Type());
|
registerFunction("type", new Type());
|
||||||
|
|
||||||
registerFunction("toString", new ToString());
|
registerFunction("toString", new ToString());
|
||||||
registerFunction("toNumber", new ToNumber());
|
registerFunction("toNumber", new ToNumber());
|
||||||
registerFunction("toDate", new ToDate());
|
registerFunction("toDate", new ToDate());
|
||||||
|
|
||||||
registerFunction("toUppercase", new ToUppercase());
|
registerFunction("toUppercase", new ToUppercase());
|
||||||
registerFunction("toLowercase", new ToLowercase());
|
registerFunction("toLowercase", new ToLowercase());
|
||||||
registerFunction("toTitlecase", new ToTitlecase());
|
registerFunction("toTitlecase", new ToTitlecase());
|
||||||
|
|
||||||
registerFunction("get", new Get());
|
registerFunction("get", new Get());
|
||||||
registerFunction("slice", new Slice());
|
registerFunction("slice", new Slice());
|
||||||
registerFunction("substring", new Slice());
|
registerFunction("substring", new Slice());
|
||||||
@ -143,7 +144,7 @@ public class ControlFunctionRegistry {
|
|||||||
registerFunction("unicode", new Unicode());
|
registerFunction("unicode", new Unicode());
|
||||||
registerFunction("unicodeType", new UnicodeType());
|
registerFunction("unicodeType", new UnicodeType());
|
||||||
registerFunction("diff", new Diff());
|
registerFunction("diff", new Diff());
|
||||||
registerFunction("chomp", new Diff());
|
registerFunction("chomp", new Chomp());
|
||||||
registerFunction("fingerprint", new Fingerprint());
|
registerFunction("fingerprint", new Fingerprint());
|
||||||
registerFunction("ngramFingerprint", new NGramFingerprint());
|
registerFunction("ngramFingerprint", new NGramFingerprint());
|
||||||
registerFunction("phonetic", new Phonetic());
|
registerFunction("phonetic", new Phonetic());
|
||||||
@ -151,7 +152,7 @@ public class ControlFunctionRegistry {
|
|||||||
registerFunction("jsonize", new Jsonize());
|
registerFunction("jsonize", new Jsonize());
|
||||||
registerFunction("ngram", new NGram());
|
registerFunction("ngram", new NGram());
|
||||||
registerFunction("match", new Match());
|
registerFunction("match", new Match());
|
||||||
|
|
||||||
registerFunction("indexOf", new IndexOf());
|
registerFunction("indexOf", new IndexOf());
|
||||||
registerFunction("lastIndexOf", new LastIndexOf());
|
registerFunction("lastIndexOf", new LastIndexOf());
|
||||||
registerFunction("startsWith", new StartsWith());
|
registerFunction("startsWith", new StartsWith());
|
||||||
@ -163,7 +164,7 @@ public class ControlFunctionRegistry {
|
|||||||
registerFunction("now", new Now());
|
registerFunction("now", new Now());
|
||||||
registerFunction("inc", new Inc());
|
registerFunction("inc", new Inc());
|
||||||
registerFunction("datePart", new DatePart());
|
registerFunction("datePart", new DatePart());
|
||||||
|
|
||||||
registerFunction("round", new Round());
|
registerFunction("round", new Round());
|
||||||
registerFunction("floor", new Floor());
|
registerFunction("floor", new Floor());
|
||||||
registerFunction("ceil", new Ceil());
|
registerFunction("ceil", new Ceil());
|
||||||
@ -175,20 +176,20 @@ public class ControlFunctionRegistry {
|
|||||||
registerFunction("pow", new Pow());
|
registerFunction("pow", new Pow());
|
||||||
registerFunction("exp", new Exp());
|
registerFunction("exp", new Exp());
|
||||||
registerFunction("sum", new Sum());
|
registerFunction("sum", new Sum());
|
||||||
|
|
||||||
registerFunction("and", new And());
|
registerFunction("and", new And());
|
||||||
registerFunction("or", new Or());
|
registerFunction("or", new Or());
|
||||||
registerFunction("not", new Not());
|
registerFunction("not", new Not());
|
||||||
|
|
||||||
registerFunction("cross", new Cross());
|
registerFunction("cross", new Cross());
|
||||||
|
|
||||||
registerFunction("facetCount", new FacetCount());
|
registerFunction("facetCount", new FacetCount());
|
||||||
|
|
||||||
registerControl("if", new If());
|
registerControl("if", new If());
|
||||||
registerControl("with", new With());
|
registerControl("with", new With());
|
||||||
registerControl("forEach", new ForEach());
|
registerControl("forEach", new ForEach());
|
||||||
registerControl("forNonBlank", new ForNonBlank());
|
registerControl("forNonBlank", new ForNonBlank());
|
||||||
|
|
||||||
registerControl("isNull", new IsNull());
|
registerControl("isNull", new IsNull());
|
||||||
registerControl("isNotNull", new IsNotNull());
|
registerControl("isNotNull", new IsNotNull());
|
||||||
registerControl("isBlank", new IsBlank());
|
registerControl("isBlank", new IsBlank());
|
||||||
|
Loading…
Reference in New Issue
Block a user