MaxiCodeStructuredCodetext

MaxiCodeStructuredCodetext class

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

public class MaxiCodeStructuredCodetext : MaxiCodeCodetext

Constructors

NameDescription
MaxiCodeStructuredCodetext(object)Initializes a new instance of the MaxiCodeStructuredCodetext class.

Methods

NameDescription
equals(object)Returns a value indicating whether this instance is equal to a specified MaxiCodeStructuredCodetext value.
getBarcodeTypeGets barcode type. (Inherited from MaxiCodeCodetext)
getConstructedCodetextConstructs codetext.
getCountryCodeIdentifies 3 digit country code.
getECIEncodingGets ECI encoding. Used when MaxiCodeEncodeMode is AUTO. (Inherited from MaxiCodeCodetext)
getEncodeModeGets a MaxiCode encode mode. Default value: Auto. (Inherited from MaxiCodeCodetext)
getHashCodeReturns the hash code for this instance.
getMaxiCodeEncodeModeGets a MaxiCode encode mode. (Inherited from MaxiCodeCodetext)
getModeGets MaxiCode mode. (Inherited from MaxiCodeCodetext)
getPostalCodeIdentifies the postal code. Must be 9 digits in mode 2 or 6 alphanumeric symbols in mode 3.
getSecondMessageIdentifies second message of the barcode.
getServiceCategoryIdentifies 3 digit service category.
init
initFromString(object)Initializes instance from constructed codetext.
setCountryCode(object)Identifies 3 digit country code.
setECIEncoding(object)Sets ECI encoding. Used when MaxiCodeEncodeMode is AUTO. (Inherited from MaxiCodeCodetext)
setEncodeMode(object)Sets a MaxiCode encode mode. Default value: Auto. (Inherited from MaxiCodeCodetext)
setMaxiCodeEncodeMode(object)Sets a MaxiCode encode mode. (Inherited from MaxiCodeCodetext)
setPostalCode(object)Identifies the postal code. Must be 9 digits in mode 2 or 6 alphanumeric symbols in mode 3.
setSecondMessage(object)Identifies second message of the barcode.
setServiceCategory(object)Identifies 3 digit service category.

Fields

NameDescription
JAVA_CLASS_NAME
maxiCodeSecondMessage

Examples

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

let reader = new BarCodeReader("c:\\test.png", null, DecodeType.MAXI_CODE);
let results = reader.readBarCodes();
for(let i = 0; i < results.length; i++)
{
let result = results[i];
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());
}
}

See Also