Class WindingValidator
java.lang.Object
tools.pantheum.gaia.gs1.content.componentformat.WindingValidator
- All Implemented Interfaces:
ComponentFormatInterface
Validates
winding — the winding direction of a reel in AI 8001 (DIMENSIONS).
Permitted values per GS1 General Specifications section 3.9.1:
0— face out1— face in9— undefined
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringnameForCode(String code) Returns the human-readable name for the given winding direction code, ornullif the code is"9"(undefined) or unrecognised.validate(String s, String ai, int position, String component, String format, GaiaConstants.Language language) Validatesvalueagainst this format's rules and returns the resulting errors, or an empty list when valid (oneGaiaErrorper failing condition).
-
Field Details
-
INSTANCE
The singleton instance.
-
-
Method Details
-
validate
public List<GaiaError> validate(String s, String ai, int position, String component, String format, GaiaConstants.Language language) Description copied from interface:ComponentFormatInterfaceValidatesvalueagainst this format's rules and returns the resulting errors, or an empty list when valid (oneGaiaErrorper failing condition).- Specified by:
validatein interfaceComponentFormatInterface- Parameters:
s- the component slice to validate (charset already verified)ai- the Application Identifier of the enclosing elementposition- the character position of the element in the inputcomponent- the component's data titleformat- the component's format keylanguage- the language in which to produce the error messages- Returns:
- the validate.
-
nameForCode
-