Package org.openrefine.wikibase.schema
Class WbStringVariable
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbVariableExpr<org.wikidata.wdtk.datamodel.interfaces.StringValue>
-
- org.openrefine.wikibase.schema.WbStringVariable
-
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.StringValue>
public class WbStringVariable extends WbVariableExpr<org.wikidata.wdtk.datamodel.interfaces.StringValue>
A variable that returns a simple string value.- Author:
- Antonin Delpeuch
-
-
Field Summary
-
Fields inherited from class org.openrefine.wikibase.schema.WbVariableExpr
NO_VALUE_KEYWORD, SOME_VALUE_KEYWORD
-
-
Constructor Summary
Constructors Constructor Description WbStringVariable()WbStringVariable(String columnName)Constructs a variable and sets the column it is bound to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)org.wikidata.wdtk.datamodel.interfaces.StringValuefromCell(Cell cell, ExpressionContext ctxt)Method that should be implemented by subclasses, converting an OpenRefine cell to a Wikibase value.-
Methods inherited from class org.openrefine.wikibase.schema.WbVariableExpr
equalAsVariables, evaluate, getColumnName, hashCode, setColumnName, validate
-
-
-
-
Constructor Detail
-
WbStringVariable
public WbStringVariable()
-
WbStringVariable
public WbStringVariable(String columnName)
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 Detail
-
fromCell
public org.wikidata.wdtk.datamodel.interfaces.StringValue fromCell(Cell cell, ExpressionContext ctxt) throws SkipSchemaExpressionException
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<org.wikidata.wdtk.datamodel.interfaces.StringValue>- Parameters:
cell- the cell to convertctxt- the evaluation context- Returns:
- the corresponding Wikibase value
- Throws:
SkipSchemaExpressionException
-
-