|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rfid.epc.EPC
public class EPC
Represents an EPCglobal® EPC® (Electronic Product Code) which is a unique identifier with well-defined semantics sutiable for use with RFID (Radio Frequency IDentification) tags. These semantics are defined by the TDS (Tag Data Specification) published by EPCglobal. In order to be compliant with the TDS an EPC must be encoded in strict accordance with the rules defined in the TDS. An EPC consists of one or more data fields in which is encoded either metadata or regular data. The metadata is contained in the header field which specifies the standard format in which the tag data is encoded. The content and format of the remaining tag data fields is determined by the type of encoding specifed in the header and the tag memory size. In addition to other encoding specific fields, each tag data format includes a serialized field. This field in conjunction with all other fields other than the header and filter, ensure uniqueness. It is very important to note that neither the header or filter field may be used in assuring the uniqueness of an EPC. Please consult the latest version of the TDS for further details.
Since an EPC must be a unique identifer, it is the responsiblility of this class to ensure its uniqueness. This is accomplished through the of the EPC Serial Number Configuration services provided by the WRPS (Websphere RFID Premises Server). These serialization configurations determine how an EPC is generated for a given product, location or entity.
An EPC is constructed by specifying the encoding type, a filter value, and product/location/entity identity data. This data may be one of the EAN/UCC® numbering types such as GTIN, SSCC, GRAI, etc, or any other data type approved by the EPCglobal TDS.
EPCglobal, EPC, EAN and UCC are registered trademarks of the respective organizations.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Constructor Summary | |
---|---|
EPC(java.lang.String tagURIOrHexEPC)
Construct an EPC given either an EPCglobal tag URI (e.g. |
|
EPC(java.lang.String inputType,
java.lang.String encodingType,
int companyPrefixLength,
java.lang.String filterValue,
java.lang.String packUnitType,
java.lang.String inputData,
java.lang.String discriminator)
Constructs an EPC object. |
Method Summary | |
---|---|
byte[] |
getBytes()
Gets the EPC as an array of bytes |
int |
getCompanyPrefixLength()
Gets the length of the company prefix/general manager/CAGE/DoDAAC portion of the input data used to generate this EPC. |
java.lang.String |
getDiscriminator()
Gets the discriminator used in generating this EPC |
java.lang.String |
getEncodingType()
Gets the encoding type used in generating this EPC. |
java.lang.String |
getFilterValue()
Gets the filter value used in generating this EPC. |
java.lang.String |
getInputData()
Gets the input data used in generating this EPC |
java.lang.String |
getInputType()
Gets the input type used in generating this EPC. |
java.lang.String |
getPackType()
Gets the pack type used in generating this EPC |
java.lang.String |
toBinaryString()
Gets a string version of this EPC in binary format, for example: 0001100111001111011111... |
java.lang.String |
toString()
Gets a string version of this EPC in hexadecimal format, for example: 1234567890ABCDEF |
java.lang.String |
toStringIdURI()
Gets a string version of this EPC in EPCglobal id URI format, for example: urn:epc:id:dod:1AB2C3.201 |
java.lang.String |
toStringRawURI()
Gets a string version of this EPC in EPCglobal raw URI format, for example: urn:epc:raw:96.x123456789012345678901234 |
java.lang.String |
toStringTagURI()
Gets a string version of this EPC in EPCglobal tag URI format, for example: urn:epc:tag:dod-96:1.1AB2C3.201 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public EPC(java.lang.String inputType, java.lang.String encodingType, int companyPrefixLength, java.lang.String filterValue, java.lang.String packUnitType, java.lang.String inputData, java.lang.String discriminator) throws EPCException
toStringTagURI
, a raw URI
toStringRawURI
, an id URI
toStringIdURI
, or as a hexadecimal number
toString
. The format of the input data follows:
Input Type | Format |
---|---|
GTIN14 | fixed length, 12 (UCC12), 13 (EAN13) or 14 numeric characters |
SSCC18 | variable length, either 18 numeric characters representing a full EAN.UCC SSCC or just company prefix + extension digit. If full SSCC is specified, it is already serialized and thus no serial number will be created, only EPC encoding occurs. If a company prefix + extension digit is specified, a serial number will be generated and the EPC encoded |
GIAI | variable length, either up to 30 numeric characters representing a full EAN.UCC GIAI or just company prefix + asset reference. If full GIAI is specified, it is already serialized and thus no serial number will be created, only EPC encoding occurs. If a company prefix + asset reference is specified, a serial number will be generated and the EPC encoded |
GID | variable length, numeric characters representing a general manager identifier + object class. |
GLN | simple 13 digit number used to uniquely identify any legal, functional or physical entity. Its basic components are: EAN.UCC Company Prefix, some company defined location reference, and a check digit. |
DOD | variable length, 5 or 6 alphanumeric characters representing a Dept. of Defense CAGE or DoDAAC, characters 'I' (eye) and 'O' (oh) are not allowed. |
inputType
- string name of one of the supported data types, currently
GTIN14, SSCC18, GIAI, GID, GLN and DOD. Unlike the others,
there are no associated EAN.UCC datatypes for the GID and DOD
inputs, these input types exist solely to support creation of
an EPC.encodingType
- string name of one of the supported encoding typescompanyPrefixLength
- integer length of company prefix portion of the inputType
parameter. For the GID inputType, this is the length of the
General Manager portion of the inputData parameter. For the
DOD inputType, this is the length of the Government Managed
Identifier or CAGE/DoDAAC portion of the inputData parameter.filterValue
- string binary value indicating filter value. Valid filter
values can be determined by consulting the TDS. May be null if
the encoding type specified doesn't have filters defined for
it (like the gid-96 encoding type)packUnitType
- string name of a pack type to be used in generating this EPCinputData
- string input data to be used to generate the EPC. The format
and content of these fields is described above.discriminator
- string that can be used assign ranges of serial numbers for
the same product to different entities. This string can be a
location or other identifier, or an empty string if it is not
desired to use this feature.
EPCException
- if generation of the EPC failspublic EPC(java.lang.String tagURIOrHexEPC) throws EPCException
tagURIOrHexEPC
- string tag URI or hexadecimal value
EPCException
- if generation of the EPC failsMethod Detail |
---|
public java.lang.String getEncodingType()
public java.lang.String getInputType()
public int getCompanyPrefixLength()
public java.lang.String getFilterValue()
public java.lang.String getPackType()
public java.lang.String toStringTagURI()
public java.lang.String toStringIdURI()
public java.lang.String toStringRawURI()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toBinaryString()
public byte[] getBytes()
public java.lang.String getInputData()
public java.lang.String getDiscriminator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |