public class HIBCPASCodetext extends java.lang.Object implements IComplexCodetext
Class for encoding and decoding the text embedded in the HIBC PAS code.
This sample shows how to encode and decode HIBC PAS using HIBCPASCodetext.HIBCPASComplexCodetext complexCodetext = new HIBCPASComplexCodetext(); complexCodetext.setDataLocation(HIBCPASDataLocation.PATIENT); complexCodetext.addRecord(HIBCPASDataType.LABELER_IDENTIFICATION_CODE, "A123"); complexCodetext.addRecord(HIBCPASDataType.MANUFACTURER_SERIAL_NUMBER, "SERIAL123"); complexCodetext.setBarcodeType(EncodeTypes.HIBC_DATA_MATRIX_PAS); ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext); BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.HIBC_DATA_MATRIX_PAS); reader.readBarCodes(); String codetext = reader.getFoundBarCodes()[0].getCodeText(); HIBCPASComplexCodetext readCodetext = ComplexCodetextReader.tryDecodeHIBCPAS(codetext); System.out.println("Data location: {0}", readCodetext.getDataLocation()); System.out.print("Data type: {0}. ", readCodetext.getRecords()[0].getDataType()); System.out.println("Data: {0}", readCodetext.getRecords()[0].getData()); System.out.print("Data type: {0}. ", readCodetext.getRecords()[1].getDataType()); System.out.println("Data: {0}", readCodetext.getRecords()[1].getData()); } }
| Constructor and Description |
|---|
HIBCPASCodetext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecord(HIBCPASRecord record)
Adds new record
|
void |
addRecord(int dataType,
java.lang.String data)
Adds new record
|
void |
clear()
Clears records list
|
boolean |
equals(java.lang.Object obj)
Returns a value indicating whether this instance is equal to a specified
HIBCPASCodetext value. |
BaseEncodeType |
getBarcodeType()
Gets barcode type.
|
java.lang.String |
getConstructedCodetext()
Constructs codetext
|
int |
getDataLocation()
Identifies data location.
|
com.aspose.ms.System.Collections.Generic.List<HIBCPASRecord> |
getRecords()
Gets records list
|
int |
hashCode()
Returns the hash code for this instance.
|
void |
initFromString(java.lang.String constructedCodetext)
Initializes instance from constructed codetext.
|
void |
setBarcodeType(BaseEncodeType value)
Gets or sets barcode type.
|
void |
setDataLocation(int value)
Identifies data location.
|
public void setBarcodeType(BaseEncodeType value)
Gets or sets barcode type. HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types. Default value: HIBCCode39PAS.
public int getDataLocation()
Identifies data location.
public void setDataLocation(int value)
Identifies data location.
public com.aspose.ms.System.Collections.Generic.List<HIBCPASRecord> getRecords()
Gets records list
public void addRecord(int dataType,
java.lang.String data)
Adds new record
dataType - Type of datadata - Data stringpublic void addRecord(HIBCPASRecord record)
Adds new record
record - Record to be addedpublic void clear()
Clears records list
public BaseEncodeType getBarcodeType()
Gets barcode type.
getBarcodeType in interface IComplexCodetextpublic java.lang.String getConstructedCodetext()
Constructs codetext
getConstructedCodetext in interface IComplexCodetextpublic void initFromString(java.lang.String constructedCodetext)
Initializes instance from constructed codetext.
initFromString in interface IComplexCodetextconstructedCodetext - Constructed codetext.public boolean equals(java.lang.Object obj)
Returns a value indicating whether this instance is equal to a specified HIBCPASCodetext value.
equals in class java.lang.Objectobj - An HIBCPASCodetext value to compare to this instance.<b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.public int hashCode()
Returns the hash code for this instance.
hashCode in class java.lang.Object