Package org.openrefine.expr
Class MetaParser
- java.lang.Object
-
- org.openrefine.expr.MetaParser
-
public abstract class MetaParser extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetaParser.LanguageInfo
-
Field Summary
Fields Modifier and Type Field Description protected static Map<String,MetaParser.LanguageInfo>
s_languages
-
Constructor Summary
Constructors Constructor Description MetaParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MetaParser.LanguageInfo
getLanguageInfo(String languagePrefix)
static Set<String>
getLanguagePrefixes()
static Evaluable
parse(String s)
Parse an expression that might have a language prefix into an Evaluable.static void
registerLanguageParser(String languagePrefix, String name, LanguageSpecificParser parser, String defaultExpression)
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
-
-
-
Field Detail
-
s_languages
protected static final Map<String,MetaParser.LanguageInfo> s_languages
-
-
Method Detail
-
registerLanguageParser
public static void registerLanguageParser(String languagePrefix, String name, LanguageSpecificParser parser, String defaultExpression)
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
-
getLanguageInfo
public static MetaParser.LanguageInfo getLanguageInfo(String languagePrefix)
-
parse
public static Evaluable parse(String s) throws ParsingException
Parse an expression that might have a language prefix into an Evaluable. Expressions without valid prefixes or without any prefix are assumed to be GREL expressions.- Throws:
ParsingException
-
-