Class GS1AIInterpretation

java.lang.Object
tools.pantheum.gaia.gs1.model.GS1AIInterpretation

public final class GS1AIInterpretation extends Object
An immutable, human-readable interpretation of a segment of a GS1 AI element.

Each interpretation has a machine-readable type (e.g. "GS1_COMPANY_PREFIX"), a human-readable label (e.g. "GS1 company prefix"), and the extracted value (e.g. "930").

Interpretations are produced by InterpretationEngine during the INTERPRETATION parse mode and attached to their parent GS1AIObjectElement.

  • Constructor Details

    • GS1AIInterpretation

      public GS1AIInterpretation(String type, String label, String value)
      Creates a new GS1AIInterpretation.
      Parameters:
      type - the type
      label - the label
      value - the value
  • Method Details

    • getType

      public String getType()
      Machine-readable interpretation type, e.g. "GS1_COMPANY_PREFIX".
      Returns:
      the type.
    • getLabel

      public String getLabel()
      Human-readable label, localized to the parse language (e.g. "GS1 company prefix" in English, "Préfixe d'entreprise GS1" in French). See LabelRegistry.
      Returns:
      the label.
    • getValue

      public String getValue()
      Extracted value, e.g. "930".
      Returns:
      the value.
    • toString

      public String toString()
      Overrides:
      toString in class Object