|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpops.ale.codec.gs1.Gs1Converter
public final class Gs1Converter
This class exports conversion utilities for gs1 number.
Field Summary | |
---|---|
static int |
GLN_LENGTH
|
static int |
GTIN_LENGTH
|
Constructor Summary | |
---|---|
Gs1Converter()
|
Method Summary | |
---|---|
static byte |
computeCheckDigit(long gs1,
int length)
Returns the check digit for a gs1 number. |
static long |
computeGS1(byte header,
long companyPrefix,
int reference,
byte partition)
|
static long |
computeGS1(java.lang.String tagUri)
Computes a GS1 number from an uri representation in epc-tag format. |
static Gs1Number |
decodeTagUri(java.lang.String tagUri)
Computes a GS1 number from an uri representation in epc-tag format. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
toString(int length,
long gs1)
Converts a given gs1 number to a 14 digits string with leading zeros if necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GTIN_LENGTH
public static final int GLN_LENGTH
Constructor Detail |
---|
public Gs1Converter()
Method Detail |
---|
public static final long computeGS1(byte header, long companyPrefix, int reference, byte partition)
header
- see EpcCodec.SGTIN_96_HEADER
and EpcCodec.SGLN_96_HEADER
companyPrefix
- reference
- partition
-
public static final long computeGS1(java.lang.String tagUri)
uri
- sgtin-96 or sgln-96 uri representation in epc-tag format.
Examples : "urn:epc:tag:sgtin-96:1.358378.0142310.1", "urn:epc:tag:sgln-96:1.211298.070875.43981".
public static final Gs1Number decodeTagUri(java.lang.String tagUri)
uri
- sgtin-96 or sgln-96 uri representation in epc-pure or epc-tag format.
Examples : "urn:epc:tag:sgtin-96:1.358378.0142310.1", "urn:epc:tag:sgln-96:1.211298.070875.43981".
public static final java.lang.String toString(int length, long gs1)
gs1
- 14 digits max gs1 number.
public static final byte computeCheckDigit(long gs1, int length)
gs1
- 13 digits "d_1d_2...d13".
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |