HIBCPASCodetext

HIBCPASCodetext

Class for encoding and decoding the text embedded in the HIBC PAS code.

Constructor

new HIBCPASCodetext()

Source:
Example
This sample shows how to encode and decode HIBC PAS using HIBCPASCodetext.

 let 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);
 let generator = new ComplexBarcodeGenerator(complexCodetext);
 BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(BarCodeImageFormat.PNG), null, DecodeType.HIBC_DATA_MATRIX_PAS);
 reader.readBarCodes();
 let codetext = reader.getFoundBarCodes()[0].getCodeText();
	let readCodetext = ComplexCodetextReader.tryDecodeHIBCPAS(codetext);
 print("Data location: " + readCodetext.getDataLocation());
 print("Data type: " + readCodetext.getRecords()[0].getDataType());
 print("Data: " + readCodetext.getRecords()[0].getData());
 print("Data type: " + readCodetext.getRecords()[1].getDataType());
 print("Data: " + readCodetext.getRecords()[1].getData());

Methods

addHIBCPASRecord(record)

Adds new record

Parameters:
Name Type Description
record Record to be added
Source:

addRecord(dataType, data)

Adds new record

Parameters:
Name Type Description
dataType Type of data
data Data string
Source:

clear()

Clears records list

Source:

equals(obj)

Returns a value indicating whether this instance is equal to a specified {@code HIBCPASCodetext} value.

Parameters:
Name Type Description
obj An {@code HIBCPASCodetext} value to compare to this instance.
Returns:
Type Description
{@code true} if obj has the same value as this instance; otherwise, {@code false}.
Source:

getBarcodeType()

Gets barcode type.

Returns:
Type Description
Barcode type.
Source:

getConstructedCodetext()

Constructs codetext

Returns:
Type Description
Constructed codetext
Source:

getDataLocation()

Identifies data location.

Source:

getRecords()

Gets records list

Returns:
Type Description
List of records
Source:

hashCode()

Returns the hash code for this instance.

Returns:
Type Description
A 32-bit signed integer hash code.
Source:

initFromString(constructedCodetext)

Initializes instance from constructed codetext.

Parameters:
Name Type Description
constructedCodetext Constructed codetext.
Source:

setBarcodeType()

Gets or sets barcode type. HIBC PAS codetext can be encoded using HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS and HIBCQRPAS encode types. Default value: HIBCCode39PAS.

Returns:
Type Description
Barcode type.
Source:

setDataLocation()

Identifies data location.

Source:

(static) construct()

HIBCPASRecord constructor

Source: