Class BirthSequenceEnricher
java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.BirthSequenceEnricher
- All Implemented Interfaces:
InterpretationEnricherInterface
Enriches AI 7258 (BIRTH SEQUENCE — Baby birth sequence) by splitting the
posinseqslash value into its constituent parts.
Value format
The 3-character fixed-length value is structured as:
Char 0 : position in birth sequence (single digit, 1-based)
Char 1 : literal "/"
Char 2 : total number of babies born in this sequence
Examples:
"1/1"— single birth (one baby)"1/2"— first of twins"2/3"— second of triplets
Produced interpretations
BIRTH_POSITION— position in the sequence, e.g."2"BIRTH_TOTAL— total babies in this birth, e.g."3"BIRTH_SEQUENCE— human-readable label, e.g."Baby 2 of 3"
digit/digit format.-
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
-
BirthSequenceEnricher
public BirthSequenceEnricher()Creates a newBirthSequenceEnricher.
-
-
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
-