Package org.openrefine.wikibase.schema
Class WbEntityVariable
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbVariableExpr<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue>
-
- org.openrefine.wikibase.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 Modifier and Type Field Description static String
INVALID_ENTITY_ID_FORMAT_WARNING_TYPE
-
Fields inherited from class org.openrefine.wikibase.schema.WbVariableExpr
NO_VALUE_KEYWORD, SOME_VALUE_KEYWORD
-
-
Constructor Summary
Constructors Constructor Description WbEntityVariable()
WbEntityVariable(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 boolean
equals(Object other)
org.wikidata.wdtk.datamodel.interfaces.EntityIdValue
fromCell(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
-
-
-
-
Field Detail
-
INVALID_ENTITY_ID_FORMAT_WARNING_TYPE
public static final String INVALID_ENTITY_ID_FORMAT_WARNING_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WbEntityVariable
public WbEntityVariable()
-
WbEntityVariable
public WbEntityVariable(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.EntityIdValue fromCell(Cell cell, ExpressionContext ctxt) throws SkipSchemaExpressionException, QAWarningException
Description copied from class:WbVariableExpr
Method 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:
fromCell
in classWbVariableExpr<org.wikidata.wdtk.datamodel.interfaces.EntityIdValue>
- Parameters:
cell
- the cell to convertctxt
- the evaluation context- Returns:
- the corresponding Wikibase value
- Throws:
SkipSchemaExpressionException
QAWarningException
-
-