net.datacrow.util.cuecat
Class CueCatCode

java.lang.Object
  extended by net.datacrow.util.cuecat.CueCatCode

public class CueCatCode
extends java.lang.Object

This class is used to hold the decoded output of a CueCat such as the CueCatID, the bar code data and type of barcode. It also provides several static methods for handling the processing of the CueCat output and for barcodes in general.

Version:
1.0
Author:
Tim Patton (guinsu@timpatton.com)

Field Summary
 java.lang.String barCode
          The actual bar code sent by the CueCat, in the case of ISBN's it is processed further to get it into a form appropriate for doing lookups on web sites
static int BARCODE_2OF5
          2 of 5 Barcode - not belived to be supported by CueCat
static int BARCODE_4STATE
          4State Barcode - not belived to be supported by CueCat
static int BARCODE_CODE128
          CODE128 Barcode - Large barcodes supported by CueCat
static int BARCODE_CODE128_B
          CODE128-B Barcode - Large barcodes supported by CueCat
static int BARCODE_CODE128_C
          CODE128-C Barcode - Large barcodes supported by CueCat
static int BARCODE_CODE39
          CODE39 Barcode - Large barcodes supported by CueCat
static int BARCODE_CODE93
          CODE93 Barcode - not belived to be supported by CueCat
static int BARCODE_CUE
          CueCat Barcode - Large barcodes supported by CueCat
static int BARCODE_EAN_128
          EAN128 Barcode - not belived to be supported by CueCat
static int BARCODE_EAN_13
          EAN13 Barcode - Large barcodes supported by CueCat
static int BARCODE_EAN_13_ADD2
          EAN13, add 2 Barcode - not belived to be supported by CueCat
static int BARCODE_EAN_13_ADD5
          EAN13, add 5 Barcode - not belived to be supported by CueCat
static int BARCODE_EAN_8
          EAN8 Barcode - Large barcodes supported by CueCat
static int BARCODE_EXTENDED_CODE39
          Extended CODE39 Barcode - not belived to be supported by CueCat
static int BARCODE_INTERLEAVED_2OF5
          Interleaved 2 of 5 Barcode - Large barcodes supported by CueCat
static int BARCODE_ISBN
          ISBN Barcode - Supported by CueCat
static int BARCODE_ISBN_ADD5
          ISBN, add 5 Barcode - Supported by CueCat
static int BARCODE_ITF_6
          ITF-6 Barcode - Large barcodes supported by CueCat
static int BARCODE_MSI
          MSI Barcode - not belived to be supported by CueCat
static int BARCODE_POSTNET
          PostNet Barcode - not belived to be supported by CueCat
static int BARCODE_RM4SCC
          RM4SCC Barcode - not belived to be supported by CueCat
static int BARCODE_SISAC
          SISAC Barcode - not belived to be supported by CueCat
static int BARCODE_UNKNOWN
          Unknown Barcode Type
static int BARCODE_UPC_A
          UPC-A Barcode - Supported by CueCat
static int BARCODE_UPC_A_ADD2
          UPC-A, add2 Barcode - Supported by CueCat
static int BARCODE_UPC_E
          UPC-E Barcode - Supported by CueCat
 int barType
          The bar code type, sent as the second part of each scan
static java.lang.String[] barTypePrintable
          Name of each barcode type suitable for displaying
 java.lang.String barTypeStr
          The bar code type as represented by the CueCat in string form
static java.lang.String[] barTypeStrings
          Array of the strings output by the CueCat for each barcode type.
 java.lang.String cueCatID
          The CueCat device ID, sent as the first part of each scan
 
Constructor Summary
CueCatCode(java.lang.String cueCatID, java.lang.String barTypeStr, java.lang.String barCode)
          Constructor creates a new object from the 3 pieces of CueCat output
 
Method Summary
static int getBarType(java.lang.String barString)
          Returns the integer type of a bar code based on the type String that the CueCat outputs
static java.lang.String getISBNfromUPC(java.lang.String upc)
          method to convert UPCs of ISBNs into actual ISBNs that can be looked up at various web sites.
static java.lang.String getPrintableType(int barType)
          Returns a user-readable String of a specific barcode type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BARCODE_UNKNOWN

public static final int BARCODE_UNKNOWN
Unknown Barcode Type

See Also:
Constant Field Values

BARCODE_UPC_E

public static final int BARCODE_UPC_E
UPC-E Barcode - Supported by CueCat

See Also:
Constant Field Values

BARCODE_UPC_A

public static final int BARCODE_UPC_A
UPC-A Barcode - Supported by CueCat

See Also:
Constant Field Values

BARCODE_UPC_A_ADD2

public static final int BARCODE_UPC_A_ADD2
UPC-A, add2 Barcode - Supported by CueCat

See Also:
Constant Field Values

BARCODE_ISBN

public static final int BARCODE_ISBN
ISBN Barcode - Supported by CueCat

See Also:
Constant Field Values

BARCODE_ISBN_ADD5

public static final int BARCODE_ISBN_ADD5
ISBN, add 5 Barcode - Supported by CueCat

See Also:
Constant Field Values

BARCODE_EAN_8

public static final int BARCODE_EAN_8
EAN8 Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_EAN_13

public static final int BARCODE_EAN_13
EAN13 Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_CODE128

public static final int BARCODE_CODE128
CODE128 Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_CODE128_B

public static final int BARCODE_CODE128_B
CODE128-B Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_CODE128_C

public static final int BARCODE_CODE128_C
CODE128-C Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_CODE39

public static final int BARCODE_CODE39
CODE39 Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_INTERLEAVED_2OF5

public static final int BARCODE_INTERLEAVED_2OF5
Interleaved 2 of 5 Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_ITF_6

public static final int BARCODE_ITF_6
ITF-6 Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_CUE

public static final int BARCODE_CUE
CueCat Barcode - Large barcodes supported by CueCat

See Also:
Constant Field Values

BARCODE_EAN_13_ADD2

public static final int BARCODE_EAN_13_ADD2
EAN13, add 2 Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_EAN_13_ADD5

public static final int BARCODE_EAN_13_ADD5
EAN13, add 5 Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_EAN_128

public static final int BARCODE_EAN_128
EAN128 Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_EXTENDED_CODE39

public static final int BARCODE_EXTENDED_CODE39
Extended CODE39 Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_CODE93

public static final int BARCODE_CODE93
CODE93 Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_2OF5

public static final int BARCODE_2OF5
2 of 5 Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_MSI

public static final int BARCODE_MSI
MSI Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_POSTNET

public static final int BARCODE_POSTNET
PostNet Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_RM4SCC

public static final int BARCODE_RM4SCC
RM4SCC Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_4STATE

public static final int BARCODE_4STATE
4State Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

BARCODE_SISAC

public static final int BARCODE_SISAC
SISAC Barcode - not belived to be supported by CueCat

See Also:
Constant Field Values

barTypeStrings

public static final java.lang.String[] barTypeStrings
Array of the strings output by the CueCat for each barcode type.


barTypePrintable

public static final java.lang.String[] barTypePrintable
Name of each barcode type suitable for displaying


cueCatID

public java.lang.String cueCatID
The CueCat device ID, sent as the first part of each scan


barType

public int barType
The bar code type, sent as the second part of each scan


barTypeStr

public java.lang.String barTypeStr
The bar code type as represented by the CueCat in string form


barCode

public java.lang.String barCode
The actual bar code sent by the CueCat, in the case of ISBN's it is processed further to get it into a form appropriate for doing lookups on web sites

Constructor Detail

CueCatCode

public CueCatCode(java.lang.String cueCatID,
                  java.lang.String barTypeStr,
                  java.lang.String barCode)
Constructor creates a new object from the 3 pieces of CueCat output

Method Detail

getBarType

public static int getBarType(java.lang.String barString)
Returns the integer type of a bar code based on the type String that the CueCat outputs

Parameters:
barString - the decoded String that the CueCat used to represent the type of barcode
Returns:
int representing one of the constants for barcode types

getPrintableType

public static java.lang.String getPrintableType(int barType)
Returns a user-readable String of a specific barcode type.

Parameters:
barType - the integer representation of the bar code type
Returns:
String representing the printable version of the type

getISBNfromUPC

public static java.lang.String getISBNfromUPC(java.lang.String upc)
method to convert UPCs of ISBNs into actual ISBNs that can be looked up at various web sites. Courtesy of: http://www.bisg.org/algorithms.html

Parameters:
upc - the UPC numerical representation of an ISBN
Returns:
String the ISBN number