Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.rfid.workflow.util
Class BarcodeDecoder

    java.lang.Object
      com.bea.rfid.workflow.util.BarcodeDecoder

    public class BarcodeDecoder

extends Object

Converts bar code string or epc to epc id pattern. If the bar code can be converted to a full tag URI, like SSCC, this will return an EPC identity URI string. If the bar code represents only an EPC class, it will be converted to an EPC identity pattern representing the EPC class.

This relies on the company prefix table to get the company prefix out of a bar code like GTIN.

This accepts barcodes in following formats:

String value of barcode with AI fields as String or Barcode tag list (EPC URI in the format urn:connecterra:barcode:[barcodeString]).

This currently supports the following bar code types:

SSCC, GTIN, GLN, GRAI, GIAI are supported. Symbology character decoding is not supported yet. SSCC and SGTIN barcode with AI fields are not supported.

- 12 digit barcode is processed in following order,
  1. Check if it is UCC12(GTIN)
  2. Check if it is GIAI
- 13 digit barcode is processed in following order,
  1. Check if it is UCC13(GTIN)
  2. Check if it GIAI
- 14 digit barcode is processed in following order,
  1. Check if it is GTIN
  2. Check if it is GIAI
- 18 digit barcode is processed in following order,
  1. Check if it is SSCC
  2. Check if it is GRAI
  3. Check if it is GIAI
- GLN is processed in following order
  1. Check if is GLN
  2. Check if it is GIAI
  Note: This class assumes single threaded operation.

  Nested Class Summary
  `static class` | `BarcodeDecoder.BarcodeEncoding`

  Field Summary
  `static String` | `BARCODEURI_PREFIX`
  `static int` | `COMPANY_PREFIX_MAX_LENGTH`
  `static int` | `COMPANY_PREFIX_MIN_LENGTH`
  `static String` | `DELIVER_FOR_FORWARD_TO_GLN_AI`
  `static String` | `DELIVER_TO_GLN_AI`
  `static String` | `EPC_ID_URI_PREFIX`
  `static String` | `GIAI_AI`
  `static String` | `GLN_OF_INVOICING_PARTY_GLN_AI`
  `static String` | `GRAI_AI`
  `static String` | `ID_OF_PHYSICAL_LOCATION_GLN_AI`
  `static String` | `ID_PAT_URI_HEADER`
  `static String` | `INVOICE_GLN_AI`
  `static String` | `PURCHASED_FROM_GLN_AI`

  Constructor Summary
  `BarcodeDecoder()`

  Method Summary
  `URI` | `decode(String barcodeData)` Decodes the input bar code string to an EPC identity URI or EPC identity pattern URI.
  `URI` | `decodeFromTagList(List barcodeTagData)` Takes bar code specifed in the given tag list input and decodes the bar code string to an EPC identity URI or EPC identity pattern URI.

  Methods inherited from class java.lang.Object
  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Field Detail

  ### COMPANY_PREFIX_MIN_LENGTH

      public static final int COMPANY_PREFIX_MIN_LENGTH

  See Also:
    Constant Field Values

  ### COMPANY_PREFIX_MAX_LENGTH

      public static final int COMPANY_PREFIX_MAX_LENGTH

  See Also:
    Constant Field Values

  ### EPC_ID_URI_PREFIX

      public static final String EPC_ID_URI_PREFIX

  See Also:
    Constant Field Values

  ### ID_PAT_URI_HEADER

      public static final String ID_PAT_URI_HEADER

  See Also:
    Constant Field Values

  ### BARCODEURI_PREFIX

      public static final String BARCODEURI_PREFIX

  See Also:
    Constant Field Values

  ### DELIVER_TO_GLN_AI

      public static final String DELIVER_TO_GLN_AI

  See Also:
    Constant Field Values

  ### INVOICE_GLN_AI

      public static final String INVOICE_GLN_AI

  See Also:
    Constant Field Values

  ### PURCHASED_FROM_GLN_AI

      public static final String PURCHASED_FROM_GLN_AI

  See Also:
    Constant Field Values

  ### DELIVER_FOR_FORWARD_TO_GLN_AI

      public static final String DELIVER_FOR_FORWARD_TO_GLN_AI

  See Also:
    Constant Field Values

  ### ID_OF_PHYSICAL_LOCATION_GLN_AI

      public static final String ID_OF_PHYSICAL_LOCATION_GLN_AI

  See Also:
    Constant Field Values

  ### GLN_OF_INVOICING_PARTY_GLN_AI

      public static final String GLN_OF_INVOICING_PARTY_GLN_AI

  See Also:
    Constant Field Values

  ### GRAI_AI

      public static final String GRAI_AI

  See Also:
    Constant Field Values

  ### GIAI_AI

      public static final String GIAI_AI

  See Also:
    Constant Field Values

  Constructor Detail

  ### BarcodeDecoder

      public BarcodeDecoder()

  Method Detail

  ### decodeFromTagList

      public URI decodeFromTagList(List barcodeTagData)
                            throws InvalidBarcodeException,
                                   com.connecterra.ale.epc.EPCException

    Takes bar code specifed in the given tag list input and decodes the bar code string to an EPC identity URI or EPC identity pattern URI. This is provided as a convenience to use output produced by `TagListBuilder`. The input list must contain only one entry with the bar code URI. Accepted bar code types and rules used when decoding are specified in the class level documentation.

    Parameters:
      `barcodeTagData` - tag list with only one entry, which contains the bar code string.
    Returns:
      result EPC id URI or EPC id pattern URI
    Throws:
      `InvalidBarcodeException` - if the bar code cannot be parsed as any of the supported bar code types
      `com.connecterra.ale.epc.EPCException` - if problem creating EPC from supplied tag data

  ### decode

      public URI decode(String barcodeData)
                 throws InvalidBarcodeException

    Decodes the input bar code string to an EPC identity URI or EPC identity pattern URI. Accepted bar code types and rules used when decoding are specified in the class level documentation.

    Parameters:
      `barcodeData` - bar code string
    Returns:
      result EPC id URI or EPC id pattern URI
    Throws:
      `InvalidBarcodeException` - if the bar code cannot be parsed as any of the supported bar code types or problem decoding barcode to a specific encoding

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  | Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc.
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD