Class EidEnricher

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

public final class EidEnricher extends Object implements InterpretationEnricherInterface
Enriches AI 8042 (ESIM) by decomposing the 32-digit eUICC Identifier (EID) of an embedded SIM.

An EID is structured as:

  [ MII (2) ][ body (29) ][ Luhn check digit (1) ]

Produced interpretations

  • SIM_MII — the 2-digit Major Industry Identifier, "89" for telecommunications (ITU-T E.118)
  • EID_BODY — the 29 digits between the MII and the check digit
  • EID_CHECK_DIGIT — the final Luhn check digit
  • SIM_MII_NAME — the ISO/IEC 7812-1 issuer-industry category of the MII, i.e. "Healthcare, telecommunications and other future industry assignments"

ISO/IEC 7812 defines the MII as the identifier's first digit; the 89 pair quoted here is the ITU-T E.118 telecommunications assignment, whose leading 8 is the MII proper. SIM_MII_NAME is resolved from that leading digit through Iso7812Data, so for a well-formed EID it is constant — reported for traceability to the standard rather than as a discriminator.

Why the body is not decomposed further. The GSMA specifications subdivide the interior into country code, issuer identifier and platform version, but those boundaries are specification-version dependent and cannot be determined from the value alone. Splitting them here would present a guess as a fact, so the body is surfaced whole.

Decomposition is purely positional and does not re-validate the check digit; EidValidator owns that. A value that is not exactly 32 digits yields an empty list rather than a partial decomposition.

Stateless and thread-safe, as InterpretationEnricherInterface requires.

  • Constructor Details

    • EidEnricher

      public EidEnricher()
      Creates a new EidEnricher.
  • 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