Package org.openrefine.wikibase.schema
Class WbPropConstant
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbPropConstant
-
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue>
public class WbPropConstant extends Object implements WbExpression<org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue>
A constant property, that does not change depending on the row- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description WbPropConstant(String pid, String label, String datatype)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue
evaluate(ExpressionContext ctxt)
Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.String
getDatatype()
String
getLabel()
String
getPid()
int
hashCode()
void
validate(ValidationState validation)
Check that this expression is fully formed and ready to be evaluated.
-
-
-
Method Detail
-
validate
public void validate(ValidationState validation)
Description copied from interface:WbExpression
Check that this expression is fully formed and ready to be evaluated.- Specified by:
validate
in interfaceWbExpression<org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue>
- Parameters:
validation
- the state in which to log any validation errors
-
evaluate
public org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue evaluate(ExpressionContext ctxt)
Description copied from interface:WbExpression
Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim. As a premise to calling that method, we assume that callingWbExpression.validate(ValidationState)
did not log any error in the validation state.- Specified by:
evaluate
in interfaceWbExpression<org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue>
-
getPid
public String getPid()
-
getLabel
public String getLabel()
-
getDatatype
public String getDatatype()
-
-