com.ibm.rfid.premises.app.entities
Class EPCTag

java.lang.Object
  extended by com.ibm.rfid.premises.app.entities.EPCTag

public class EPCTag
extends java.lang.Object

EPCTag is an object used to represent a tag read. Within this object you can access encoding type (tagFormat), company prefix, filter value, etc.

NOTE: the concept of a tag format in the EPCTag object is the same concept of an epc encoding type. Also, the strings used to represent these tag formats are EPC Global String formats. See Epc.

See Also:
EPCTagGroup

Field Summary
static int DOD_DIGIT
          int used to represent USDOD encoding
static java.lang.String FILTER_CASE
          default decimal filter value for case
static java.lang.String FILTER_DOD_CASE
          default decimal filter value for a DOD case
static java.lang.String FILTER_DOD_ITEM
          default decimal filter value for a DOD item
static java.lang.String FILTER_DOD_PALLET
          default decimal filter value for a DOD pallet
static java.lang.String FILTER_ITEM
          default decimal filter value for item
static java.lang.String FILTER_PALLET
          default decimal filter value for pallet
static int GIAI_DIGIT
          int used to represent GIAI encoding
static int GID_DIGIT
          int used to represent GID encoding
static int GRAI_DIGIT
          int used to represent GRAI encoding
static int SGLN_DIGIT
          int used to represent SGLN encoding
static int SGTIN_DIGIT
          int used to represent SGTIN encoding
static int SSCC_DIGIT
          int used to represent SSCC encoding
 
Constructor Summary
EPCTag()
          base constructor
EPCTag(java.lang.String epcuristring)
          Constructor used to create an EPCTag object using a uri String.
EPCTag(java.lang.String format, java.lang.String filter, java.lang.String cpprefix, java.lang.String itemreference, java.lang.String serialnumber)
          Constructor used to create an EPCTag object.
 
Method Summary
 java.lang.String getCompanyPrefix()
          gets the company prefix
 java.lang.String getFilterValue()
          gets the filter value
 java.lang.String getIdURI()
          gets the ID URI (e.g., urn:epc:id:3.30000.3245342.00002).
 java.lang.String getIndicatorDigit()
          gets indicator digit for tag
 java.lang.String getItemRef()
          gets the item reference
 java.lang.String getRawURI()
          gets the raw URI, or epc tag value
 java.lang.String getSerialNum()
          gets the serial number
 java.lang.String getTagFormat()
          gets the tag format (epc encoding type)
 int getTagFormatDigit()
          gets the tag format digit
 java.lang.String getTagURI()
          gets the tag URI which is a human readable version of the tag read (e.g., urn:epc:tag:sgtin-96:3.30000.3245342.00002)
 boolean hasCompanyPrefix()
          checks to see if a tag read has a company prefix
 boolean hasFilterValue()
          checks to see if tag read has a filter value
 boolean hasItemRef()
          checks to see if a tag read has an item reference
 boolean is64bit()
          Checks to see if the tag read is 64-bit
 boolean is96bit()
          Checks to see if the tag read is 96-bit
 void setCompanyPrefix(java.lang.String string)
          Sets the company prefix
 void setFilterValue(java.lang.String string)
          sets the filter value
 void setIdURI(java.lang.String string)
          sets the ID URI (e.g., urn:epc:id:3.30000.3245342.00002).
 void setIndicatorDigit(java.lang.String string)
          Sets indicator digit for tag
 void setItemRef(java.lang.String string)
          sets item reference
 void setRawURI(java.lang.String string)
          sets the raw URI, or epc tag value
 void setSerialNum(java.lang.String string)
          sets the serial number
 void setTagFormat(java.lang.String string)
          sets the tag format, or epc encoding type
 void setTagURI(java.lang.String string)
          sets the tag URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTER_DOD_PALLET

public static final java.lang.String FILTER_DOD_PALLET
default decimal filter value for a DOD pallet

See Also:
Constant Field Values

FILTER_DOD_CASE

public static final java.lang.String FILTER_DOD_CASE
default decimal filter value for a DOD case

See Also:
Constant Field Values

FILTER_DOD_ITEM

public static final java.lang.String FILTER_DOD_ITEM
default decimal filter value for a DOD item

See Also:
Constant Field Values

FILTER_PALLET

public static final java.lang.String FILTER_PALLET
default decimal filter value for pallet

See Also:
Constant Field Values

FILTER_CASE

public static final java.lang.String FILTER_CASE
default decimal filter value for case

See Also:
Constant Field Values

FILTER_ITEM

public static final java.lang.String FILTER_ITEM
default decimal filter value for item

See Also:
Constant Field Values

GID_DIGIT

public static final int GID_DIGIT
int used to represent GID encoding

See Also:
Constant Field Values

SSCC_DIGIT

public static final int SSCC_DIGIT
int used to represent SSCC encoding

See Also:
Constant Field Values

GIAI_DIGIT

public static final int GIAI_DIGIT
int used to represent GIAI encoding

See Also:
Constant Field Values

GRAI_DIGIT

public static final int GRAI_DIGIT
int used to represent GRAI encoding

See Also:
Constant Field Values

SGTIN_DIGIT

public static final int SGTIN_DIGIT
int used to represent SGTIN encoding

See Also:
Constant Field Values

DOD_DIGIT

public static final int DOD_DIGIT
int used to represent USDOD encoding

See Also:
Constant Field Values

SGLN_DIGIT

public static final int SGLN_DIGIT
int used to represent SGLN encoding

See Also:
Constant Field Values
Constructor Detail

EPCTag

public EPCTag()
base constructor


EPCTag

public EPCTag(java.lang.String format,
              java.lang.String filter,
              java.lang.String cpprefix,
              java.lang.String itemreference,
              java.lang.String serialnumber)
Constructor used to create an EPCTag object. This will generally not be used by the average user, but will instead be used by the Premises Server to create an EPCTag object for you and return it to the client user

Parameters:
format - tag format, or epc encoding
filter - epc filter valie
cpprefix - company prefix
itemreference - item reference
serialnumber - tag serial number

EPCTag

public EPCTag(java.lang.String epcuristring)
       throws InvalidTagURIException
Constructor used to create an EPCTag object using a uri String. This will generally not be used by the average user, but will instead be used by the Premises Server to create an EPCTag object for you and return it to the client user

Parameters:
epcuristring - uri String
Throws:
InvalidTagURIException
Method Detail

is96bit

public boolean is96bit()
Checks to see if the tag read is 96-bit

Returns:
true if tag read is 96-bit, false if otherwise

is64bit

public boolean is64bit()
Checks to see if the tag read is 64-bit

Returns:
true if tag read is 64-bit, false if otherwise

hasFilterValue

public boolean hasFilterValue()
checks to see if tag read has a filter value

Returns:
true if tag read has a filter value (optional depending on encoding/tag format)

hasItemRef

public boolean hasItemRef()
checks to see if a tag read has an item reference

Returns:
true if tag read has an item reference (optional depending on encoding/tag format)

hasCompanyPrefix

public boolean hasCompanyPrefix()
checks to see if a tag read has a company prefix

Returns:
true if tag read has a company prefix (optional depending on encoding/tag format)

getCompanyPrefix

public java.lang.String getCompanyPrefix()
gets the company prefix

Returns:
company prefix String

getFilterValue

public java.lang.String getFilterValue()
gets the filter value

Returns:
filter value String

getItemRef

public java.lang.String getItemRef()
gets the item reference

Returns:
item reference String

getSerialNum

public java.lang.String getSerialNum()
gets the serial number

Returns:
serial number String

getTagFormat

public java.lang.String getTagFormat()
gets the tag format (epc encoding type)

Returns:
tag format String

getTagFormatDigit

public int getTagFormatDigit()
gets the tag format digit

Returns:
tag format int
See Also:
DOD_DIGIT, GIAI_DIGIT, GID_DIGIT, GRAI_DIGIT, SGLN_DIGIT, SGTIN_DIGIT, SSCC_DIGIT

getTagURI

public java.lang.String getTagURI()
gets the tag URI which is a human readable version of the tag read (e.g., urn:epc:tag:sgtin-96:3.30000.3245342.00002)

Returns:
tag URI String

setCompanyPrefix

public void setCompanyPrefix(java.lang.String string)
Sets the company prefix

Parameters:
string - company prefix

setFilterValue

public void setFilterValue(java.lang.String string)
sets the filter value

Parameters:
string - filter value

setItemRef

public void setItemRef(java.lang.String string)
sets item reference

Parameters:
string - item reference

setSerialNum

public void setSerialNum(java.lang.String string)
sets the serial number

Parameters:
string - serial number

setTagFormat

public void setTagFormat(java.lang.String string)
sets the tag format, or epc encoding type

Parameters:
string - tag format

setTagURI

public void setTagURI(java.lang.String string)
               throws InvalidTagURIException
sets the tag URI. and example of a tag URI is: urn:epc:tag:sgtin-96:3.30000.3245342.00002

This method takes the information found from the tag URI and sets the other class information (company prefix, filter value, etc) if it has them.

Parameters:
string - tag URI
Throws:
InvalidTagURIException
See Also:
setTagURI(String)

getRawURI

public java.lang.String getRawURI()
gets the raw URI, or epc tag value

Returns:
raw URI String

setRawURI

public void setRawURI(java.lang.String string)
sets the raw URI, or epc tag value

Parameters:
string - raw URI String

getIdURI

public java.lang.String getIdURI()
gets the ID URI (e.g., urn:epc:id:3.30000.3245342.00002).

Returns:
the id URI String
See Also:
setIdURI(String)

setIdURI

public void setIdURI(java.lang.String string)
sets the ID URI (e.g., urn:epc:id:3.30000.3245342.00002).

Parameters:
string - ID URI

This method takes the information found from the tag URI and sets the other class information (company prefix, filter value, etc) if it has them.

See Also:
getIdURI()

getIndicatorDigit

public java.lang.String getIndicatorDigit()
gets indicator digit for tag

Returns:
indicator digit

setIndicatorDigit

public void setIndicatorDigit(java.lang.String string)
Sets indicator digit for tag

Parameters:
string - indicator digit to set


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.