This commit is contained in:
jackyq2015 2015-09-21 21:03:25 -04:00
parent ee38f9edde
commit d671d7784b
3 changed files with 10 additions and 2 deletions

View File

@ -45,7 +45,7 @@ function init() {
Packages.com.google.refine.expr.MetaParser.registerLanguageParser( Packages.com.google.refine.expr.MetaParser.registerLanguageParser(
"jython", "jython",
"Jython", "Python",
Packages.com.google.refine.jython.JythonEvaluable.createParser(), Packages.com.google.refine.jython.JythonEvaluable.createParser(),
"return value" "return value"
); );

View File

@ -1,4 +1,4 @@
name = jython name = jython
description = Google Refine Jython Extension description = Google Refine Python Extension
templating = false templating = false
requires = core requires = core

View File

@ -120,6 +120,14 @@ abstract public class MetaParser {
}, "value"); }, "value");
} }
/**
* languagePrefix will be stored in the meta model as an identifier.
* so be careful when change it as it will break the backward compatibility for the old project
* @param languagePrefix
* @param name
* @param parser
* @param defaultExpression
*/
static public void registerLanguageParser(String languagePrefix, String name, LanguageSpecificParser parser, String defaultExpression) { static public void registerLanguageParser(String languagePrefix, String name, LanguageSpecificParser parser, String defaultExpression) {
s_languages.put(languagePrefix, new LanguageInfo(name, parser, defaultExpression)); s_languages.put(languagePrefix, new LanguageInfo(name, parser, defaultExpression));
} }