Package org.openrefine.grel.ast
Class ArrayExpr
- java.lang.Object
-
- org.openrefine.grel.ast.FunctionCallExpr
-
- org.openrefine.grel.ast.ArrayExpr
-
- All Implemented Interfaces:
Serializable
,GrelExpr
public class ArrayExpr extends FunctionCallExpr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.openrefine.grel.ast.FunctionCallExpr
_args, _function, _sourceName
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayExpr
renameColumnDependencies(Map<String,String> substitutions)
Translates this expression by simultaneously substituting column names as the supplied map specifies.String
toString()
For GREL expressions, toString should return the source code of the expression, or a source code for an equivalent expression.-
Methods inherited from class org.openrefine.grel.ast.FunctionCallExpr
equals, evaluate, getColumnDependencies, isLocal
-
-
-
-
Constructor Detail
-
ArrayExpr
public ArrayExpr(GrelExpr[] args)
-
-
Method Detail
-
toString
public String toString()
Description copied from interface:GrelExpr
For GREL expressions, toString should return the source code of the expression, or a source code for an equivalent expression. (without the "grel:" prefix).- Specified by:
toString
in interfaceGrelExpr
- Overrides:
toString
in classFunctionCallExpr
-
renameColumnDependencies
public ArrayExpr renameColumnDependencies(Map<String,String> substitutions)
Description copied from interface:GrelExpr
Translates this expression by simultaneously substituting column names as the supplied map specifies.This is only possible if the extraction of column dependencies with
GrelExpr.getColumnDependencies(String)
succeeds (return a non-null value).- Specified by:
renameColumnDependencies
in interfaceGrelExpr
- Overrides:
renameColumnDependencies
in classFunctionCallExpr
- Parameters:
substitutions
- a map specifying new names for some columns. If a column name is not present in the map, it is assumed that the column is not renamed.- Returns:
- a new expression with updated column names.
-
-