|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rfid.epc.datahandler.AbstractHandler
com.ibm.rfid.epc.datahandler.GRAI
public class GRAI
Manages an instance of a data handler for an EAN.UCC Global Returnable Asset Identifier
(GRAI) data type. A EAN GRAI is a 14-30 digit number composed of a leading zero, 12 digits of company
prefix and asset type, an EAN.UCC checkdigit and an 1-15 digit serial number.
The input data for this handler may be specified in one of three forms, all of which are strings.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Fields inherited from class com.ibm.rfid.epc.datahandler.AbstractHandler |
---|
companyPrefix, companyPrefixLength, handlerType, inputData, maxCompanyPrefixLength, minCompanyPrefixLength, pureId, serialNumber, useLocalConfigMgr |
Fields inherited from interface com.ibm.rfid.epc.datahandler.DataHandler |
---|
DOD, GIAI, GID, GLN, GRAI, GTIN14, MAX_CAGE_DODAAC_LENGTH, MAX_EAN_UCC_COMPANY_PREFIX_LENGTH, MAX_GID_GENERAL_MANAGER_LENGTH, MAX_NDC10_COMPANY_PREFIX_LENGTH, MIN_CAGE_DODAAC_LENGTH, MIN_EAN_UCC_COMPANY_PREFIX_LENGTH, MIN_GID_GENERAL_MANAGER_LENGTH, MIN_NDC10_COMPANY_PREFIX_LENGTH, NDC10, SSCC18 |
Constructor Summary | |
---|---|
GRAI(java.lang.String inputData,
int companyPrefixLength,
java.lang.String encodingType)
Creates an instance of a data handler for an GRAI data type. |
Method Summary | |
---|---|
java.lang.String |
getAssetType()
Gets the numeric asset type field of this GRAI as a string |
java.lang.String |
getCheckDigit()
Gets the EAN.UCC checksum digit field of this GRAI as a string |
java.lang.String |
getUnserializedPureId()
Create the portion of the ID URI (pure id) associated with this handler this is not serialized, i.e. |
java.lang.String |
serialize(java.lang.String discriminator)
Override the base implementation to correctly create a serialized GRAI. |
void |
setAssetType(java.lang.String assetType)
Set the numeric asset type field of this GRAI |
void |
setCheckDigit(java.lang.String checkDigit)
Sets the EAN.UCC check digit field of this GRAI |
Methods inherited from class com.ibm.rfid.epc.datahandler.AbstractHandler |
---|
getCompanyPrefix, getCompanyPrefixLength, getHandlerType, getInputData, getMaxCompanyPrefixLength, getMinCompanyPrefixLength, getPureId, getSerialNumber, setCompanyPrefix, setCompanyPrefixLength, setHandlerType, toString, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.rfid.epc.datahandler.DataHandler |
---|
getCompanyPrefix, getHandlerType, getInputData, getMaxCompanyPrefixLength, getMinCompanyPrefixLength, getSerialNumber |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public GRAI(java.lang.String inputData, int companyPrefixLength, java.lang.String encodingType) throws InvalidFormatException
inputData
- numeric string data to be managed by this handler. Input data may be any of
the three forms discussed above.companyPrefixLength
- length of CP portion of the data stringencodingType
- string encoding type
InvalidFormatException
- if any of the input data fails validationMethod Detail |
---|
public java.lang.String getUnserializedPureId()
getUnserializedPureId
in interface DataHandler
public java.lang.String serialize(java.lang.String discriminator) throws com.ibm.rfid.epc.config.SerialGenerationException
serialize
in interface DataHandler
serialize
in class AbstractHandler
discriminator
- string that can be used assign ranges of serial numbers for the
same product to different entities/locations/objects. This string can be an
an empty string if it is not desired to use this feature.
com.ibm.rfid.epc.config.SerialGenerationException
- if a serial number cannot be commissioned for the pure
id and discriminator associated with this data handlerpublic java.lang.String getAssetType()
public java.lang.String getCheckDigit()
public void setAssetType(java.lang.String assetType)
assetType
- numeric asset typepublic void setCheckDigit(java.lang.String checkDigit)
checkDigit
- numeric check digit
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |