Package org.openrefine.wikidata.schema
Class WbEntityVariable
java.lang.Object
org.openrefine.wikidata.schema.WbVariableExpr<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue>
org.openrefine.wikidata.schema.WbEntityVariable
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue>
public class WbEntityVariable
extends WbVariableExpr<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue>
An Entity that depends on a reconciled value in a column.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWbEntityVariable(String columnName) Constructs a variable and sets the column it is bound to. -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.wikidata.wdtk.datamodel.interfaces.EntityIdValuefromCell(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.wikidata.schema.WbVariableExpr
equalAsVariables, evaluate, getColumnName, hashCode, setColumnName
-
Field Details
-
INVALID_ENTITY_ID_FORMAT_WARNING_TYPE
- See Also:
-
-
Constructor Details
-
WbEntityVariable
public WbEntityVariable() -
WbEntityVariable
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
public org.wikidata.wdtk.datamodel.interfaces.EntityIdValue fromCell(Cell cell, ExpressionContext ctxt) throws SkipSchemaExpressionException, QAWarningException 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.EntityIdValue>- Parameters:
cell- the cell to convertctxt- the evaluation context- Returns:
- the corresponding Wikibase value
- Throws:
SkipSchemaExpressionExceptionQAWarningException
-
equals
-