Class QuantityScrutinizer


public class QuantityScrutinizer extends SnakScrutinizer
Scrutinizer checking for units and bounds in quantities.
Author:
Antonin Delpeuch
  • Field Details

    • boundsDisallowedType

      public static final String boundsDisallowedType
      See Also:
    • integerConstraintType

      public static final String integerConstraintType
      See Also:
    • invalidUnitType

      public static final String invalidUnitType
      See Also:
    • noUnitProvidedType

      public static final String noUnitProvidedType
      See Also:
    • noBoundsConstraintQid

      public String noBoundsConstraintQid
    • integerValuedConstraintQid

      public String integerValuedConstraintQid
    • allowedUnitsConstraintQid

      public String allowedUnitsConstraintQid
    • allowedUnitsConstraintPid

      public String allowedUnitsConstraintPid
  • Constructor Details

    • QuantityScrutinizer

      public QuantityScrutinizer()
  • Method Details

    • prepareDependencies

      public boolean prepareDependencies()
      Description copied from class: EditScrutinizer
      Prepare the dependencies(i.e. constraint-related pids and qids) needed by the scrutinizer. Called before EditScrutinizer.batchIsBeginning().
      Specified by:
      prepareDependencies in class EditScrutinizer
      Returns:
      false if any necessary dependency is missing, true otherwise.
    • scrutinize

      public void scrutinize(org.wikidata.wdtk.datamodel.interfaces.Snak snak, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId, boolean added)
      Description copied from class: SnakScrutinizer
      This is the method that subclasses should override to implement their checks.
      Specified by:
      scrutinize in class SnakScrutinizer
      Parameters:
      snak - : the snak to inspect
      entityId - : the entity on which it is going to (dis)appear
      added - : whether this snak is going to be added or deleted