com.sap.ip.me.api.pios.symbology
Class EAN8

java.lang.Object
  extended bycom.sap.ip.me.api.pios.symbology.Symbology
      extended bycom.sap.ip.me.api.pios.symbology.SymbologyLinear
          extended bycom.sap.ip.me.api.pios.symbology.EAN8

public final class EAN8
extends SymbologyLinear

Represents the EAN-8 Symbology.

EAN-8 is the EAN equivalent of UPC-E in the sense that it provides a "short" barcode for small packages. But similarities end there, the UPC-E barcode may be "expanded" back to UPC-A but EAN-8 cannot be expanded to EAN-13. This means that although EAN-13 is compatible with UPC-A, EAN-8 has absolutely no compatibility with UPC-E. An EAN-8 barcode is a 2- or 3-digit number system code followed by a 4- or 5-digit product code.

Aliases:
None
Code Type:
Discrete
Character Set:
Numeric only (0..9)
Check Character:
Mandatory
Barcode Example:
     EAN-8 Sample

The following options can be set for this symbology:

Supplement:
Required: optional
Used by: Printer
Default: No supplement
Possible values:
TWO_DIGIT_ADDON:
Supplemental barcode used with magazines, newspapers and other such periodicals. The 2-digit supplement typically represents the issue number of the periodical.
FIVE_DIGIT_ADDON:
Supplemental barcode used on books to indicate a suggested retail price.
Check digit transmit:
Required: optional
Used by: Scanner
Default: No transmit
Possible values:
CHECK_DIGIT_TRANSMIT:
Determines whether or not the check digit in a barcode is sent as part of the data.

Example: Create a EAN8 symbology for the printer with the five digit addon supplemental.
 
 	...
 	EAN8 ean8 = new EAN8(EAN8.FIVE_DIGIT_ADDON);
	...
 
 

Since:
MI 2.5
Author:
Abaco

Field Summary
static long CHECK_DIGIT_TRANSMIT
          Constant to indicate reporting of the bar code check digit.
static long FIVE_DIGIT_ADDON
          Constant to indicate the five digit addon option.
static long TWO_DIGIT_ADDON
          Constant to indicate the two digit addon option.
 
Fields inherited from class com.sap.ip.me.api.pios.symbology.Symbology
options
 
Constructor Summary
EAN8()
          Constructs a new EAN8 object.
EAN8(long options)
          Constructs a new EAN8 object with the symbology options provided.
 
Method Summary
 java.lang.String getName()
          Returns the symbology name.
 int getType()
          Returns the symbology type.
 void setOptions(long options)
          Sets the configured options for the symbology.
 
Methods inherited from class com.sap.ip.me.api.pios.symbology.Symbology
getOptions, validateOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TWO_DIGIT_ADDON

public static final long TWO_DIGIT_ADDON
Constant to indicate the two digit addon option.

See Also:
Constant Field Values

FIVE_DIGIT_ADDON

public static final long FIVE_DIGIT_ADDON
Constant to indicate the five digit addon option.

See Also:
Constant Field Values

CHECK_DIGIT_TRANSMIT

public static final long CHECK_DIGIT_TRANSMIT
Constant to indicate reporting of the bar code check digit.

See Also:
Constant Field Values
Constructor Detail

EAN8

public EAN8()
Constructs a new EAN8 object.


EAN8

public EAN8(long options)
     throws InvalidSymbologyException
Constructs a new EAN8 object with the symbology options provided.

The options value is either one of the option constants defined by this class, or must be built by bitwise OR'ing together (that is, using the long "|" operator) two or more of those option constants.

Parameters:
options - the symbology options mask
Throws:
InvalidSymbologyException - thrown if the received options are invalid for this symbology
Method Detail

getName

public java.lang.String getName()
Returns the symbology name.

Specified by:
getName in class Symbology
Returns:
The name of the symbology.

getType

public int getType()
Returns the symbology type.

Specified by:
getType in class Symbology
Returns:
The type of the symbology.
See Also:
SymbologyType

setOptions

public void setOptions(long options)
                throws InvalidSymbologyException
Sets the configured options for the symbology.

Specified by:
setOptions in class Symbology
Parameters:
options - the symbology options mask
Throws:
InvalidSymbologyException - thrown if the received options are invalid for this symbology


Copyright © 2005 SAP AG. All Rights Reserved.