Package org.openrefine.wikibase.schema
Class WbSnakExpr
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbSnakExpr
-
- All Implemented Interfaces:
WbExpression<org.wikidata.wdtk.datamodel.interfaces.Snak>
public class WbSnakExpr extends Object implements WbExpression<org.wikidata.wdtk.datamodel.interfaces.Snak>
An expression for a snak (pair of property and value).- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description WbSnakExpr(WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue> propExpr, WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.Value> valueExpr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)org.wikidata.wdtk.datamodel.interfaces.Snakevaluate(ExpressionContext ctxt)Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue>getProp()WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.Value>getValue()inthashCode()voidvalidate(ValidationState validation)Check that this expression is fully formed and ready to be evaluated.
-
-
-
Constructor Detail
-
WbSnakExpr
public WbSnakExpr(WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue> propExpr, WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.Value> valueExpr)
-
-
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.Snak>- Parameters:
validation- the state in which to log any validation errors
-
evaluate
public org.wikidata.wdtk.datamodel.interfaces.Snak 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.Snak>- Throws:
SkipSchemaExpressionExceptionQAWarningException
-
getProp
public WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue> getProp()
-
getValue
public WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.Value> getValue()
-
-