Package org.openrefine.wikibase.schema
Class WbItemEditExpr
- java.lang.Object
-
- org.openrefine.wikibase.schema.WbItemEditExpr
-
- All Implemented Interfaces:
WbExpression<ItemEdit>
public class WbItemEditExpr extends Object implements WbExpression<ItemEdit>
The representation of an item edit, which can contain variables both for its own id and in its contents.- Author:
- Antonin Delpeuch
-
-
Field Summary
Fields Modifier and Type Field Description static StringINVALID_SUBJECT_WARNING_TYPE
-
Constructor Summary
Constructors Constructor Description WbItemEditExpr(WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.EntityIdValue> subjectExpr, List<WbNameDescExpr> nameDescExprs, List<WbStatementGroupExpr> statementGroupExprs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)ItemEditevaluate(ExpressionContext ctxt)Evaluates the value expression in a given context, returns a Wikibase value suitable to be the target of a claim.List<WbNameDescExpr>getNameDescs()List<WbStatementGroupExpr>getStatementGroups()WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.EntityIdValue>getSubject()inthashCode()voidvalidate(ValidationState validation)Check that this expression is fully formed and ready to be evaluated.
-
-
-
Field Detail
-
INVALID_SUBJECT_WARNING_TYPE
public static final String INVALID_SUBJECT_WARNING_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WbItemEditExpr
public WbItemEditExpr(WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.EntityIdValue> subjectExpr, List<WbNameDescExpr> nameDescExprs, List<WbStatementGroupExpr> statementGroupExprs)
-
-
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<ItemEdit>- Parameters:
validation- the state in which to log any validation errors
-
evaluate
public ItemEdit 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<ItemEdit>- Throws:
SkipSchemaExpressionExceptionQAWarningException
-
getSubject
public WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.EntityIdValue> getSubject()
-
getNameDescs
public List<WbNameDescExpr> getNameDescs()
-
getStatementGroups
public List<WbStatementGroupExpr> getStatementGroups()
-
-