Class ImporterIdxValidator

java.lang.Object
tools.pantheum.gaia.gs1.content.componentformat.ImporterIdxValidator
All Implemented Interfaces:
ComponentFormatInterface

public final class ImporterIdxValidator extends Object implements ComponentFormatInterface
Validates importeridx — the single-character Importer Index in AI 7040 (UIC+EXT).

Permitted characters (GS1 General Specifications, AI 7040):

  • A–Z — uppercase letters (identify up to 26 importers)
  • a–z — lowercase letters (identify up to 26 further importers)
  • 0–9 — digits (identify up to 10 further importers)
  • - — hyphen (identifies one further importer)
  • _ — underscore (indicates the importer index does not apply — null value)
  • Field Details

  • Method Details

    • validate

      public List<GaiaError> validate(String s, String ai, int position, String component, String format, GaiaConstants.Language language)
      Description copied from interface: ComponentFormatInterface
      Validates value against this format's rules and returns the resulting errors, or an empty list when valid (one GaiaError per failing condition).
      Specified by:
      validate in interface ComponentFormatInterface
      Parameters:
      s - the component slice to validate (charset already verified)
      ai - the Application Identifier of the enclosing element
      position - the character position of the element in the input
      component - the component's data title
      format - the component's format key
      language - the language in which to produce the error messages
      Returns:
      the validate.