mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
Issue 495: Renamed DATAMATRIX to DATA_MATRIX for consistency.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1508 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
17b9952822
commit
2cb4f5f82b
|
@ -33,7 +33,7 @@ public final class BarcodeFormat {
|
|||
public static final BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE");
|
||||
|
||||
/** DataMatrix 2D barcode format. */
|
||||
public static final BarcodeFormat DATAMATRIX = new BarcodeFormat("DATAMATRIX");
|
||||
public static final BarcodeFormat DATA_MATRIX = new BarcodeFormat("DATA_MATRIX");
|
||||
|
||||
/** UPC-E 1D format. */
|
||||
public static final BarcodeFormat UPC_E = new BarcodeFormat("UPC_E");
|
||||
|
|
|
@ -113,7 +113,7 @@ public final class MultiFormatReader implements Reader {
|
|||
if (formats.contains(BarcodeFormat.QR_CODE)) {
|
||||
readers.addElement(new QRCodeReader());
|
||||
}
|
||||
if (formats.contains(BarcodeFormat.DATAMATRIX)) {
|
||||
if (formats.contains(BarcodeFormat.DATA_MATRIX)) {
|
||||
readers.addElement(new DataMatrixReader());
|
||||
}
|
||||
if (formats.contains(BarcodeFormat.PDF417)) {
|
||||
|
|
|
@ -70,7 +70,8 @@ public final class DataMatrixReader implements Reader {
|
|||
decoderResult = decoder.decode(detectorResult.getBits());
|
||||
points = detectorResult.getPoints();
|
||||
}
|
||||
Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points, BarcodeFormat.DATAMATRIX);
|
||||
Result result = new Result(decoderResult.getText(), decoderResult.getRawBytes(), points,
|
||||
BarcodeFormat.DATA_MATRIX);
|
||||
if (decoderResult.getByteSegments() != null) {
|
||||
result.putMetadata(ResultMetadataType.BYTE_SEGMENTS, decoderResult.getByteSegments());
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DataMatrixBlackBox1TestCase extends AbstractBlackBoxTestCase
|
|||
|
||||
public DataMatrixBlackBox1TestCase() {
|
||||
// TODO use MultiFormatReader here once Data Matrix decoder is done
|
||||
super("test/data/blackbox/datamatrix-1", new DataMatrixReader(), BarcodeFormat.DATAMATRIX);
|
||||
super("test/data/blackbox/datamatrix-1", new DataMatrixReader(), BarcodeFormat.DATA_MATRIX);
|
||||
addTest(7, 7, 0.0f);
|
||||
addTest(7, 7, 90.0f);
|
||||
addTest(6, 6, 180.0f);
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DataMatrixBlackBox2TestCase extends AbstractBlackBoxTestCase
|
|||
|
||||
public DataMatrixBlackBox2TestCase() {
|
||||
// TODO use MultiFormatReader here once Data Matrix decoder is done
|
||||
super("test/data/blackbox/datamatrix-2", new DataMatrixReader(), BarcodeFormat.DATAMATRIX);
|
||||
super("test/data/blackbox/datamatrix-2", new DataMatrixReader(), BarcodeFormat.DATA_MATRIX);
|
||||
addTest(4, 4, 0.0f);
|
||||
addTest(1, 1, 90.0f);
|
||||
addTest(3, 3, 180.0f);
|
||||
|
|
|
@ -121,7 +121,7 @@ public final class CommandLineRunner {
|
|||
vector.addElement(BarcodeFormat.CODE_128);
|
||||
vector.addElement(BarcodeFormat.ITF);
|
||||
vector.addElement(BarcodeFormat.QR_CODE);
|
||||
vector.addElement(BarcodeFormat.DATAMATRIX);
|
||||
vector.addElement(BarcodeFormat.DATA_MATRIX);
|
||||
vector.addElement(BarcodeFormat.PDF417);
|
||||
//vector.addElement(BarcodeFormat.CODABAR);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public final class DecodeServlet extends HttpServlet {
|
|||
possibleFormats.add(BarcodeFormat.ITF);
|
||||
possibleFormats.add(BarcodeFormat.RSS14);
|
||||
possibleFormats.add(BarcodeFormat.QR_CODE);
|
||||
possibleFormats.add(BarcodeFormat.DATAMATRIX);
|
||||
possibleFormats.add(BarcodeFormat.DATA_MATRIX);
|
||||
possibleFormats.add(BarcodeFormat.PDF417);
|
||||
HINTS.put(DecodeHintType.POSSIBLE_FORMATS, possibleFormats);
|
||||
HINTS_PURE = new Hashtable<DecodeHintType, Object>(HINTS);
|
||||
|
|
Loading…
Reference in a new issue