Class FormatValidators
java.lang.Object
tools.pantheum.gaia.gs1.content.FormatValidators
Registry that maps GS1 component
format names to their
ComponentFormatInterface implementations.
Each validator lives in its own class under
tools.pantheum.gaia.gs1.content.componentformat and is registered here as a singleton.
Look up a validator with forFormat(String).
Registered formats
| Format | Validator |
|---|---|
| hhmm | HhmmValidator |
| iban | IbanValidator |
| importeridx | ImporterIdxValidator |
| iso3166 | Iso3166Validator |
| iso3166alpha2 | Iso3166Alpha2Validator |
| iso3166list | Iso3166ListValidator |
| iso4217 | Iso4217Validator |
| iso5218 | Iso5218Validator |
| latlong | LatLongValidator |
| mmoptss | MmoptssValidator |
| nonzero | NonzeroValidator |
| nozeroprefix | NozeroPrefixValidator |
| pcenc | PcencValidator |
| pieceoftotal | PieceOfTotalValidator |
| posinseqslash | PosInSeqSlashValidator |
| winding | WindingValidator |
| yesno | YesNoValidator |
| yymmd0 | Yymmd0Validator |
| yymmdd | YymmddValidator |
| yymmddhh | YymmddHhValidator |
| yyyymmdd | YyyymmddValidator |
| zero | ZeroValidator |
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentFormatInterfaceReturns theComponentFormatInterfacefor the given format name.
-
Method Details
-
forFormat
Returns theComponentFormatInterfacefor the given format name.- Parameters:
format- theformatfield from anAiComponent- Returns:
- the matching validator, or
nullif the format is unknown ornull
-