Class TemperatureFahrenheitEnricher
java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.TemperatureFahrenheitEnricher
- All Implemented Interfaces:
InterpretationEnricherInterface
public final class TemperatureFahrenheitEnricher
extends Object
implements InterpretationEnricherInterface
Enriches temperature AIs expressed in Fahrenheit (4330 — MAX TEMP F,
4332 — MIN TEMP F) with a human-readable temperature value and unit.
Component structure
- Component 0 (
N6) — temperature magnitude in hundredths of a degree Fahrenheit, e.g."003200"= 32.00°F - Component 1 (optional
[-]) — if the literal"-"is present, the temperature is negative (below zero)
Produced interpretations
TEMPERATURE— decimal value, e.g."32.0"or"-4.0"TEMPERATURE_UNIT—"°F"TEMPERATURE_FORMATTED— combined, e.g."32.0°F"or"-4.0°F"
-
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
-
TemperatureFahrenheitEnricher
public TemperatureFahrenheitEnricher()Creates a newTemperatureFahrenheitEnricher.
-
-
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
-