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 Details

  • 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