Class RollDimensionsEnricher
java.lang.Object
tools.pantheum.gaia.gs1.interpretation.enricher.RollDimensionsEnricher
- All Implemented Interfaces:
InterpretationEnricherInterface
Enriches AI 8001 (DIMENSIONS — Roll products) by decomposing the 14-digit
value into its five labelled measurement fields.
Value structure (14 digits)
Component 0 (N4) : Roll width — millimetres, e.g."1500"= 1500 mm Component 1 (N5) : Roll length — metres, e.g."02000"= 2000 m Component 2 (N3) : Core diameter — millimetres, e.g."076"= 76 mm Component 3 (N1) : Winding direction — 0 = not defined, 1 = clockwise (viewed from outside), 2 = counterclockwise (viewed from outside) Component 4 (N1) : Number of splices — 0–9
Produced interpretations
ROLL_WIDTH— roll width in mm, leading zeros stripped, e.g."1500"ROLL_LENGTH— roll length in m, leading zeros stripped, e.g."2000"CORE_DIAMETER— core diameter in mm, leading zeros stripped, e.g."76"WINDING_DIRECTION_CODE— single-digit winding code, e.g."1"WINDING_DIRECTION— human-readable direction, e.g."Clockwise"; omitted if code is"0"(not defined)SPLICES— number of splices, e.g."2"
-
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
-
RollDimensionsEnricher
public RollDimensionsEnricher()Creates a newRollDimensionsEnricher.
-
-
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
-