Package org.openrefine.wikibase.schema
Class WbMonolingualExpr
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbMonolingualExpr
-
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue>
public class WbMonolingualExpr extends Object implements WbExpression<org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue>
-
-
Constructor Summary
Constructors Constructor Description WbMonolingualExpr(WbExpression<? extends String> languageExpr, WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.StringValue> valueExpr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue
evaluate(ExpressionContext ctxt)
Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.WbExpression<? extends String>
getLanguageExpr()
WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.StringValue>
getValueExpr()
int
hashCode()
void
validate(ValidationState validation)
Check that this expression is fully formed and ready to be evaluated.
-
-
-
Constructor Detail
-
WbMonolingualExpr
public WbMonolingualExpr(WbExpression<? extends String> languageExpr, WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.StringValue> valueExpr)
-
-
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.MonolingualTextValue>
- Parameters:
validation
- the state in which to log any validation errors
-
evaluate
public org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue evaluate(ExpressionContext ctxt) throws SkipSchemaExpressionException, QAWarningException
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.MonolingualTextValue>
- Throws:
SkipSchemaExpressionException
QAWarningException
-
getLanguageExpr
public WbExpression<? extends String> getLanguageExpr()
-
getValueExpr
public WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.StringValue> getValueExpr()
-
-