pops.ale.epc.spec.grouping
Class Epc

java.lang.Object
  extended by pops.ale.epc.spec.grouping.Epc
Direct Known Subclasses:
Sgln96, Sgtin96

public abstract class Epc
extends java.lang.Object


Field Summary
static byte MAX_URI_FIELDS
           
protected  byte[] tagData
           
protected  EncScheme type
           
protected  UnsignedBigInt[] uriFields
          This array holds wrappers for manipulating uri fields as numbers on more than 64 bits if necessary.
protected  UriRepresentation uriRepresentation
           
 
Constructor Summary
Epc()
          Constructor
 
Method Summary
abstract  boolean equals(Epc tag)
          Comparison utility : to be implemented by children.
abstract  UnsignedBigInt getField(int index)
          To be implemented by children.
 int getNumFields()
           
abstract  java.lang.String getPureUri()
          Conversion Utilities: to be implemented by children.
abstract  java.lang.String getRawDecUri()
           
abstract  java.lang.String getRawHexUri()
           
abstract  java.lang.String getTagUri()
           
 EncScheme getType()
           
abstract  void setRepresentation(UriRepresentation header)
          sets the Epc wrapper representation for grouping
 void setTagData(byte[] tagData)
          Sets tag Data, by reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_URI_FIELDS

public static final byte MAX_URI_FIELDS
See Also:
Constant Field Values

uriRepresentation

protected UriRepresentation uriRepresentation

type

protected EncScheme type

tagData

protected byte[] tagData

uriFields

protected final UnsignedBigInt[] uriFields
This array holds wrappers for manipulating uri fields as numbers on more than 64 bits if necessary. These wrappers are created and provided to children.

Constructor Detail

Epc

public Epc()
Constructor

Method Detail

setTagData

public void setTagData(byte[] tagData)
Sets tag Data, by reference. To be overloaded by children to set up fields

Parameters:
tagData -

getType

public EncScheme getType()

getNumFields

public int getNumFields()

setRepresentation

public abstract void setRepresentation(UriRepresentation header)
                                throws java.lang.IllegalArgumentException
sets the Epc wrapper representation for grouping

Parameters:
header - must be UriRepresentation.EPC_PURE or UriRepresentation.EPC_TAG
Throws:
java.lang.IllegalArgumentException - if header is none of UriRepresentation.EPC_PURE or UriRepresentation.EPC_TAG

getField

public abstract UnsignedBigInt getField(int index)
                                 throws java.lang.IndexOutOfBoundsException
To be implemented by children. Depends on the encoding scheme. This method is intended to return the field as an UnsignedBigInt. the returned value may be a Byte, Integer, Long, or even BigInteger...

Parameters:
index - the field index [0..NumFields[
Returns:
field output field value
Throws:
java.lang.IndexOutOfBoundsException - if given index out of bounds

getPureUri

public abstract java.lang.String getPureUri()
Conversion Utilities: to be implemented by children. Using EpcCodec and its children.


getTagUri

public abstract java.lang.String getTagUri()

getRawDecUri

public abstract java.lang.String getRawDecUri()

getRawHexUri

public abstract java.lang.String getRawHexUri()

equals

public abstract boolean equals(Epc tag)
Comparison utility : to be implemented by children.