Package org.openrefine.wikibase.schema
Interface WbExpression<T>
-
- All Known Implementing Classes:
WbDateConstant,WbDateVariable,WbEntityIdValueConstant,WbEntityVariable,WbItemConstant,WbItemEditExpr,WbItemVariable,WbLanguageConstant,WbLanguageVariable,WbLocationConstant,WbLocationVariable,WbMediaInfoEditExpr,WbMonolingualExpr,WbPropConstant,WbQuantityExpr,WbReferenceExpr,WbSnakExpr,WbStringConstant,WbStringVariable,WbVariableExpr
public interface WbExpression<T>The base interface for all expressions, which evaluate to a particular type T in an ExpressionContext.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tevaluate(ExpressionContext ctxt)Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.voidvalidate(ValidationState validation)Check that this expression is fully formed and ready to be evaluated.
-
-
-
Method Detail
-
evaluate
T evaluate(ExpressionContext ctxt) throws SkipSchemaExpressionException, QAWarningException, SpecialValueNoValueException, SpecialValueSomeValueException
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 callingvalidate(ValidationState)did not log any error in the validation state.
-
validate
void validate(ValidationState validation)
Check that this expression is fully formed and ready to be evaluated.- Parameters:
validation- the state in which to log any validation errors
-
-