MaxiCodeStructuredCodetext

MaxiCodeStructuredCodetext

Base class for encoding and decoding the text embedded in the MaxiCode code for modes 2 and 3.

Constructor

new MaxiCodeStructuredCodetext()

Source:
Example
This sample shows how to decode raw MaxiCode codetext to MaxiCodeStructuredCodetext instance.

 let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
 reader.readBarCodes().forEach(function(result, i, results)
 {
     let resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText());
     if (resultMaxiCodeCodetext instanceof MaxiCodeStructuredCodetext)
     {
         let maxiCodeStructuredCodetext = resultMaxiCodeCodetext;
         console.log("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode());
         console.log("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode());
         console.log("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory());
     }
 });

Methods

equals(obj)

Returns a value indicating whether this instance is equal to a specified value.
Parameters:
Name Type Description
obj An value to compare to this instance
Returns:
Type Description
true if obj has the same value as this instance; otherwise, false
Source:

getConstructedCodetext()

Constructs codetext
Returns:
Type Description
Constructed codetext
Source:

getCountryCode()

Identifies 3 digit country code.
Source:

getHashCode()

Returns the hash code for this instance.
Returns:
Type Description
A 32-bit signed integer hash code.
Source:

getPostalCode()

Identifies the postal code. Must be 9 digits in mode 2 or
6 alphanumeric symbols in mode 3.
Source:

getSecondMessage()

Identifies second message of the barcode.
Source:

getServiceCategory()

Identifies 3 digit service category.
Source:

initFromString(constructedCodetext)

Initializes instance from constructed codetext.
Parameters:
Name Type Description
constructedCodetext Constructed codetext.
Source:

setCountryCode()

Identifies 3 digit country code.
Source:

setPostalCode()

Identifies the postal code. Must be 9 digits in mode 2 or 6 alphanumeric symbols in mode 3.
Source:

setSecondMessage()

Identifies second message of the barcode.
Source:

setServiceCategory()

Identifies 3 digit service category.
Source: