Class Iso3166Enricher

java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.Iso3166Enricher
All Implemented Interfaces:
InterpretationEnricherInterface

public final class Iso3166Enricher extends Object implements InterpretationEnricherInterface
Enriches a 3-digit ISO 3166-1 numeric country code with the code itself and its country name as two separate interpretations.

Produced interpretations

  • COUNTRY_CODE_NUMERIC — the ISO 3166-1 numeric code, e.g. "036"
  • COUNTRY_NAME — the full country name, e.g. "Australia"
If the code is not found in the ISO 3166 dataset, an empty list is returned.
  • Constructor Details

  • Method Details

    • enrich

      public List<GS1AIInterpretation> enrich(String baseValue, AiDefinition aiDefinition, GS1AIObjectElement element)
      Description copied from interface: InterpretationEnricherInterface
      Produces additional interpretations from baseValue.
      Specified by:
      enrich in interface InterpretationEnricherInterface
      Parameters:
      baseValue - the extracted segment value (never null or empty)
      aiDefinition - the full AI definition for the element being interpreted
      element - the parent element, providing access to all component values and any interpretations already added in this pass
      Returns:
      additional interpretations to append; never null