com.itextpdf.text.zugferd.checkers.extended
Class QuantityCode

java.lang.Object
  extended by com.itextpdf.text.zugferd.checkers.CodeValidation
      extended by 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
static String BAG
           
static String BARREL
           
static String BOTTLE
           
static String BOTTLECRATE
           
static String BOX
           
static String CAN
           
static String CARTON
           
static String CASE
           
static String PALLET
           
static String ROLL
           
static String SACK
           
static String UNPACKAGED
           
 
Constructor Summary
QuantityCode()
           
 
Method Summary
 boolean isValid(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BARREL

public static final String BARREL
See Also:
Constant Field Values

BOTTLECRATE

public static final String BOTTLECRATE
See Also:
Constant Field Values

BAG

public static final String BAG
See Also:
Constant Field Values

BOTTLE

public static final String BOTTLE
See Also:
Constant Field Values

BOX

public static final String BOX
See Also:
Constant Field Values

CASE

public static final String CASE
See Also:
Constant Field Values

CARTON

public static final String CARTON
See Also:
Constant Field Values

CAN

public static final String CAN
See Also:
Constant Field Values

UNPACKAGED

public static final String UNPACKAGED
See Also:
Constant Field Values

PALLET

public static final String PALLET
See Also:
Constant Field Values

ROLL

public static final String ROLL
See Also:
Constant Field Values

SACK

public static final String SACK
See Also:
Constant Field Values
Constructor Detail

QuantityCode

public QuantityCode()
Method Detail

isValid

public boolean isValid(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 class CodeValidation
Parameters:
code - the code to be tested
Returns:
true if the code has the correct format


Copyright © 2015. All Rights Reserved.