Package org.openrefine.wikibase.schema
Class WbReferenceExpr
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbReferenceExpr
-
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.Reference>
public class WbReferenceExpr extends Object implements WbExpression<org.wikidata.wdtk.datamodel.interfaces.Reference>
An expression for a reference (list of reference snaks).- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description WbReferenceExpr(List<WbSnakExpr> snakExprs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)org.wikidata.wdtk.datamodel.interfaces.Referenceevaluate(ExpressionContext ctxt)Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.List<WbSnakExpr>getSnaks()inthashCode()voidvalidate(ValidationState validation)Check that this expression is fully formed and ready to be evaluated.
-
-
-
Constructor Detail
-
WbReferenceExpr
public WbReferenceExpr(List<WbSnakExpr> snakExprs)
-
-
Method Detail
-
validate
public void validate(ValidationState validation)
Description copied from interface:WbExpressionCheck that this expression is fully formed and ready to be evaluated.- Specified by:
validatein interfaceWbExpression<org.wikidata.wdtk.datamodel.interfaces.Reference>- Parameters:
validation- the state in which to log any validation errors
-
evaluate
public org.wikidata.wdtk.datamodel.interfaces.Reference evaluate(ExpressionContext ctxt) throws SkipSchemaExpressionException, QAWarningException
Description copied from interface:WbExpressionEvaluates 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:
evaluatein interfaceWbExpression<org.wikidata.wdtk.datamodel.interfaces.Reference>- Throws:
SkipSchemaExpressionExceptionQAWarningException
-
getSnaks
public List<WbSnakExpr> getSnaks()
-
-