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 String
INVALID_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 boolean
equals(Object other)
ItemEdit
evaluate(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()
int
hashCode()
void
validate(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:WbExpression
Check that this expression is fully formed and ready to be evaluated.- Specified by:
validate
in 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: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<ItemEdit>
- Throws:
SkipSchemaExpressionException
QAWarningException
-
getSubject
public WbExpression<? extends org.wikidata.wdtk.datamodel.interfaces.EntityIdValue> getSubject()
-
getNameDescs
public List<WbNameDescExpr> getNameDescs()
-
getStatementGroups
public List<WbStatementGroupExpr> getStatementGroups()
-
-