org.equanda.util.barcode
Class EAN128Builder

java.lang.Object
  extended by org.equanda.util.barcode.EAN128Builder
Direct Known Subclasses:
EAN128Brother, EAN128Eltron, EAN128Sato, EAN128Tec, EAN128Zebra

public abstract class EAN128Builder
extends Object

abstract class for building EAN 128 barcodes, you should use a renderer specific implementation

Author:
Joachim Van der Auwera

Field Summary
protected  String codeA
           
protected  String codeB
           
protected  String codeC
           
protected  String fnc1
          following members and methods should be made concrete by the implementing class as they are dependent on the barcode renderer (most printers need different encodings

They should allow all types of renderers

protected  String shift
           
protected  String start
           
 
Constructor Summary
EAN128Builder()
           
 
Method Summary
 String build(Map<String,String> data)
          build the barcode data string
 String buildLabel(Map<String,String> data)
          build the human readable representation for a barcode which is normally used as label under the barcode itself
protected abstract  String preprocess(String data)
          preproces should handle any manipulations to the values which are put in the barcode to prevent any unintended special characters from appearing in the barcode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fnc1

protected String fnc1
following members and methods should be made concrete by the implementing class as they are dependent on the barcode renderer (most printers need different encodings

They should allow all types of renderers


start

protected String start

shift

protected String shift

codeA

protected String codeA

codeB

protected String codeB

codeC

protected String codeC
Constructor Detail

EAN128Builder

public EAN128Builder()
Method Detail

build

public String build(Map<String,String> data)
             throws EAN128InvalidData
build the barcode data string

Parameters:
data - map with AI/value pairs
Returns:
string with barcode which can be interpretted by the renderer
Throws:
EAN128InvalidData - invalid barcode data

buildLabel

public String buildLabel(Map<String,String> data)
                  throws EAN128InvalidData
build the human readable representation for a barcode which is normally used as label under the barcode itself

Parameters:
data - map with AI/value pairs
Returns:
readable representation of barcode
Throws:
EAN128InvalidData - invalid barcode structure

preprocess

protected abstract String preprocess(String data)
preproces should handle any manipulations to the values which are put in the barcode to prevent any unintended special characters from appearing in the barcode. This will typically mean doubling escape characters or converting some characters.

Parameters:
data - data to preproces
Returns:
result after preprocessing


Copyright © 2007-2009. All Rights Reserved.