Class TimeEnricher

java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.TimeEnricher
All Implemented Interfaces:
InterpretationEnricherInterface

public final class TimeEnricher extends Object implements InterpretationEnricherInterface
Enriches a GS1 HHmm time component value with a human-readable HH:mm representation and the display format.

The raw value is exactly 4 digits in the format HHMM where:

  • HH — hours (00–23)
  • mm — minutes (00–59)

Produced interpretations

  • TIME_VALUE — formatted time string "HH:mm", e.g. "09:30"
  • TIME_FORMAT — the display format: "HH:mm"
  • Constructor Details

    • TimeEnricher

      public TimeEnricher()
      Creates a new TimeEnricher.
  • 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