Package org.openrefine.wikidata.schema
Class WbLanguageVariable
java.lang.Object
org.openrefine.wikidata.schema.WbVariableExpr<String>
org.openrefine.wikidata.schema.WbLanguageVariable
- All Implemented Interfaces:
WbExpression<String>
A language variable generates a language code from a cell. It checks its
values against a known list of valid language codes and fixes on the fly the
deprecated ones (see
WbLanguageConstant).-
Constructor Summary
ConstructorsConstructorDescriptionWbLanguageVariable(String columnName) Constructs a variable and sets the column it is bound to. -
Method Summary
Methods inherited from class org.openrefine.wikidata.schema.WbVariableExpr
equalAsVariables, evaluate, getColumnName, hashCode, setColumnName
-
Constructor Details
-
WbLanguageVariable
public WbLanguageVariable() -
WbLanguageVariable
Constructs a variable and sets the column it is bound to. Mostly used as a convenience method for testing.- Parameters:
columnName- the name of the column the expression should draw its value from
-
-
Method Details
-
fromCell
Description copied from class:WbVariableExprMethod that should be implemented by subclasses, converting an OpenRefine cell to a Wikibase value. Access to other values and emitting warnings is possible via the supplied EvaluationContext object.- Specified by:
fromCellin classWbVariableExpr<String>- Parameters:
cell- the cell to convertctxt- the evaluation context- Returns:
- the corresponding Wikibase value
- Throws:
SkipSchemaExpressionException
-
equals
-