Class QuantityCode
- java.lang.Object
-
- com.itextpdf.text.zugferd.checkers.CodeValidation
-
- com.itextpdf.text.zugferd.checkers.extended.QuantityCode
-
public class QuantityCode extends CodeValidation
Series of codes that can be used for quantities. These codes are used only in the context of the Extended profile.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BAG
static java.lang.String
BARREL
static java.lang.String
BOTTLE
static java.lang.String
BOTTLECRATE
static java.lang.String
BOX
static java.lang.String
CAN
static java.lang.String
CARTON
static java.lang.String
CASE
static java.lang.String
PALLET
static java.lang.String
ROLL
static java.lang.String
SACK
static java.lang.String
UNPACKAGED
-
Constructor Summary
Constructors Constructor Description QuantityCode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid(java.lang.String code)
The code list provided with the ZUGFeRD standard only lists twelve codes.-
Methods inherited from class com.itextpdf.text.zugferd.checkers.CodeValidation
check, isLowercase, isNumeric, isUppercase
-
-
-
-
Field Detail
-
BARREL
public static final java.lang.String BARREL
- See Also:
- Constant Field Values
-
BOTTLECRATE
public static final java.lang.String BOTTLECRATE
- See Also:
- Constant Field Values
-
BAG
public static final java.lang.String BAG
- See Also:
- Constant Field Values
-
BOTTLE
public static final java.lang.String BOTTLE
- See Also:
- Constant Field Values
-
BOX
public static final java.lang.String BOX
- See Also:
- Constant Field Values
-
CASE
public static final java.lang.String CASE
- See Also:
- Constant Field Values
-
CARTON
public static final java.lang.String CARTON
- See Also:
- Constant Field Values
-
CAN
public static final java.lang.String CAN
- See Also:
- Constant Field Values
-
UNPACKAGED
public static final java.lang.String UNPACKAGED
- See Also:
- Constant Field Values
-
PALLET
public static final java.lang.String PALLET
- See Also:
- Constant Field Values
-
ROLL
public static final java.lang.String ROLL
- See Also:
- Constant Field Values
-
SACK
public static final java.lang.String SACK
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValid
public boolean isValid(java.lang.String code)
The code list provided with the ZUGFeRD standard only lists twelve codes. There are more codes available (in UNCL 7065). We won't check the presence of a code in UNCL 7065, but we'll check if the code consists of two letters and if it's uppercase.- Specified by:
isValid
in classCodeValidation
- Parameters:
code
- the code to be tested- Returns:
- true if the code has the correct format
-
-