Class EpcUtility

java.lang.Object
com.persequor.saga.modules.dpp.gs1.EpcUtility

public class EpcUtility extends Object
  • Method Details

    • encodeLgtinEpc

      public static String encodeLgtinEpc(String gtin, String batch, int companyPrefixLength)
      Encode a GTIN and batch into an LGTIN EPC.
      Parameters:
      gtin - The GTIN to encode (12, 13, or 14 digits)
      batch - The batch to encode
      companyPrefixLength - The length of the company prefix
      Returns:
      The LGTIN EPC
    • encodeSgtinEpc

      public static String encodeSgtinEpc(String gtin, String serial, int companyPrefixLength)
      Encode a GTIN and serial into an SGTIN EPC.
      Parameters:
      gtin - The GTIN to encode (12, 13, or 14 digits)
      serial - The serial to encode
      companyPrefixLength - The length of the company prefix
      Returns:
      The SGTIN EPC
    • getLgtinEpcClass

      public static String getLgtinEpcClass(String gtin, int companyPrefixLength)