Class ProductionMethodEnricher
java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.ProductionMethodEnricher
- All Implemented Interfaces:
InterpretationEnricherInterface
public final class ProductionMethodEnricher
extends Object
implements InterpretationEnricherInterface
Enriches AI 7010 (PROD METHOD — Production Method) by resolving the 1–2
character code to its human-readable description.
The code table is maintained in
ProductionMethodValidator.ALLOWED_CODES, aligned with GS1 General
Specifications AI 7010 and EU Regulation 1379/2013 (fisheries labelling).
Unrecognised codes produce a PRODUCTION_METHOD_CODE entry only;
no PRODUCTION_METHOD description is added.
Produced interpretations
PRODUCTION_METHOD_CODE— the raw code, e.g."2"PRODUCTION_METHOD— the description for recognised codes, e.g."Farmed (aquaculture, general)"
-
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
-
ProductionMethodEnricher
public ProductionMethodEnricher()Creates a newProductionMethodEnricher.
-
-
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
-