Class WbNameDescExpr

java.lang.Object
org.openrefine.wikidata.schema.WbNameDescExpr

public class WbNameDescExpr extends Object
An expression that represent a term (label, description or alias). The structure is slightly different from other expressions because we need to call different methods on ItemEditBuilder.
Author:
Antonin Delpeuch
  • Constructor Details

    • WbNameDescExpr

      public WbNameDescExpr(org.openrefine.wikidata.schema.WbNameDescExpr.NameDescType type, WbMonolingualExpr value)
  • Method Details

    • contributeTo

      public void contributeTo(ItemEditBuilder entity, ExpressionContext ctxt) throws QAWarningException
      Evaluates the expression and adds the result to the entity update.
      Parameters:
      entity - the entity update where the term should be stored
      ctxt - the evaluation context for the expression
      Throws:
      QAWarningException
    • contributeTo

      public void contributeTo(MediaInfoEditBuilder entity, ExpressionContext ctxt) throws QAWarningException
      Evaluates the expression and adds the result to the entity update.
      Parameters:
      entity - the entity update where the term should be stored
      ctxt - the evaluation context for the expression
      Throws:
      QAWarningException
    • getType

      public org.openrefine.wikidata.schema.WbNameDescExpr.NameDescType getType()
    • getValue

      public WbMonolingualExpr getValue()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object