Class EidEnricher
- All Implemented Interfaces:
InterpretationEnricherInterface
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 digitEID_CHECK_DIGIT— the final Luhn check digitSIM_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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenrich(String baseValue, AiDefinition aiDefinition, GS1AIObjectElement element) Produces additional interpretations frombaseValue.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InterpretationEnricherInterface
enrichModifier and TypeMethodDescriptiondefault List<GS1AIInterpretation> enrich(String baseValue, AiDefinition aiDefinition, GS1AIObjectElement element, ParseConfig config) Produces additional interpretations frombaseValue, applying caller-supplied formatting preferences fromconfig.
-
Constructor Details
-
EidEnricher
public EidEnricher()Creates a newEidEnricher.
-
-
Method Details
-
enrich
public List<GS1AIInterpretation> enrich(String baseValue, AiDefinition aiDefinition, GS1AIObjectElement element) Description copied from interface:InterpretationEnricherInterfaceProduces additional interpretations frombaseValue.- Specified by:
enrichin interfaceInterpretationEnricherInterface- Parameters:
baseValue- the extracted segment value (nevernullor empty)aiDefinition- the full AI definition for the element being interpretedelement- the parent element, providing access to all component values and any interpretations already added in this pass- Returns:
- additional interpretations to append; never
null
-