Class YesNoEnricher
java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.YesNoEnricher
- All Implemented Interfaces:
InterpretationEnricherInterface
Enriches GS1
yesno flag fields by mapping the single-digit value
to a human-readable Yes/No label.
Applied to boolean flag AIs where 1 means true/yes and
0 means false/no:
- AI 4321 — Dangerous goods flag
- AI 4322 — Authority to leave
- AI 4323 — Signature required flag
Produced interpretations
FLAG_VALUE—"Yes"for"1","No"for"0"
"0" or "1".-
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
-
YesNoEnricher
public YesNoEnricher()Creates a newYesNoEnricher.
-
-
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
-